Changeset 3435dcce91035e447387883d5c3b46546b105433
- 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
| r474a83c |
r3435dcc |
|
| 2 | 2 | modules/gui/skins/os_api.h \ |
|---|
| 3 | 3 | modules/gui/skins/os_bitmap.h \ |
|---|
| 4 | | modules/gui/skins/os_dialog.h \ |
|---|
| 5 | 4 | modules/gui/skins/os_event.h \ |
|---|
| 6 | 5 | modules/gui/skins/os_font.h \ |
|---|
| … | … | |
| 41 | 40 | modules/gui/skins/src/bitmap.cpp \ |
|---|
| 42 | 41 | modules/gui/skins/src/bitmap.h \ |
|---|
| 43 | | modules/gui/skins/src/dialog.cpp \ |
|---|
| 44 | | modules/gui/skins/src/dialog.h \ |
|---|
| 45 | 42 | modules/gui/skins/src/event.cpp \ |
|---|
| 46 | 43 | modules/gui/skins/src/event.h \ |
|---|
| … | … | |
| 64 | 61 | modules/gui/skins/win32/win32_bitmap.cpp \ |
|---|
| 65 | 62 | modules/gui/skins/win32/win32_bitmap.h \ |
|---|
| 66 | | modules/gui/skins/win32/win32_dialog.cpp \ |
|---|
| 67 | | modules/gui/skins/win32/win32_dialog.h \ |
|---|
| 68 | 63 | modules/gui/skins/win32/win32_dragdrop.cpp \ |
|---|
| 69 | 64 | modules/gui/skins/win32/win32_dragdrop.h \ |
|---|
| … | … | |
| 83 | 78 | modules/gui/skins/gtk2/gtk2_bitmap.cpp \ |
|---|
| 84 | 79 | modules/gui/skins/gtk2/gtk2_bitmap.h \ |
|---|
| 85 | | modules/gui/skins/gtk2/gtk2_dialog.cpp \ |
|---|
| 86 | | modules/gui/skins/gtk2/gtk2_dialog.h \ |
|---|
| 87 | 80 | modules/gui/skins/gtk2/gtk2_dragdrop.cpp \ |
|---|
| 88 | 81 | modules/gui/skins/gtk2/gtk2_dragdrop.h \ |
|---|
| r51bf102 |
r3435dcc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Cyril Deguet <asmax@videolan.org> |
|---|
| … | … | |
| 41 | 41 | #include "../src/theme.h" |
|---|
| 42 | 42 | #include "../os_theme.h" |
|---|
| 43 | | #include "../src/dialog.h" |
|---|
| 44 | | #include "../os_dialog.h" |
|---|
| 45 | 43 | #include "../src/vlcproc.h" |
|---|
| 46 | 44 | #include "../src/skin_common.h" |
|---|
| r474a83c |
r3435dcc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> |
|---|
| … | … | |
| 35 | 35 | #include "../os_api.h" |
|---|
| 36 | 36 | #include "event.h" |
|---|
| 37 | | #include "dialog.h" |
|---|
| 38 | | #include "../os_dialog.h" |
|---|
| 39 | 37 | #include "banks.h" |
|---|
| 40 | 38 | #include "window.h" |
|---|
| … | … | |
| 185 | 183 | { |
|---|
| 186 | 184 | // 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 ) |
|---|
| 198 | 190 | { |
|---|
| 199 | 191 | // try to load selected file |
|---|
| 200 | | if( ! Loader->Load( OpenFile->FileList.front() ) ) |
|---|
| | 192 | if( ! Loader->Load( dialog.GetPath().c_str() ) ) |
|---|
| 201 | 193 | { |
|---|
| 202 | 194 | // He, he, what the hell is he doing ? |
|---|
| 203 | | delete OpenFile; |
|---|
| 204 | 195 | delete Loader; |
|---|
| 205 | 196 | return; |
|---|
| … | … | |
| 208 | 199 | else |
|---|
| 209 | 200 | { |
|---|
| 210 | | delete OpenFile; |
|---|
| 211 | 201 | delete Loader; |
|---|
| 212 | 202 | return; |
|---|
| 213 | 203 | } |
|---|
| 214 | | |
|---|
| 215 | | delete OpenFile; |
|---|
| 216 | 204 | } |
|---|
| 217 | 205 | } |
|---|
| r51bf102 |
r3435dcc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> |
|---|
| … | … | |
| 32 | 32 | #include "window.h" |
|---|
| 33 | 33 | #include "../os_window.h" |
|---|
| 34 | | #include "dialog.h" |
|---|
| 35 | | #include "../os_dialog.h" |
|---|
| 36 | 34 | #include "banks.h" |
|---|
| 37 | 35 | #include "anchor.h" |
|---|
| r474a83c |
r3435dcc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> |
|---|
| … | … | |
| 35 | 35 | //--- SKIN ------------------------------------------------------------------ |
|---|
| 36 | 36 | #include "../os_api.h" |
|---|
| 37 | | #include "dialog.h" |
|---|
| 38 | | #include "../os_dialog.h" |
|---|
| 39 | 37 | #include "event.h" |
|---|
| 40 | 38 | #include "banks.h" |
|---|
| … | … | |
| 330 | 328 | if( p_intf->p_sys->p_new_theme_file == NULL ) |
|---|
| 331 | 329 | { |
|---|
| 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 ) |
|---|
| 342 | 335 | { |
|---|
| 343 | 336 | p_intf->p_sys->p_new_theme_file = |
|---|
| 344 | | new char[OpenFile->FileList.front().length()]; |
|---|
| | 337 | new char[dialog.GetPath().Length()]; |
|---|
| 345 | 338 | |
|---|
| 346 | 339 | strcpy( p_intf->p_sys->p_new_theme_file, |
|---|
| 347 | | OpenFile->FileList.front().c_str() ); |
|---|
| | 340 | dialog.GetPath().c_str() ); |
|---|
| 348 | 341 | |
|---|
| 349 | 342 | // Tell vlc to change skin after hiding interface |
|---|
| 350 | 343 | OSAPI_PostMessage( NULL, VLC_HIDE, VLC_LOAD_SKIN, 0 ); |
|---|
| 351 | 344 | } |
|---|
| 352 | | |
|---|
| 353 | | // Free memory |
|---|
| 354 | | delete OpenFile; |
|---|
| 355 | 345 | } |
|---|
| 356 | 346 | else |
|---|
| r51bf102 |
r3435dcc |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> |
|---|
| … | … | |
| 45 | 45 | #include "../src/theme.h" |
|---|
| 46 | 46 | #include "../os_theme.h" |
|---|
| 47 | | #include "../src/dialog.h" |
|---|
| 48 | | #include "../os_dialog.h" |
|---|
| 49 | 47 | #include "../src/vlcproc.h" |
|---|
| 50 | 48 | #include "../src/skin_common.h" |
|---|