Changeset 3435dcce91035e447387883d5c3b46546b105433

Show
Ignore:
Timestamp:
04/21/03 04:12:06 (5 years ago)
Author:
Olivier Teulière <ipkiss@videolan.org>
git-committer:
Olivier Teulière <ipkiss@videolan.org> 1050891126 +0000
git-parent:

[dfa3c5d025680525c0999df341d2ef881bffcd0f]

git-author:
Olivier Teulière <ipkiss@videolan.org> 1050891126 +0000
Message:
  • we now use a wxwindow dialog to load the skins, so we can get rid
    of our custom dialog
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/skins/Modules.am

    r474a83c r3435dcc  
    22    modules/gui/skins/os_api.h \ 
    33    modules/gui/skins/os_bitmap.h \ 
    4     modules/gui/skins/os_dialog.h \ 
    54    modules/gui/skins/os_event.h \ 
    65    modules/gui/skins/os_font.h \ 
     
    4140    modules/gui/skins/src/bitmap.cpp \ 
    4241    modules/gui/skins/src/bitmap.h \ 
    43     modules/gui/skins/src/dialog.cpp \ 
    44     modules/gui/skins/src/dialog.h \ 
    4542    modules/gui/skins/src/event.cpp \ 
    4643    modules/gui/skins/src/event.h \ 
     
    6461    modules/gui/skins/win32/win32_bitmap.cpp \ 
    6562    modules/gui/skins/win32/win32_bitmap.h \ 
    66     modules/gui/skins/win32/win32_dialog.cpp \ 
    67     modules/gui/skins/win32/win32_dialog.h \ 
    6863    modules/gui/skins/win32/win32_dragdrop.cpp \ 
    6964    modules/gui/skins/win32/win32_dragdrop.h \ 
     
    8378    modules/gui/skins/gtk2/gtk2_bitmap.cpp \ 
    8479    modules/gui/skins/gtk2/gtk2_bitmap.h \ 
    85     modules/gui/skins/gtk2/gtk2_dialog.cpp \ 
    86     modules/gui/skins/gtk2/gtk2_dialog.h \ 
    8780    modules/gui/skins/gtk2/gtk2_dragdrop.cpp \ 
    8881    modules/gui/skins/gtk2/gtk2_dragdrop.h \ 
  • modules/gui/skins/gtk2/gtk2_theme.cpp

    r51bf102 r3435dcc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: gtk2_theme.cpp,v 1.20 2003/04/20 20:28:39 ipkiss Exp $ 
     5 * $Id: gtk2_theme.cpp,v 1.21 2003/04/21 02:12:06 ipkiss Exp $ 
    66 * 
    77 * Authors: Cyril Deguet     <asmax@videolan.org> 
     
    4141#include "../src/theme.h" 
    4242#include "../os_theme.h" 
    43 #include "../src/dialog.h" 
    44 #include "../os_dialog.h" 
    4543#include "../src/vlcproc.h" 
    4644#include "../src/skin_common.h" 
  • modules/gui/skins/src/skin_main.cpp

    r474a83c r3435dcc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: skin_main.cpp,v 1.13 2003/04/21 00:54:26 ipkiss Exp $ 
     5 * $Id: skin_main.cpp,v 1.14 2003/04/21 02:12:06 ipkiss Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    3535#include "../os_api.h" 
    3636#include "event.h" 
    37 #include "dialog.h" 
    38 #include "../os_dialog.h" 
    3937#include "banks.h" 
    4038#include "window.h" 
     
    185183        { 
    186184            // Last chance: the user can  select a new theme file 
    187  
    188             // Initialize file structure 
    189             OpenFileDialog *OpenFile; 
    190             OpenFile = (OpenFileDialog *)new OSOpenFileDialog( NULL, 
    191                 _("Open skin"), false ); 
    192             OpenFile->AddFilter( _("Skin files"), "*.vlt" ); 
    193             OpenFile->AddFilter( _("Skin files"), "*.xml" ); 
    194             OpenFile->AddFilter( _("All files"), "*.*" ); 
    195  
    196             // Open dialog box 
    197             if( OpenFile->Open() ) 
     185            wxFileDialog dialog( NULL, _("Open a skin file"), "", "", 
     186                "Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|" 
     187                    "All files|*.*", wxOPEN ); 
     188 
     189            if( dialog.ShowModal() == wxID_OK ) 
    198190            { 
    199191                // try to load selected file 
    200                 if( ! Loader->Load( OpenFile->FileList.front() ) ) 
     192                if( ! Loader->Load( dialog.GetPath().c_str() ) ) 
    201193                { 
    202194                    // He, he, what the hell is he doing ? 
    203                     delete OpenFile; 
    204195                    delete Loader; 
    205196                    return; 
     
    208199            else 
    209200            { 
    210                 delete OpenFile; 
    211201                delete Loader; 
    212202                return; 
    213203            } 
    214  
    215             delete OpenFile; 
    216204        } 
    217205    } 
  • modules/gui/skins/src/theme.cpp

    r51bf102 r3435dcc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: theme.cpp,v 1.9 2003/04/20 20:28:39 ipkiss Exp $ 
     5 * $Id: theme.cpp,v 1.10 2003/04/21 02:12:06 ipkiss Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    3232#include "window.h" 
    3333#include "../os_window.h" 
    34 #include "dialog.h" 
    35 #include "../os_dialog.h" 
    3634#include "banks.h" 
    3735#include "anchor.h" 
  • modules/gui/skins/src/vlcproc.cpp

    r474a83c r3435dcc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: vlcproc.cpp,v 1.12 2003/04/21 00:54:26 ipkiss Exp $ 
     5 * $Id: vlcproc.cpp,v 1.13 2003/04/21 02:12:06 ipkiss Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    3535//--- SKIN ------------------------------------------------------------------ 
    3636#include "../os_api.h" 
    37 #include "dialog.h" 
    38 #include "../os_dialog.h" 
    3937#include "event.h" 
    4038#include "banks.h" 
     
    330328    if( p_intf->p_sys->p_new_theme_file == NULL ) 
    331329    { 
    332         // Initialize file structure 
    333         OpenFileDialog *OpenFile; 
    334         OpenFile = (OpenFileDialog *)new OSOpenFileDialog( p_intf, 
    335             _("Change skin - Open new file"), false ); 
    336         OpenFile->AddFilter( _("Skin files"), "*.vlt" ); 
    337         OpenFile->AddFilter( _("Skin files"), "*.xml" ); 
    338         OpenFile->AddFilter( _("All files"), "*.*" ); 
    339  
    340         // Open dialog box 
    341         if( OpenFile->Open() ) 
     330        wxFileDialog dialog( NULL, _("Open a skin file"), "", "", 
     331            "Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|All files|*.*", 
     332            wxOPEN ); 
     333 
     334        if( dialog.ShowModal() == wxID_OK ) 
    342335        { 
    343336            p_intf->p_sys->p_new_theme_file = 
    344                 new char[OpenFile->FileList.front().length()]; 
     337                new char[dialog.GetPath().Length()]; 
    345338 
    346339            strcpy( p_intf->p_sys->p_new_theme_file, 
    347                     OpenFile->FileList.front().c_str() ); 
     340                    dialog.GetPath().c_str() ); 
    348341 
    349342            // Tell vlc to change skin after hiding interface 
    350343            OSAPI_PostMessage( NULL, VLC_HIDE, VLC_LOAD_SKIN, 0 ); 
    351344        } 
    352  
    353         // Free memory 
    354         delete OpenFile; 
    355345    } 
    356346    else 
  • modules/gui/skins/win32/win32_theme.cpp

    r51bf102 r3435dcc  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: win32_theme.cpp,v 1.4 2003/04/20 20:28:39 ipkiss Exp $ 
     5 * $Id: win32_theme.cpp,v 1.5 2003/04/21 02:12:06 ipkiss Exp $ 
    66 * 
    77 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> 
     
    4545#include "../src/theme.h" 
    4646#include "../os_theme.h" 
    47 #include "../src/dialog.h" 
    48 #include "../os_dialog.h" 
    4947#include "../src/vlcproc.h" 
    5048#include "../src/skin_common.h"