]> git.sesse.net Git - vlc/commitdiff
* modules/gui/wince: some more cleanup.
authorGildas Bazin <gbazin@videolan.org>
Mon, 28 Feb 2005 14:40:27 +0000 (14:40 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 28 Feb 2005 14:40:27 +0000 (14:40 +0000)
modules/gui/wince/interface.cpp
modules/gui/wince/iteminfo.cpp
modules/gui/wince/open.cpp
modules/gui/wince/playlist.cpp
modules/gui/wince/preferences.cpp
modules/gui/wince/subtitles.cpp
modules/gui/wince/timer.cpp
modules/gui/wince/wince.cpp
modules/gui/wince/wince.h
modules/gui/wince/wince_rc.rc

index f09cfa7710829080e2079dc1ddd46c3c238acdbb..6ed26a814fd3728d718e4882939b75a2d981eb38 100644 (file)
@@ -128,14 +128,15 @@ BOOL Interface::InitInstance( HINSTANCE hInstance, intf_thread_t *_p_intf )
     wc.lpszClassName = _T("VLC WinCE");
     if( !RegisterClass( &wc ) ) return FALSE;
 
-#ifndef WS_OVERLAPPEDWINDOW
-#   define WS_OVERLAPPEDWINDOW 0xcf0000
+    int i_style = WS_VISIBLE;
+
+#ifndef UNDER_CE
+    i_style |= WS_OVERLAPPEDWINDOW | WS_SIZEBOX;
 #endif
 
     // Create main window
     hwndMain =
-        CreateWindow( _T("VLC WinCE"), _T("VLC media player"),
-                      WS_OVERLAPPEDWINDOW|WS_SIZEBOX|WS_VISIBLE,
+        CreateWindow( _T("VLC WinCE"), _T("VLC media player"), i_style,
                       0, MENU_HEIGHT, CW_USEDEFAULT, CW_USEDEFAULT,
                       NULL, NULL, hInstance, (void *)this );
 
@@ -154,7 +155,7 @@ FUNCTION:
 PURPOSE: 
   Creates a menu bar.
 ***********************************************************************/
-HWND CreateMenuBar( HWND hwnd, HINSTANCE hInst )
+static HWND CreateMenuBar( HWND hwnd, HINSTANCE hInst )
 {
 #ifdef UNDER_CE
     SHMENUBARINFO mbi;
@@ -454,8 +455,8 @@ int CBaseWindow::CreateDialogBox( HWND hwnd, CBaseWindow *p_obj )
     memset( p_dlg_template, 0, sizeof(DLGTEMPLATE) + sizeof(WORD) * 4 );
 
     // these values are arbitrary, they won't be used normally anyhow
-    p_dlg_template->x  = 34; p_dlg_template->y  = 22;
-    p_dlg_template->cx = 144; p_dlg_template->cy = 75;
+    p_dlg_template->x  = 0; p_dlg_template->y  = 0;
+    p_dlg_template->cx = 300; p_dlg_template->cy = 300;
     p_dlg_template->style =
         DS_MODALFRAME|WS_POPUP|WS_CAPTION|WS_SYSMENU|WS_SIZEBOX;
 
index a26f72d1a18e018e8bca26c8197bec40a2814e20..7550e9556a1547b2dafd17837c53747aa1357b3f 100644 (file)
@@ -85,10 +85,8 @@ LRESULT ItemInfoDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
         memset( &mbi, 0, sizeof (SHMENUBARINFO) );
         mbi.cbSize     = sizeof (SHMENUBARINFO);
         mbi.hwndParent = hwnd;
-        mbi.nToolBarId = IDR_DUMMYMENU;
+        mbi.dwFlags    = SHCMBF_EMPTYBAR;
         mbi.hInstRes   = hInst;
-        mbi.nBmpId     = 0;
-        mbi.cBmpImages = 0;  
 
         if( !SHCreateMenuBar(&mbi) )
         {
index 83c56137d272cad88bc858a89d3fee6a8659c5fe..790dcf0ac5593e47d1862ca5b3a1460233b87c89 100644 (file)
@@ -114,10 +114,8 @@ LRESULT OpenDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
         memset( &mbi, 0, sizeof(SHMENUBARINFO) );
         mbi.cbSize     = sizeof(SHMENUBARINFO);
         mbi.hwndParent = hwnd;
-        mbi.nToolBarId = IDR_DUMMYMENU;
+        mbi.dwFlags    = SHCMBF_EMPTYBAR;
         mbi.hInstRes   = hInst;
-        mbi.nBmpId     = 0;
-        mbi.cBmpImages = 0;  
 
         if( !SHCreateMenuBar( &mbi ) )
         {
@@ -599,8 +597,11 @@ void OpenDialog::OnOk()
 {
     TCHAR psz_text[2048];
 
-    GetWindowText( mrl_combo, psz_text, 2048 ); // replace by ComboBox_GetText( mrl_combo, wUnicode, size )
-    mrl = SeparateEntries( psz_text );
+    GetWindowText( mrl_combo, psz_text, 2048 );
+
+    int i_args;
+    char **pp_args = vlc_parse_cmdline( _TOMB(psz_text), &i_args );
+
     ComboBox_AddString( mrl_combo, psz_text );
     if( ComboBox_GetCount( mrl_combo ) > 10 ) 
         ComboBox_DeleteString( mrl_combo, 0 );
@@ -612,18 +613,16 @@ void OpenDialog::OnOk()
                                        FIND_ANYWHERE );
     if( p_playlist == NULL ) return;
 
-    for( int i = 0; i < (int)mrl.size(); i++ )
+    for( int i = 0; i < i_args; i++ )
     {
         vlc_bool_t b_start = !i && i_open_arg;
         playlist_item_t *p_item =
-            playlist_ItemNew( p_intf, (const char*)mrl[i].c_str(),
-                              (const char *)mrl[i].c_str() );
+            playlist_ItemNew( p_intf, pp_args[i], pp_args[i] );
 
         /* Insert options */
-        while( i + 1 < (int)mrl.size() &&
-               ((const char *)mrl[i + 1].c_str())[0] == ':' )
+        while( i + 1 < i_args && pp_args[i + 1][0] == ':' )
         {
-            playlist_ItemAddOption( p_item, mrl[i + 1].c_str() );
+            playlist_ItemAddOption( p_item, pp_args[i + 1] );
             i++;
         }
 
@@ -648,6 +647,11 @@ void OpenDialog::OnOk()
 
     //TogglePlayButton( PLAYING_S );
 
+    while( i_args-- )
+    {
+        free( pp_args[i_args] );
+        if( !i_args ) free( pp_args );
+    }
     vlc_object_release( p_playlist );
 }
 
@@ -812,69 +816,3 @@ void OpenDialog::OnSubsFileSettings( HWND hwnd )
 
     delete subsfile_dialog;
 }
-
-/*****************************************************************************
- * Utility functions.
- *****************************************************************************/
-vector<string> SeparateEntries( TCHAR *entries )
-{
-    vlc_bool_t b_quotes_mode = VLC_FALSE;
-    vector<string> entries_array;
-    TCHAR *entry = new TCHAR[ _tcslen(entries) + 1 ];
-    TCHAR *strToken = entries;
-    int length = _tcscspn( strToken, _T(" \t\r\n\"") );
-    *entry = 0;
-
-    while( strToken - entries < _tcslen(entries) )
-    { 
-        _tcsncat( entry, strToken, length );
-
-        _tcsncat( entry, strToken + length, 1 );
-
-        if( !b_quotes_mode && strToken[length] == _T('\"') )
-        {
-            /* Enters quotes mode */
-            entry[ _tcslen(entry) - 1 ] = 0;
-            b_quotes_mode = VLC_TRUE;
-        }
-        else if( b_quotes_mode && strToken[length] == _T('\"') )
-        {
-            /* Finished the quotes mode */
-            entry[ _tcslen(entry) - 1 ] = 0;
-            if( _tcscmp( entry, _T("") ) != 0 )
-            {
-                entries_array.push_back( _TOMB(entry) );
-            }
-            *entry = 0;
-            b_quotes_mode = VLC_FALSE;
-        }
-        else if( !b_quotes_mode && strToken[length] != _T('\"') )
-        {
-            /* we found a non-quoted standalone string */
-            if( strToken + length - entries < _tcslen(entries) ||/*token.HasMoreTokens() ||*/ //FIX ME IF YOU CAN
-                strToken[length] == _T(' ') ||
-                strToken[length] == _T('\t') ||
-                strToken[length] == _T('\r') ||
-                strToken[length] == _T('\n') )
-              entry[ _tcslen(entry) - 1 ]/*strToken[length]*/ = 0;
-            if( _tcscmp( entry, _T("") ) != 0 )
-            {
-                entries_array.push_back( _TOMB(entry) );
-            }
-            *entry = 0;
-        }
-        else
-        {;}
-
-        strToken += length + 1;
-        length = _tcscspn( strToken, _T(" \t\r\n\"") );
-    }
-
-    if( _tcscmp( entry, _T("") ) != 0 )
-    {
-        entries_array.push_back( _TOMB(entry) );
-    }
-
-    delete [] entry;
-    return entries_array;
-}
index 335adac84ce5e7f185dc7b769a774b391b1c87f1..ae5f1cd278d45ffbc3adad1357b809fa44636951 100644 (file)
@@ -52,7 +52,6 @@
 #define BUTTONWIDTH   0    // Width of the button images in the toolbar
 #define BUTTONHEIGHT  0    // Height of the button images in the toolbar
 #define ID_TOOLBAR    2000 // Identifier of the main tool bar
-#define dwTBFontStyle TBSTYLE_BUTTON | TBSTYLE_CHECK | TBSTYLE_GROUP // style for toolbar buttons
 
 enum      
 {
@@ -71,7 +70,7 @@ enum
 // Help strings
 #define HELP_OPENPL _T("Open playlist")
 #define HELP_SAVEPL _T("Save playlist")
-#define HELP_SIMPLEADD _T("Simple Add")
+#define HELP_ADDFILE _T("Add File")
 #define HELP_ADDMRL _T("Add MRL")
 #define HELP_DELETE _T("Delete selection")
 #define HELP_INFOS _T("Item info")
@@ -82,12 +81,12 @@ enum
 #define HELP_REPEAT _T("Repeat one")
 
 // The TBBUTTON structure contains information the toolbar buttons.
-static TBBUTTON tbButton2[] =      
+static TBBUTTON tbButton2[] =
 {
   {0, ID_MANAGE_OPENPL,        TBSTATE_ENABLED, TBSTYLE_BUTTON},
   {1, ID_MANAGE_SAVEPL,       TBSTATE_ENABLED, TBSTYLE_BUTTON},
   {0, 0,              TBSTATE_ENABLED, TBSTYLE_SEP},
-  {2, ID_MANAGE_SIMPLEADD,       TBSTATE_ENABLED, TBSTYLE_BUTTON},
+  {2, ID_MANAGE_ADDFILE,       TBSTATE_ENABLED, TBSTYLE_BUTTON},
   {3, ID_MANAGE_ADDMRL,        TBSTATE_ENABLED, TBSTYLE_BUTTON},
   {4, ID_SEL_DELETE,       TBSTATE_ENABLED, TBSTYLE_BUTTON},
   {0, 0,              TBSTATE_ENABLED, TBSTYLE_SEP},
@@ -106,7 +105,7 @@ TCHAR * szToolTips2[] =
 {
     HELP_OPENPL,
     HELP_SAVEPL,
-    HELP_SIMPLEADD,
+    HELP_ADDFILE,
     HELP_ADDMRL,
     HELP_DELETE,
     HELP_INFOS,
@@ -137,6 +136,104 @@ Playlist::Playlist( intf_thread_t *_p_intf, HINSTANCE _hInst )
     b_need_update = VLC_TRUE;
 }
 
+/***********************************************************************
+FUNCTION: 
+  CreateMenuBar
+
+PURPOSE: 
+  Creates a menu bar.
+***********************************************************************/
+static HWND CreateMenuBar( HWND hwnd, HINSTANCE hInst )
+{
+#ifdef UNDER_CE
+    SHMENUBARINFO mbi;
+    memset( &mbi, 0, sizeof(SHMENUBARINFO) );
+    mbi.cbSize     = sizeof(SHMENUBARINFO);
+    mbi.hwndParent = hwnd;
+    mbi.hInstRes   = hInst;
+    mbi.nToolBarId = IDR_MENUBAR2;
+
+    if( !SHCreateMenuBar( &mbi ) )
+    {
+        MessageBox(hwnd, _T("SHCreateMenuBar Failed"), _T("Error"), MB_OK);
+        return 0;
+    }
+
+    TBBUTTONINFO tbbi;
+    tbbi.cbSize = sizeof(tbbi);
+    tbbi.dwMask = TBIF_LPARAM;
+
+    SendMessage( mbi.hwndMB, TB_GETBUTTONINFO, IDM_MANAGE, (LPARAM)&tbbi );
+    HMENU hmenu_file = (HMENU)tbbi.lParam;
+    RemoveMenu( hmenu_file, 0, MF_BYPOSITION );
+    SendMessage( mbi.hwndMB, TB_GETBUTTONINFO, IDM_SORT, (LPARAM)&tbbi );
+    HMENU hmenu_sort = (HMENU)tbbi.lParam;
+    RemoveMenu( hmenu_sort, 0, MF_BYPOSITION );
+    SendMessage( mbi.hwndMB, TB_GETBUTTONINFO, IDM_SEL, (LPARAM)&tbbi );
+    HMENU hmenu_sel = (HMENU)tbbi.lParam;
+    RemoveMenu( hmenu_sel, 0, MF_BYPOSITION );
+
+#else
+    HMENU hmenu_file = CreatePopupMenu();
+    HMENU hmenu_sort = CreatePopupMenu();
+    HMENU hmenu_sel = CreatePopupMenu();
+#endif
+
+    AppendMenu( hmenu_file, MF_STRING, ID_MANAGE_ADDFILE,
+                _T("&Add File...") );
+    AppendMenu( hmenu_file, MF_STRING, ID_MANAGE_ADDDIRECTORY,
+                _T("Add Directory...") );
+    AppendMenu( hmenu_file, MF_STRING, ID_MANAGE_ADDMRL,
+                _T("Add MRL...") );
+    AppendMenu( hmenu_file, MF_SEPARATOR, 0, 0 );
+    AppendMenu( hmenu_file, MF_STRING, ID_MANAGE_OPENPL,
+                _T("Open &Playlist") );
+    AppendMenu( hmenu_file, MF_STRING, ID_MANAGE_SAVEPL,
+                _T("Save Playlist") );
+
+    AppendMenu( hmenu_sort, MF_STRING, ID_SORT_TITLE,
+                _T("Sort by &title") );
+    AppendMenu( hmenu_sort, MF_STRING, ID_SORT_RTITLE,
+                _T("&Reverse sort by title") );
+    AppendMenu( hmenu_sort, MF_SEPARATOR, 0, 0 );
+    AppendMenu( hmenu_sort, MF_STRING, ID_SORT_AUTHOR,
+                _T("Sort by &author") );
+    AppendMenu( hmenu_sort, MF_STRING, ID_SORT_RAUTHOR,
+                _T("Reverse sort by &author") );
+    AppendMenu( hmenu_sort, MF_SEPARATOR, 0, 0 );
+    AppendMenu( hmenu_sort, MF_STRING, ID_SORT_SHUFFLE,
+                _T("&Shuffle Playlist") );
+
+    AppendMenu( hmenu_sel, MF_STRING, ID_SEL_ENABLE,
+                _T("&Enable") );
+    AppendMenu( hmenu_sel, MF_STRING, ID_SEL_DISABLE,
+                _T("&Disable") );
+    AppendMenu( hmenu_sel, MF_SEPARATOR, 0, 0 );
+    AppendMenu( hmenu_sel, MF_STRING, ID_SEL_INVERT,
+                _T("&Invert") );
+    AppendMenu( hmenu_sel, MF_STRING, ID_SEL_DELETE,
+                _T("D&elete") );
+    AppendMenu( hmenu_sel, MF_SEPARATOR, 0, 0 );
+    AppendMenu( hmenu_sel, MF_STRING, ID_SEL_SELECTALL,
+                _T("&Select All") );
+
+
+#ifdef UNDER_CE
+    return mbi.hwndMB;
+
+#else
+    HMENU hmenu = CreateMenu();
+
+    AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)hmenu_file, _T("Manage") );
+    AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)hmenu_sort, _T("Sort") );
+    AppendMenu( hmenu, MF_POPUP|MF_STRING, (UINT)hmenu_sel, _T("Selection") );
+
+    SetMenu( hwnd, hmenu );
+    return hwnd;
+
+#endif
+}
+
 /***********************************************************************
 FUNCTION: 
   WndProc
@@ -164,23 +261,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
         shidi.hDlg = hwnd;
         SHInitDialog( &shidi );
 
-        //Create the menubar.
-        memset( &mbi, 0, sizeof (SHMENUBARINFO) );
-        mbi.cbSize     = sizeof (SHMENUBARINFO);
-        mbi.hwndParent = hwnd;
-        mbi.dwFlags    = SHCMBF_HMENU;
-        mbi.nToolBarId = IDR_MENUBAR2;
-        mbi.hInstRes   = hInst;
-        mbi.nBmpId     = 0;
-        mbi.cBmpImages = 0;  
-
-        if( !SHCreateMenuBar(&mbi) )
-        {
-            MessageBox(hwnd, _T("SHCreateMenuBar Failed"), _T("Error"), MB_OK);
-            //return -1;
-        }
-
-        hwndCB = mbi.hwndMB;
+        hwndCB = CreateMenuBar( hwnd, hInst );
 
         iccex.dwSize = sizeof (INITCOMMONCONTROLSEX);
         iccex.dwICC = ICC_BAR_CLASSES;
@@ -285,9 +366,16 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
             break;
 
-        case ID_MANAGE_SIMPLEADD:
+        case ID_MANAGE_ADDFILE:
             SHFullScreen( GetForegroundWindow(), SHFS_SHOWSIPBUTTON );
-            OnAddFile();
+            OnAddFile( VLC_FALSE );
+            SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
+            b_need_update = VLC_TRUE;
+            break;
+
+        case ID_MANAGE_ADDDIRECTORY:
+            SHFullScreen( GetForegroundWindow(), SHFS_SHOWSIPBUTTON );
+            OnAddFile( VLC_TRUE );
             SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
             b_need_update = VLC_TRUE;
             break;
@@ -393,6 +481,7 @@ LRESULT Playlist::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
         default:
             break;
         }
+        break;
 
     case WM_NOTIFY:
         if( ( ((LPNMHDR)lp)->hwndFrom == hListView ) &&
@@ -708,17 +797,13 @@ void Playlist::OnSave()
     }
 }
 
-void Playlist::OnAddFile()
+void Playlist::OnAddFile( vlc_bool_t b_directory )
 {
     // Same code as in Interface
     OPENFILENAME ofn;
     TCHAR DateiName[80+1] = _T("\0");
     static TCHAR szFilter[] = _T("All (*.*)\0*.*\0");
 
-    playlist_t *p_playlist = (playlist_t *)
-        vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
-    if( p_playlist == NULL ) return;
-
     memset( &ofn, 0, sizeof(OPENFILENAME) );
     ofn.lStructSize = sizeof(OPENFILENAME);
     ofn.hwndOwner = NULL;
@@ -732,7 +817,7 @@ void Playlist::OnAddFile()
     ofn.lpstrFileTitle = NULL; 
     ofn.nMaxFileTitle = 40;
     ofn.lpstrInitialDir = NULL;
-    ofn.lpstrTitle = _T("Quick Open File");
+    ofn.lpstrTitle = _T("Add File");
     ofn.Flags = 0; 
     ofn.nFileOffset = 0;
     ofn.nFileExtension = 0;
@@ -741,16 +826,23 @@ void Playlist::OnAddFile()
     ofn.lpfnHook = NULL;
     ofn.lpTemplateName = NULL;
 
+#if 0//def UNDER_CE
+    if( b_directory ) ofn.Flags |= OFN_PROJECT;
+#endif
+
     SHFullScreen( GetForegroundWindow(), SHFS_HIDESIPBUTTON );
 
     if( GetOpenFileName( (LPOPENFILENAME)&ofn ) )
     {
+        playlist_t *p_playlist = (playlist_t *)
+           vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, FIND_ANYWHERE );
+       if( p_playlist == NULL ) return;
+
         char *psz_filename = _TOMB(ofn.lpstrFile);
         playlist_Add( p_playlist, psz_filename, psz_filename,
                       PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
+       vlc_object_release( p_playlist );
     }
-
-    vlc_object_release( p_playlist );
 }
 
 void Playlist::OnAddMRL()
index 62f510b0b80592b8d3d4fef52ad266fca5deed4c..708c2253665a583bb6b1e3e2b7676df5494f7b0d 100644 (file)
@@ -179,10 +179,8 @@ LRESULT PrefsDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
         memset( &mbi, 0, sizeof (SHMENUBARINFO) );
         mbi.cbSize     = sizeof (SHMENUBARINFO);
         mbi.hwndParent = hwnd;
-        mbi.nToolBarId = IDR_DUMMYMENU;
+        mbi.dwFlags    = SHCMBF_EMPTYBAR;
         mbi.hInstRes   = hInst;
-        mbi.nBmpId     = 0;
-        mbi.cBmpImages = 0;
 
         if( !SHCreateMenuBar(&mbi) )
         {
index 8ca156f66168d34fc4651461bb980382ca23587d..5013f008fc114136e558fd516e367c58e7a54617 100644 (file)
@@ -88,10 +88,8 @@ LRESULT SubsFileDialog::WndProc( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
         memset (&mbi, 0, sizeof (SHMENUBARINFO));
         mbi.cbSize     = sizeof (SHMENUBARINFO);
         mbi.hwndParent = hwnd;
-        mbi.nToolBarId = IDR_DUMMYMENU;
+        mbi.dwFlags    = SHCMBF_EMPTYBAR;
         mbi.hInstRes   = hInst;
-        mbi.nBmpId     = 0;
-        mbi.cBmpImages = 0;
 
         if (!SHCreateMenuBar(&mbi))
         {
index ac1a1f402c11fb4fe16015545818b9134d8696b7..600cf83022f7216a3f7696860c0ad943b5d1d74a 100644 (file)
@@ -242,11 +242,7 @@ static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
 {
     intf_thread_t *p_intf = (intf_thread_t *)param;
 
-    if( p_intf->p_sys->pf_show_dialog )
-    {
-        p_intf->p_sys->pf_show_dialog( p_intf, INTF_DIALOG_POPUPMENU,
-                                       new_val.b_bool, 0 );
-    }
+    /* Nothing for now */
 
     return VLC_SUCCESS;
 }
index 09104f3bad20fb0433a84811563e0d374499a364..803f511fc65a1142add6af2042035b5f2def28b5 100644 (file)
@@ -51,7 +51,7 @@ static void Run    ( intf_thread_t * );
 
 vlc_module_begin();
     set_description( (char *) _("WinCE interface module") );
-    set_capability( "interface", 200 );
+    set_capability( "interface", 100 );
     set_callbacks( Open, Close );
     add_shortcut( "wince" );
     set_program( "wcevlc" );
index 23b4c321bcfea0fd3894cdce72e0eeb5fe55c4c7..87d3803b465e9fb430e6504ceecf372b76ee3553 100644 (file)
@@ -46,8 +46,6 @@
 #include <vector>
 using namespace std; 
 
-vector<string> SeparateEntries( TCHAR *entries );
-
 class MenuItemExt;
 class VideoWindow;
 
@@ -107,7 +105,7 @@ protected:
    HWND            hwndCB;              // The command bar handle
 
    HINSTANCE       GetInstance () const { return hInst; }
-   virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ) = 0;
+   virtual LRESULT WndProc( HWND, UINT, WPARAM, LPARAM ) {};
 };
 
 class FileInfo;
@@ -385,7 +383,7 @@ protected:
 
     void OnOpen();
     void OnSave();
-    void OnAddFile();
+    void OnAddFile( vlc_bool_t );
     void OnAddMRL();
 
     void OnDeleteSelection();
@@ -676,11 +674,12 @@ extern "C" {
 #define ID_SEL_DISABLE                  40101
 #define ID_SORT_TITLE                   40102
 #define ID_SORT_RTITLE                  40103
-#define ID_MANAGE_SIMPLEADD             40104
-#define ID_MANAGE_OPENPL                40105
+#define ID_MANAGE_ADDFILE               40104
+#define ID_MANAGE_ADDDIRECTORY          40105
 #define ID_MANAGE_ADDMRL                40106
-#define ID_MANAGE_SAVEPL                40107
-#define ID_MENUITEM40108                40108
+#define ID_MANAGE_OPENPL                40107
+#define ID_MANAGE_SAVEPL                40108
+#define ID_MENUITEM40108                40109
 #define IDS_CAP_MENUITEM40109           40110
 #define IDS_STOP                        57601
 #define StopStream_Event                57601
index e09e36c0b864886f2cff73109332e6264c5d4c87..9d4189a73a0e29e451613a77c05fb04c15347fd1 100644 (file)
 #endif\r
 #endif\r
 \r
-/////////////////////////////////////////////////////////////////////////////\r
-// English (U.S.) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r
-#if defined(_WIN32) && !defined(_WIN32_WCE)\r
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
 /////////////////////////////////////////////////////////////////////////////\r
 //\r
 // Menubar\r
@@ -69,31 +60,15 @@ IDR_MENUBAR2 MENU DISCARDABLE
 BEGIN\r
     POPUP "Manage"\r
     BEGIN\r
-        MENUITEM "&Simple Add...",              ID_MANAGE_SIMPLEADD\r
-        MENUITEM "&Add MRL...",                 40106\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Open Playlist...",           ID_MANAGE_OPENPL\r
-        MENUITEM "&Save Playlist...",           ID_MANAGE_SAVEPL\r
+        MENUITEM "Empty",                       ID_EMPTY, GRAYED\r
     END\r
     POPUP "Sort"\r
     BEGIN\r
-        MENUITEM "Sort by &title",              ID_SORT_TITLE\r
-        MENUITEM "&Reverse sort by title",      ID_SORT_RTITLE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "Sort by &author",             ID_SORT_AUTHOR\r
-        MENUITEM "Reverse sort by author",      ID_SORT_RAUTHOR\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Shuffle Playlist",           ID_SORT_SHUFFLE\r
+        MENUITEM "Empty",                       ID_EMPTY, GRAYED\r
     END\r
     POPUP "Selection"\r
     BEGIN\r
-        MENUITEM "&Enable",                     ID_SEL_ENABLE\r
-        MENUITEM "&Disable",                    ID_SEL_DISABLE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Invert",                     ID_SEL_INVERT\r
-        MENUITEM "D&elete",                     ID_SEL_DELETE\r
-        MENUITEM SEPARATOR\r
-        MENUITEM "&Select All",                 ID_SEL_SELECTALL\r
+        MENUITEM "Empty",                       ID_EMPTY, GRAYED\r
     END\r
 END\r
 \r
@@ -122,7 +97,7 @@ END
 \r
 IDR_MENUBAR2 RCDATA DISCARDABLE \r
 BEGIN\r
-    IDR_MENUBAR2, 4,\r
+    IDR_MENUBAR2, 3,\r
     I_IMAGENONE, IDM_MANAGE, TBSTATE_ENABLED, \r
     TBSTYLE_DROPDOWN | TBSTYLE_AUTOSIZE, IDM_MANAGE, IDM_MANAGE, 0,\r
     I_IMAGENONE, IDM_SORT, TBSTATE_ENABLED, \r
@@ -136,77 +111,21 @@ END
 // String Table\r
 //\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
     IDM_FILE                "File"\r
     IDM_VIEW                "View"\r
     IDM_SETTINGS            "Settings"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
     IDM_AUDIO               "Audio"\r
     IDM_VIDEO               "Video"\r
     IDM_NAVIGATION          "Navigation"\r
 END\r
 \r
-STRINGTABLE DISCARDABLE \r
+STRINGTABLE DISCARDABLE\r
 BEGIN\r
     IDM_MANAGE              "Manage"\r
     IDM_SORT                "Sort"\r
     IDM_SEL                 "Selection"\r
-    ID_SORT_AUTHOR          "A"\r
-    ID_SORT_SHUFFLE         "S"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_SEL_INVERT           "I"\r
-    ID_SEL_DELETE           "E"\r
-    ID_SEL_SELECTALL        "S"\r
-    ID_SEL_ENABLE           "E"\r
-    ID_SEL_DISABLE          "D"\r
-    ID_SORT_TITLE           "T"\r
-    ID_SORT_RTITLE          "R"\r
-    ID_MANAGE_SIMPLEADD     "S"\r
-    ID_MANAGE_OPENPL        "O"\r
-    ID_MANAGE_ADDMRL        "A"\r
-    ID_MANAGE_SAVEPL        "S"\r
-END\r
-\r
-#endif    // English (U.S.) resources\r
-/////////////////////////////////////////////////////////////////////////////\r
-\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// French (France) resources\r
-\r
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r
-#if defined(_WIN32) && !defined(_WIN32_WCE)\r
-LANGUAGE LANG_FRENCH, SUBLANG_FRENCH\r
-#pragma code_page(1252)\r
-#endif //_WIN32\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Menubar\r
-//\r
-\r
-IDR_DUMMYMENU MENU DISCARDABLE \r
-BEGIN\r
-    MENUITEM "",                            ID_MENUITEM40108\r
-END\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// Data\r
-//\r
-\r
-IDR_DUMMYMENU RCDATA DISCARDABLE \r
-BEGIN\r
-    IDR_DUMMYMENU, 1,\r
-    I_IMAGENONE, ID_MENUITEM40108, TBSTATE_ENABLED, TBSTYLE_AUTOSIZE, \r
-    IDS_CAP_MENUITEM40109, 0, 0\r
 END\r
 \r
 /////////////////////////////////////////////////////////////////////////////\r
@@ -236,68 +155,3 @@ IDB_BITMAP1             BITMAP  DISCARDABLE     "bitmaps\\toolbar1.bmp"
 IDB_BITMAP2             BITMAP  DISCARDABLE     "bitmaps\\toolbar2.bmp"\r
 IDB_BITMAP3             BITMAP  DISCARDABLE     "bitmaps\\toolbar3.bmp"\r
 #endif\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-//\r
-// String Table\r
-//\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    IDS_TITLE               "VLC Media PLayer"\r
-    IDS_CLASSNAME           "wince"\r
-    IDS_CAP_VIEW            "View"\r
-    IDS_CAP_SETTINGS        "Settings"\r
-    IDS_CAP_AUDIO           "Audio"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    IDS_CAP_VIDEO           "Video"\r
-    IDS_CAP_Navigation      "Navigation"\r
-    IDS_CAP_FILE            "File"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    IDM_AUDIO               "Audio"\r
-    IDM_VIDEO               "Video"\r
-    IDM_NAVIGATION          "Navigation"\r
-    ID_FILE_QUICK_OPEN      "O"\r
-    ID_FILE_OPENFILE        "F"\r
-    ID_FILE_QUICKOPEN       "O"\r
-    ID_FILE_OPENNETWORKSTREAM "N"\r
-    ID_FILE_OPENNET         "N"\r
-    ID_FILE_EXIT            "X"\r
-    ID_VIEW_PLAYLIST        "P"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    StopStream_Event        "StopStream_Event"\r
-    PlayStream_Event        "PlayStream_Event"\r
-    PrevStream_Event        "SlowStream_Event"\r
-    NextStream_Event        "NextStream_Event"\r
-    SlowStream_Event        "SlowStream_Event"\r
-    FastStream_Event        "FastStream_Event"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    ID_VIEW_MESSAGES        "M"\r
-    ID_VIEW_MEDIAINFO       "S"\r
-    ID_VIEW_STREAMINFO      "S"\r
-    IDS_CAP_NAV             "Navigation"\r
-    ID_SETTINGS_PREF        "P"\r
-    ID_SETTINGS_EXTEND      "E"\r
-END\r
-\r
-STRINGTABLE DISCARDABLE \r
-BEGIN\r
-    IDM_FILE                "File"\r
-    IDM_VIEW                "View"\r
-    IDM_SETTINGS            "Settings"\r
-END\r
-\r
-#endif    // French (France) resources\r
-/////////////////////////////////////////////////////////////////////////////\r