diff options
-rw-r--r-- | Gui/mplayer/gtk/menu.c | 7 | ||||
-rw-r--r-- | Gui/mplayer/psignal.c | 7 | ||||
-rw-r--r-- | Gui/mplayer/sw.h | 7 | ||||
-rw-r--r-- | Gui/mplayer/widgets.c | 2 | ||||
-rw-r--r-- | Gui/mplayer/widgets.h | 2 |
5 files changed, 20 insertions, 5 deletions
diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c index b79ec363d4..d62b7c8f97 100644 --- a/Gui/mplayer/gtk/menu.c +++ b/Gui/mplayer/gtk/menu.c @@ -10,6 +10,7 @@ void ActivateMenuItem( int Item ) { // fprintf( stderr,"[menu] item: %d\n",Item ); gtkShMem->popupmenu=Item; + gtkShMem->visiblepopupmenu=0; gtkSendMessage( evShowPopUpMenu ); } @@ -52,6 +53,7 @@ GtkWidget * AddSeparator( GtkWidget * Menu ) } GtkWidget * DVDSubMenu; +GtkWidget * DVDTitleMenu; GtkWidget * DVDAudioLanguageMenu; GtkWidget * DVDSubtitleLanguageMenu; @@ -68,7 +70,7 @@ GtkWidget * create_PopUpMenu( void ) SubMenu=AddSubMenu( Menu,"Open ..." ); AddMenuItem( SubMenu,"Play file ..."" ", evLoadPlay ); AddMenuItem( SubMenu,"Play VCD ...", evNone ); - AddMenuItem( SubMenu,"Play DVD ...", evNone ); + AddMenuItem( SubMenu,"Play DVD ...", evPlayDVD ); AddMenuItem( SubMenu,"Play URL ...", evNone ); AddMenuItem( SubMenu,"Load subtitle ... ", evLoadSubtitle ); SubMenu=AddSubMenu( Menu,"Playing" ); @@ -89,9 +91,10 @@ GtkWidget * create_PopUpMenu( void ) AddMenuItem( SubMenu,"Double size", evDoubleSize ); AddMenuItem( SubMenu,"Fullscreen", evFullScreen ); DVDSubMenu=AddSubMenu( Menu,"DVD" ); - AddMenuItem( DVDSubMenu,"Play disc ..."" ", evNone ); + AddMenuItem( DVDSubMenu,"Play disc ..."" ", evPlayDVD ); AddMenuItem( DVDSubMenu,"Show DVD Menu", evNone ); AddSeparator( DVDSubMenu ); + DVDTitleMenu=AddSubMenu( DVDSubMenu,"Titles" ); DVDAudioLanguageMenu=AddSubMenu( DVDSubMenu,"Audio language" ); DVDSubtitleLanguageMenu=AddSubMenu( DVDSubMenu,"Subtitle language" ); AddSeparator( Menu ); diff --git a/Gui/mplayer/psignal.c b/Gui/mplayer/psignal.c index 4bb30bbd35..3c5caca9fd 100644 --- a/Gui/mplayer/psignal.c +++ b/Gui/mplayer/psignal.c @@ -128,7 +128,14 @@ void gtkSigHandler( int s ) break; case evShowPopUpMenu: gtkShMem->popupmenu=evNone; + if ( gtkShMem->visiblepopupmenu ) gtk_widget_hide_on_delete( PopUpMenu ); + PopUpMenu=create_PopUpMenu(); gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 ); + gtkShMem->visiblepopupmenu=1; + break; + case evHidePopUpMenu: + if ( gtkShMem->visiblepopupmenu ) gtk_widget_hide_on_delete( PopUpMenu ); + gtkShMem->visiblepopupmenu=0; break; } gtkShMem->message=0; diff --git a/Gui/mplayer/sw.h b/Gui/mplayer/sw.h index 85a95e1ff0..9f2baa2a80 100644 --- a/Gui/mplayer/sw.h +++ b/Gui/mplayer/sw.h @@ -32,13 +32,15 @@ void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) mplMouseTimer=mplMouseTimerConst; wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor ); + switch( Button ) { case wsPMMouseButton: - gtkSendMessage( evShowPopUpMenu ); - break; + gtkSendMessage( evShowPopUpMenu ); + break; case wsPRMouseButton: + if ( gtkShMem->visiblepopupmenu ) gtkSendMessage( evHidePopUpMenu ); mplShowMenu( RX,RY ); msButton=wsPRMouseButton; break; @@ -48,6 +50,7 @@ void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) break; // --- case wsPLMouseButton: + if ( gtkShMem->visiblepopupmenu ) gtkSendMessage( evHidePopUpMenu ); sx=X; sy=Y; msButton=wsPLMouseButton; mplSubMoved=0; diff --git a/Gui/mplayer/widgets.c b/Gui/mplayer/widgets.c index f10726e920..0115a85442 100644 --- a/Gui/mplayer/widgets.c +++ b/Gui/mplayer/widgets.c @@ -59,7 +59,7 @@ void widgetsCreate( void ) FileSelect=create_FileSelect(); MessageBox=create_MessageBox(0); Options=create_Options(); - PopUpMenu=create_PopUpMenu(); +// PopUpMenu=create_PopUpMenu(); } // --- forked function diff --git a/Gui/mplayer/widgets.h b/Gui/mplayer/widgets.h index 86c67e2e30..d3ac651ba0 100644 --- a/Gui/mplayer/widgets.h +++ b/Gui/mplayer/widgets.h @@ -52,7 +52,9 @@ typedef struct gtkSkinStruct sb; gtkVisibleStruct vs; gtkOptionsStruct op; + int popupmenu; + int visiblepopupmenu; } gtkCommStruct; extern gtkCommStruct * gtkShMem; |