]> git.sesse.net Git - vlc/commitdiff
* modules/gui/skins/*: display the popupmenu when you right click on the interface.
authorGildas Bazin <gbazin@videolan.org>
Sun, 8 Jun 2003 16:56:48 +0000 (16:56 +0000)
committerGildas Bazin <gbazin@videolan.org>
Sun, 8 Jun 2003 16:56:48 +0000 (16:56 +0000)
modules/gui/skins/src/dialogs.cpp
modules/gui/skins/src/dialogs.h
modules/gui/skins/src/skin_main.cpp
modules/gui/skins/src/themeloader.cpp
modules/gui/skins/src/window.cpp

index b31b12c8fe29e925097093e1a9a447c0c696f6d4..ccde7041dad6823c16b84e6917ee11e262f6cd5b 100644 (file)
@@ -2,7 +2,7 @@
  * dialogs.cpp: Handles all the different dialog boxes we provide.\r
  *****************************************************************************\r
  * Copyright (C) 2003 VideoLAN\r
- * $Id: dialogs.cpp,v 1.3 2003/06/05 21:22:27 gbazin Exp $\r
+ * $Id: dialogs.cpp,v 1.4 2003/06/08 16:56:48 gbazin Exp $\r
  *\r
  * Authors: Gildas Bazin <gbazin@netcourrier.com>\r
  *\r
@@ -297,6 +297,14 @@ void Dialogs::ShowFileInfo()
     wxTheApp->AddPendingEvent( event );\r
 }\r
 \r
+void Dialogs::ShowPopup()\r
+{\r
+    wxCommandEvent event( wxEVT_DIALOG, ShowPopup_Event );\r
+    event.SetClientData( this );\r
+\r
+    wxTheApp->AddPendingEvent( event );\r
+}\r
+\r
 void Dialogs::OnShowOpen( wxCommandEvent& event )\r
 {\r
     Dialogs *p_dialogs = (Dialogs *)event.GetClientData();\r
@@ -417,10 +425,7 @@ int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
     Dialogs *p_dialogs = (Dialogs *)param;\r
 \r
 #ifndef BASIC_SKINS\r
-    wxCommandEvent event( wxEVT_DIALOG, ShowPopup_Event );\r
-    event.SetClientData( p_dialogs );\r
-\r
-    wxTheApp->AddPendingEvent( event );\r
+    p_dialogs->ShowPopup();\r
 #endif // BASIC_SKINS\r
 \r
     return VLC_SUCCESS;\r
index d5a99ab67b5a70bee23ceb224b6212f739160d4a..7d225e4bf4bd660cb34936cc53811b6316ef5b24 100644 (file)
@@ -2,7 +2,7 @@
  * dialogs.h: Dialogs class\r
  *****************************************************************************\r
  * Copyright (C) 2003 VideoLAN\r
- * $Id: dialogs.h,v 1.3 2003/06/05 21:22:27 gbazin Exp $\r
+ * $Id: dialogs.h,v 1.4 2003/06/08 16:56:48 gbazin Exp $\r
  *\r
  * Authors: Gildas Bazin <gbazin@netcourrier.com>\r
  *\r
@@ -76,6 +76,7 @@ class Dialogs
         void ShowMessages();\r
         void ShowPrefs();\r
         void ShowFileInfo();\r
+        void ShowPopup();\r
 \r
         vlc_bool_t b_popup_change;\r
 \r
index a90cd8d823e0ddd3922ef84bc355e1c2f0f7d8b0..8c8a636b5a89c22b7899cfa4e55039eb2bc8b5c5 100644 (file)
@@ -2,7 +2,7 @@
  * skin-main.cpp: skins plugin for VLC
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: skin_main.cpp,v 1.33 2003/06/06 23:34:35 asmax Exp $
+ * $Id: skin_main.cpp,v 1.34 2003/06/08 16:56:48 gbazin Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -248,6 +248,7 @@ static void Run( intf_thread_t *p_intf )
         {
             // Last chance: the user can  select a new theme file
 #ifndef BASIC_SKINS
+            wxMutexGuiEnter();
             wxFileDialog dialog( NULL,
                 wxU(_("Open a skin file")), wxT(""), wxT(""),
                 wxT("Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|"
@@ -260,13 +261,18 @@ static void Run( intf_thread_t *p_intf )
                 {
                     // He, he, what the hell is he doing ?
                     delete Loader;
+                    wxMutexGuiLeave();
                     return;
                 }
+                wxMutexGuiLeave();
             }
             else
 #endif
             {
                 delete Loader;
+#ifndef BASIC_SKINS
+                wxMutexGuiLeave();
+#endif
                 return;
             }
         }
index e1b36c7c97fb531ed9b73029cbf8170afc57743e..58060d22512a37d70a5d32e5379a4c63508a3367 100644 (file)
@@ -2,7 +2,7 @@
  * themeloader.cpp: ThemeLoader class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: themeloader.cpp,v 1.12 2003/06/06 14:50:49 gbazin Exp $
+ * $Id: themeloader.cpp,v 1.13 2003/06/08 16:56:48 gbazin Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -156,6 +156,8 @@ bool ThemeLoader::Extract( const string FileName )
 
     if( ! Parse( TempPath + DIRECTORY_SEPARATOR + string( DEFAULT_XML_FILE ) ) )
     {
+        msg_Err( p_intf, "%s doesn't contain a " DEFAULT_XML_FILE " file",
+                 FileName.c_str() );
         DeleteTempFiles( TempPath );
         return false;
     }
index c1c4cbf692b8baa38573d92f9463eaf73752db2e..c4b775fa4a4e818a237a71fc47dae2b7cdb6c4c1 100644 (file)
@@ -2,7 +2,7 @@
  * window.cpp: Window class
  *****************************************************************************
  * Copyright (C) 2003 VideoLAN
- * $Id: window.cpp,v 1.25 2003/05/31 23:23:59 ipkiss Exp $
+ * $Id: window.cpp,v 1.26 2003/06/08 16:56:48 gbazin Exp $
  *
  * Authors: Olivier Teulière <ipkiss@via.ecp.fr>
  *          Emmanuel Puig    <karibu@via.ecp.fr>
@@ -38,6 +38,7 @@
 #include "banks.h"
 #include "theme.h"
 #include "skin_common.h"
+#include "dialogs.h"
 
 #include <stdio.h>
 
@@ -418,6 +419,11 @@ void SkinWindow::MouseUp( int x, int y, int button )
             break;
         }
     }
+
+    if( i < 0  && button == 2 )
+    {
+        p_intf->p_sys->p_dialogs->ShowPopup();
+    }
 }
 //---------------------------------------------------------------------------
 void SkinWindow::MouseDblClick( int x, int y, int button )