]> git.sesse.net Git - vlc/commitdiff
* added preferences, file info and stream output dialogs to the skins
authorOlivier Teulière <ipkiss@videolan.org>
Mon, 21 Apr 2003 00:54:26 +0000 (00:54 +0000)
committerOlivier Teulière <ipkiss@videolan.org>
Mon, 21 Apr 2003 00:54:26 +0000 (00:54 +0000)
13 files changed:
modules/gui/skins/Modules.am
modules/gui/skins/gtk2/gtk2_run.cpp
modules/gui/skins/src/banks.cpp
modules/gui/skins/src/event.cpp
modules/gui/skins/src/event.h
modules/gui/skins/src/skin_common.h
modules/gui/skins/src/skin_main.cpp
modules/gui/skins/src/vlcproc.cpp
modules/gui/skins/win32/win32_run.cpp
modules/gui/wxwindows/fileinfo.cpp
modules/gui/wxwindows/open.cpp
modules/gui/wxwindows/preferences.cpp
modules/gui/wxwindows/streamout.cpp

index 703ad03f47ec77335739670ec9b3f78a1c097b5f..211bb960f4c50b101b12f252f51408d93ad9f28c 100644 (file)
@@ -98,8 +98,11 @@ SOURCES_skins = \
        modules/gui/skins/gtk2/gtk2_window.cpp \
        modules/gui/skins/gtk2/gtk2_window.h \
        \
+       modules/gui/wxwindows/fileinfo.cpp \
        modules/gui/wxwindows/messages.cpp \
        modules/gui/wxwindows/open.cpp \
+       modules/gui/wxwindows/preferences.cpp \
+       modules/gui/wxwindows/streamout.cpp \
        $(NULL)
 
 EXTRA_DIST += \
index 07a7a436eba533a30fc695ac0092237144600fad..d32478e5c62d2c2e75db7d5e79d7a03cdebb50fd 100644 (file)
@@ -2,7 +2,7 @@
  * gtk2_run.cpp:
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: gtk2_run.cpp,v 1.14 2003/04/20 23:09:31 asmax Exp $
+ * $Id: gtk2_run.cpp,v 1.15 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Cyril Deguet     <asmax@videolan.org>
  *
@@ -230,6 +230,9 @@ bool Instance::OnInit()
     p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
     p_intf->p_sys->OpenDlg = new OpenDialog( p_intf, NULL, FILE_ACCESS );
     p_intf->p_sys->MessagesDlg = new Messages( p_intf, NULL );
+    p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
+    p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
+    p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
     return TRUE;
 }
 
index b8afbcbcd45f180375c491f6d970a26bda8ed876..93c2ced5f831a6f4a014bf35859ac9f563cb74b7 100644 (file)
@@ -2,7 +2,7 @@
  * banks.cpp: Bitmap bank, Event, bank, Font bank and OffSet bank
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: banks.cpp,v 1.3 2003/04/16 21:40:07 ipkiss Exp $
+ * $Id: banks.cpp,v 1.4 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -169,10 +169,12 @@ EventBank::EventBank( intf_thread_t *_p_intf )
     Add( "volume_down",      "VLC_VOLUME_CHANGE(DOWN)", "none" );
     Add( "volume_refresh",   "VLC_VOLUME_CHANGE(SET)",  "none" );
 
-    // Log events
+    // Dialogs events
     Add( "show_log",         "VLC_LOG_SHOW(TRUE)",      "none" );
     Add( "hide_log",         "VLC_LOG_SHOW(FALSE)",     "none" );
     Add( "clear_log",        "VLC_LOG_CLEAR",           "none" );
+    Add( "show_prefs",       "VLC_PREFS_SHOW",          "none" );
+    Add( "show_info",        "VLC_INFO_SHOW",           "none" );
 
     Add( "quit",             "VLC_HIDE(VLC_QUIT)",      "CTRL+C" );
     Add( "open",             "VLC_OPEN",                "CTRL+O" );
index 25317c94dfb350b8ae7ff885966fb74c903fbbd0..c5467996453eebc96f52eaedac124a42ca2f3e17 100644 (file)
@@ -2,7 +2,7 @@
  * event.cpp: Event class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: event.cpp,v 1.11 2003/04/16 21:40:07 ipkiss Exp $
+ * $Id: event.cpp,v 1.12 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -159,11 +159,15 @@ unsigned int Event::GetMessageType( string Desc )
     else if( Desc == "VLC_VOLUME_SET" )
         return VLC_VOLUME_SET;
 
-    // Logs
+    // Dialogs
     else if( Desc == "VLC_LOG_SHOW" )
         return VLC_LOG_SHOW;
     else if( Desc == "VLC_LOG_CLEAR" )
         return VLC_LOG_CLEAR;
+    else if( Desc == "VLC_PREFS_SHOW" )
+        return VLC_PREFS_SHOW;
+    else if( Desc == "VLC_INFO_SHOW" )
+        return VLC_INFO_SHOW;
 
     // Playlist events
     else if( Desc == "VLC_PLAYLIST_ADD_FILE" )
index eb4e130756065658cbbd84625889564769893bb6..c1a63586af5acab4f6e6b42a9ab96e7c3d80fbc4 100644 (file)
@@ -2,7 +2,7 @@
  * event.h: Event class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: event.h,v 1.6 2003/04/14 10:00:38 karibu Exp $
+ * $Id: event.h,v 1.7 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -62,6 +62,8 @@ using namespace std;
 
 #define VLC_LOG_SHOW        (VLC_MESSAGE + 20)
 #define VLC_LOG_CLEAR       (VLC_MESSAGE + 22)
+#define VLC_PREFS_SHOW      (VLC_MESSAGE + 23)
+#define VLC_INFO_SHOW       (VLC_MESSAGE + 24)
 
 #define VLC_INTF_REFRESH    (VLC_MESSAGE + 30)
 #define VLC_CHANGE_TRAY     (VLC_MESSAGE + 31)
index ecd6b22dc74c45e0973eeb9c23aad435302660fa..180d0156fa00378488df936eb56be1668645e768 100644 (file)
@@ -2,7 +2,7 @@
  * skin_common.h: Private Skin interface description
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: skin_common.h,v 1.2 2003/04/20 20:28:39 ipkiss Exp $
+ * $Id: skin_common.h,v 1.3 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -35,6 +35,9 @@ class Theme;
 class wxIcon;
 class OpenDialog;
 class Messages;
+class SoutDialog;
+class PrefsDialog;
+class FileInfo;
 
 //---------------------------------------------------------------------------
 // intf_sys_t: description and status of skin interface
@@ -65,12 +68,13 @@ struct intf_sys_t
     wxIcon *p_icon;
 
     // Dialogs
-    OpenDialog *OpenDlg;
-    Messages   *MessagesDlg;
+    OpenDialog  *OpenDlg;
+    Messages    *MessagesDlg;
+    SoutDialog  *SoutDlg;
+    PrefsDialog *PrefsDlg;
+    FileInfo    *InfoDlg;
 };
 
 #endif
 
 
-
-
index 920189096147b784fbdedefa5f54e85237adb8a1..9202a3f80b1ec199d1179646970dfc51db4ddb13 100644 (file)
@@ -2,7 +2,7 @@
  * skin-main.cpp: skins plugin for VLC
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.12 2003/04/20 20:28:39 ipkiss Exp $
+ * $Id: skin_main.cpp,v 1.13 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -282,6 +282,9 @@ int SkinManage( intf_thread_t *p_intf )
     // Update the log window
     p_intf->p_sys->MessagesDlg->UpdateLog();
 
+    // Update the file info window
+    p_intf->p_sys->InfoDlg->UpdateFileInfo();
+
     //-------------------------------------------------------------------------
     if( p_intf->p_sys->p_input != NULL && !p_intf->p_sys->p_input->b_die )
     {
index d6fa0ee66cb09d95a58dc3b01f0bd0eb342bd9f4..a10eec96257bc67d37511cb438959785d10fb10e 100644 (file)
@@ -2,7 +2,7 @@
  * vlcproc.cpp: VlcProc class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: vlcproc.cpp,v 1.11 2003/04/21 00:18:37 asmax Exp $
+ * $Id: vlcproc.cpp,v 1.12 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -131,13 +131,21 @@ bool VlcProc::EventProc( Event *evt )
             return true;
 
         case VLC_LOG_SHOW:
-//            p_intf->p_sys->p_theme->ShowLog( evt->GetParam2() );
             p_intf->p_sys->MessagesDlg->Show(
                 !p_intf->p_sys->MessagesDlg->IsShown() );
             return true;
 
         case VLC_LOG_CLEAR:
-//            p_intf->p_sys->p_theme->ClearLog();
+            return true;
+
+        case VLC_PREFS_SHOW:
+            p_intf->p_sys->PrefsDlg->Show(
+                !p_intf->p_sys->PrefsDlg->IsShown() );
+            return true;
+
+        case VLC_INFO_SHOW:
+            p_intf->p_sys->InfoDlg->Show(
+                !p_intf->p_sys->InfoDlg->IsShown() );
             return true;
 
         case VLC_INTF_REFRESH:
index 83934e67e3bed0c8831d50b6c4665800e8016b61..413b866fd592d7de667c1a890668afd2b4f36831 100644 (file)
@@ -2,7 +2,7 @@
  * win32_run.cpp:
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: win32_run.cpp,v 1.6 2003/04/20 20:28:39 ipkiss Exp $
+ * $Id: win32_run.cpp,v 1.7 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -92,6 +92,9 @@ bool Instance::OnInit()
     p_intf->p_sys->p_icon = new wxIcon( vlc_xpm );
     p_intf->p_sys->OpenDlg = new OpenDialog( p_intf, NULL, FILE_ACCESS );
     p_intf->p_sys->MessagesDlg = new Messages( p_intf, NULL );
+    p_intf->p_sys->SoutDlg = new SoutDialog( p_intf, NULL );
+    p_intf->p_sys->PrefsDlg = new PrefsDialog( p_intf, NULL );
+    p_intf->p_sys->InfoDlg = new FileInfo( p_intf, NULL );
     return TRUE;
 }
 
index 362f8b0b223faa1a70e098e609808cf18795ff76..8f716fdd3c2a8587ee06df87c411424a70a79892 100644 (file)
@@ -2,7 +2,7 @@
  * fileinfo.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: fileinfo.cpp,v 1.8 2003/04/17 14:00:44 anil Exp $
+ * $Id: fileinfo.cpp,v 1.9 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
  *
 
 #include <vlc/intf.h>
 
-#include "wxwindows.h"
+#if defined MODULE_NAME_IS_skins
+#   include "../skins/src/skin_common.h"
+#   include "../skins/src/wxdialogs.h"
+#else
+#   include "wxwindows.h"
+#endif
+
 
 /*****************************************************************************
  * Event Table.
@@ -76,7 +82,7 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ):
     /* Initializations */
     p_intf = _p_intf;
     SetIcon( *p_intf->p_sys->p_icon );
-    SetAutoLayout(TRUE);
+    SetAutoLayout( TRUE );
 
     /* Create a panel to put everything in */
     wxPanel *panel = new wxPanel( this, -1 );
@@ -104,23 +110,23 @@ FileInfo::FileInfo( intf_thread_t *_p_intf, Interface *_p_main_interface ):
     main_sizer->Layout();
     SetSizerAndFit( main_sizer );
 
-    UpdateFileInfo();    
+    UpdateFileInfo();
 }
 
 void FileInfo::UpdateFileInfo()
 {
-    if( !p_intf->p_sys->p_input || p_intf->p_sys->p_input->b_dead )
+    input_thread_t *p_input = p_intf->p_sys->p_input;
+
+    if( !p_input || p_input->b_dead )
     {
         if( fileinfo_root )
         {
-            fileinfo_tree->SetItemText ( fileinfo_root , "");
+            fileinfo_tree->SetItemText ( fileinfo_root , "" );
             fileinfo_tree->DeleteChildren ( fileinfo_root );
-        } 
+        }
         return;
     }
 
-    input_thread_t *p_input = p_intf->p_sys->p_input;
-
     if( !fileinfo_root )
     {
         fileinfo_root = fileinfo_tree->AddRoot( p_input->psz_name );
@@ -133,7 +139,7 @@ void FileInfo::UpdateFileInfo()
     fileinfo_tree->DeleteChildren( fileinfo_root );
 
     vlc_mutex_lock( &p_input->stream.stream_lock );
-    
+
     fileinfo_tree->SetItemText( fileinfo_root , p_input->psz_name );
     input_info_category_t *p_cat = p_input->stream.p_info;
 
@@ -145,7 +151,7 @@ void FileInfo::UpdateFileInfo()
         while ( p_info )
         {
             fileinfo_tree->AppendItem( cat, wxString(p_info->psz_name) + ": "
-                                 + p_info->psz_value );
+                                            + p_info->psz_value );
             p_info = p_info->p_next;
         }
         p_cat = p_cat->p_next;
index 2117d8a05f17d6aa5bab5aa0aad2e24e2bc3059f..93582ba9c676539d297fad08f1100b8ab670082d 100644 (file)
@@ -2,7 +2,7 @@
  * open.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: open.cpp,v 1.14 2003/04/20 20:28:40 ipkiss Exp $
+ * $Id: open.cpp,v 1.15 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -677,14 +677,12 @@ void OpenDialog::OnSoutEnable( wxCommandEvent& event )
 void OpenDialog::OnSoutSettings( wxCommandEvent& WXUNUSED(event) )
 {
     /* Show/hide the open dialog */
-#if !defined MODULE_NAME_IS_skins
     SoutDialog dialog( p_intf, p_main_interface );
 
     if( dialog.ShowModal() == wxID_OK )
     {
         config_PutPsz( p_intf, "sout", (char *)dialog.mrl.c_str() );
     }
-#endif
 }
 
 /*****************************************************************************
index 856027d787eb07eae3c1331b87a9f8e44a0c4c54..2c5e2c93dffb0804ffafaab816e4b68321d570e6 100644 (file)
@@ -2,7 +2,7 @@
  * preferences.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: preferences.cpp,v 1.10 2003/04/01 16:11:43 gbazin Exp $
+ * $Id: preferences.cpp,v 1.11 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
 
 #include <vlc/intf.h>
 
-#include "wxwindows.h"
+#if defined MODULE_NAME_IS_skins
+#   include "../skins/src/skin_common.h"
+#   include "../skins/src/wxdialogs.h"
+#else
+#   include "wxwindows.h"
+#endif
+
 
 #ifndef wxRB_SINGLE
 #   define wxRB_SINGLE 0
index 2fb7fca508078c5e46c0203f2c01596e73e5eb91..f05e62fe62cd75d24500dbc24cd76ce6e306afbf 100644 (file)
@@ -2,7 +2,7 @@
  * streamout.cpp : wxWindows plugin for vlc
  *****************************************************************************
  * Copyright (C) 2000-2001 VideoLAN
- * $Id: streamout.cpp,v 1.5 2003/04/01 16:11:43 gbazin Exp $
+ * $Id: streamout.cpp,v 1.6 2003/04/21 00:54:26 ipkiss Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  *
 
 #include <vlc/intf.h>
 
-#include "wxwindows.h"
+#if defined MODULE_NAME_IS_skins
+#   include "../skins/src/skin_common.h"
+#   include "../skins/src/wxdialogs.h"
+#else
+#   include "wxwindows.h"
+#endif
+
 
 #ifndef wxRB_SINGLE
 #   define wxRB_SINGLE 0