]> git.sesse.net Git - vlc/blobdiff - modules/gui/wince/subtitles.cpp
Qt: make the customize dialog a true Dialog.
[vlc] / modules / gui / wince / subtitles.cpp
index 77140ee127ceb4bdc8cd262b6efeac66b5b55b45..a1067bb910e1262edf1400ecb652a7c79441e458 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdio.h>
-#include <vlc/vlc.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
 #include <vlc_interface.h>
 
 #include "wince.h"
@@ -52,12 +55,12 @@ SubsFileDialog::SubsFileDialog( intf_thread_t *p_intf, CBaseWindow *p_parent,
 
 /***********************************************************************
 
-FUNCTION: 
+FUNCTION:
   WndProc
 
-PURPOSE: 
+PURPOSE:
   Processes messages sent to the main window.
-  
 ***********************************************************************/
 LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
 {
@@ -113,7 +116,7 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
             10, 10 + 15 + 10 - 3, rcClient.right - 2*10, 5*15 + 6,
             hwnd, NULL, hInst, NULL );
 
-        if( psz_subsfile ) free( psz_subsfile );
+        free( psz_subsfile );
 
         browse_button = CreateWindow( _T("BUTTON"), _T("Browse..."),
                         WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
@@ -136,7 +139,7 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
                 hwnd, NULL, hInst, NULL );
 
             encoding_combo = CreateWindow( _T("COMBOBOX"),
-                _FROMMB(p_item->psz_value),
+                _FROMMB(p_item->value.psz),
                 WS_CHILD | WS_VISIBLE | CBS_AUTOHSCROLL | CBS_DROPDOWNLIST |
                 LBS_SORT  | WS_VSCROLL,
                 rcClient.right - 150 - 10, 10 + 5*(15 + 10) - 3, 150, 5*15 + 6,
@@ -149,15 +152,15 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
                 ComboBox_AddString( encoding_combo,
                                     _FROMMB(p_item->ppsz_list[i_index]) );
 
-                if( p_item->psz_value &&
-                    !strcmp( p_item->psz_value, p_item->ppsz_list[i_index] ) )
+                if( p_item->value.psz &&
+                    !strcmp( p_item->value.psz, p_item->ppsz_list[i_index] ) )
                     ComboBox_SetCurSel( encoding_combo, i_index );
             }
 
-            if( p_item->psz_value )
+            if( p_item->value.psz )
             {
                 ComboBox_SelectString( encoding_combo, 0,
-                                       _FROMMB(p_item->psz_value) );
+                                       _FROMMB(p_item->value.psz) );
 
             }
         }
@@ -261,7 +264,7 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
             {
                 SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
                 OnFileBrowse();
-            } 
+            }
         }
         break;