Commit 5e0a04ba authored by Gildas Bazin's avatar Gildas Bazin

* modules/gui/skins/*: display the popupmenu when you right click on the interface.
parent 4d7eeeb1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dialogs.cpp: Handles all the different dialog boxes we provide. * dialogs.cpp: Handles all the different dialog boxes we provide.
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: dialogs.cpp,v 1.3 2003/06/05 21:22:27 gbazin Exp $ * $Id: dialogs.cpp,v 1.4 2003/06/08 16:56:48 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -297,6 +297,14 @@ void Dialogs::ShowFileInfo() ...@@ -297,6 +297,14 @@ void Dialogs::ShowFileInfo()
wxTheApp->AddPendingEvent( event ); wxTheApp->AddPendingEvent( event );
} }
void Dialogs::ShowPopup()
{
wxCommandEvent event( wxEVT_DIALOG, ShowPopup_Event );
event.SetClientData( this );
wxTheApp->AddPendingEvent( event );
}
void Dialogs::OnShowOpen( wxCommandEvent& event ) void Dialogs::OnShowOpen( wxCommandEvent& event )
{ {
Dialogs *p_dialogs = (Dialogs *)event.GetClientData(); Dialogs *p_dialogs = (Dialogs *)event.GetClientData();
...@@ -417,10 +425,7 @@ int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable, ...@@ -417,10 +425,7 @@ int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
Dialogs *p_dialogs = (Dialogs *)param; Dialogs *p_dialogs = (Dialogs *)param;
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
wxCommandEvent event( wxEVT_DIALOG, ShowPopup_Event ); p_dialogs->ShowPopup();
event.SetClientData( p_dialogs );
wxTheApp->AddPendingEvent( event );
#endif // BASIC_SKINS #endif // BASIC_SKINS
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* dialogs.h: Dialogs class * dialogs.h: Dialogs class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: dialogs.h,v 1.3 2003/06/05 21:22:27 gbazin Exp $ * $Id: dialogs.h,v 1.4 2003/06/08 16:56:48 gbazin Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -76,6 +76,7 @@ class Dialogs ...@@ -76,6 +76,7 @@ class Dialogs
void ShowMessages(); void ShowMessages();
void ShowPrefs(); void ShowPrefs();
void ShowFileInfo(); void ShowFileInfo();
void ShowPopup();
vlc_bool_t b_popup_change; vlc_bool_t b_popup_change;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* skin-main.cpp: skins plugin for VLC * skin-main.cpp: skins plugin for VLC
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * 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 Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -248,6 +248,7 @@ static void Run( intf_thread_t *p_intf ) ...@@ -248,6 +248,7 @@ static void Run( intf_thread_t *p_intf )
{ {
// Last chance: the user can select a new theme file // Last chance: the user can select a new theme file
#ifndef BASIC_SKINS #ifndef BASIC_SKINS
wxMutexGuiEnter();
wxFileDialog dialog( NULL, wxFileDialog dialog( NULL,
wxU(_("Open a skin file")), wxT(""), wxT(""), wxU(_("Open a skin file")), wxT(""), wxT(""),
wxT("Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|" wxT("Skin files (*.vlt)|*.vlt|Skin files (*.xml)|*.xml|"
...@@ -260,13 +261,18 @@ static void Run( intf_thread_t *p_intf ) ...@@ -260,13 +261,18 @@ static void Run( intf_thread_t *p_intf )
{ {
// He, he, what the hell is he doing ? // He, he, what the hell is he doing ?
delete Loader; delete Loader;
wxMutexGuiLeave();
return; return;
} }
wxMutexGuiLeave();
} }
else else
#endif #endif
{ {
delete Loader; delete Loader;
#ifndef BASIC_SKINS
wxMutexGuiLeave();
#endif
return; return;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* themeloader.cpp: ThemeLoader class * themeloader.cpp: ThemeLoader class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * 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 Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -156,6 +156,8 @@ bool ThemeLoader::Extract( const string FileName ) ...@@ -156,6 +156,8 @@ bool ThemeLoader::Extract( const string FileName )
if( ! Parse( TempPath + DIRECTORY_SEPARATOR + string( DEFAULT_XML_FILE ) ) ) 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 ); DeleteTempFiles( TempPath );
return false; return false;
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* window.cpp: Window class * window.cpp: Window class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * 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 Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "banks.h" #include "banks.h"
#include "theme.h" #include "theme.h"
#include "skin_common.h" #include "skin_common.h"
#include "dialogs.h"
#include <stdio.h> #include <stdio.h>
...@@ -418,6 +419,11 @@ void SkinWindow::MouseUp( int x, int y, int button ) ...@@ -418,6 +419,11 @@ void SkinWindow::MouseUp( int x, int y, int button )
break; break;
} }
} }
if( i < 0 && button == 2 )
{
p_intf->p_sys->p_dialogs->ShowPopup();
}
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
void SkinWindow::MouseDblClick( int x, int y, int button ) void SkinWindow::MouseDblClick( int x, int y, int button )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment