[MPlayer-cvslog] r38035 - in trunk/gui: app/app.h ui/actions.c ui/main.c ui/playbar.c ui/video.c

ib subversion at mplayerhq.hu
Wed Apr 4 00:53:17 EEST 2018


Author: ib
Date: Wed Apr  4 00:53:17 2018
New Revision: 38035

Log:
Introduce enumeration constants for the different window types.

Utilize these constants to be able to identify the window
the (pop-up) menu originates from.

Modified:
   trunk/gui/app/app.h
   trunk/gui/ui/actions.c
   trunk/gui/ui/main.c
   trunk/gui/ui/playbar.c
   trunk/gui/ui/video.c

Modified: trunk/gui/app/app.h
==============================================================================
--- trunk/gui/app/app.h	Tue Apr  3 19:57:08 2018	(r38034)
+++ trunk/gui/app/app.h	Wed Apr  4 00:53:17 2018	(r38035)
@@ -95,6 +95,14 @@ typedef struct {
     const char *name;
 } evName;
 
+/// Window types
+enum {
+    wMain,
+    wVideo,
+    wPlaybar,
+    wMenu
+};
+
 /// Skin items
 enum {
     itNone,

Modified: trunk/gui/ui/actions.c
==============================================================================
--- trunk/gui/ui/actions.c	Tue Apr  3 19:57:08 2018	(r38034)
+++ trunk/gui/ui/actions.c	Wed Apr  4 00:53:17 2018	(r38035)
@@ -369,7 +369,7 @@ play:
          * gtkShow( ivHidePopUpMenu,NULL );            with this menu from skin as
          * uiMenuShow( 0,0 );                          they do with normal menus.
          * }
-         * else*/gtkShow(ivShowPopUpMenu, NULL);
+         * else*/gtkShow(ivShowPopUpMenu, (void *)wMain);
         break;
 
     case evIconify:

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Tue Apr  3 19:57:08 2018	(r38034)
+++ trunk/gui/ui/main.c	Wed Apr  4 00:53:17 2018	(r38035)
@@ -177,7 +177,7 @@ static void uiMainMouse( int Button,int
           break;
 
    case wsRRMouseButton:
-        gtkShow( ivShowPopUpMenu,NULL );
+        gtkShow( ivShowPopUpMenu, (void *) wMain );
         break;
 
 /* rolled mouse ... de szar :))) */

Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c	Tue Apr  3 19:57:08 2018	(r38034)
+++ trunk/gui/ui/playbar.c	Wed Apr  4 00:53:17 2018	(r38035)
@@ -147,7 +147,7 @@ static void uiPlaybarMouse( int Button,
         uiMenuHide( RX,RY,0 );
         break;
    case wsRRMouseButton:
-        gtkShow( ivShowPopUpMenu,NULL );
+        gtkShow( ivShowPopUpMenu, (void *) wPlaybar );
         break;
 /* --- */
    case wsPLMouseButton:

Modified: trunk/gui/ui/video.c
==============================================================================
--- trunk/gui/ui/video.c	Tue Apr  3 19:57:08 2018	(r38034)
+++ trunk/gui/ui/video.c	Wed Apr  4 00:53:17 2018	(r38035)
@@ -63,7 +63,7 @@ static void uiVideoMouse( int Button,int
  switch( Button )
   {
    case wsRRMouseButton:
-          gtkShow( ivShowPopUpMenu,NULL );
+          gtkShow( ivShowPopUpMenu, (void *) wVideo );
           break;
    case wsPMMouseButton:
           gtkShow( ivHidePopUpMenu,NULL );


More information about the MPlayer-cvslog mailing list