changeset 34458:1e84148527ab

Add user event evMenu. (Unless the skin definable menu can't be properly handled with mouse over and cursor keys, only the default menu will show up.)
author ib
date Thu, 12 Jan 2012 14:21:55 +0000
parents 220497708307
children a45b07efa3b8
files DOCS/xml/de/skin.xml DOCS/xml/en/skin.xml gui/app.c gui/app.h gui/interface.c gui/ui/main.c gui/win32/skinload.c gui/win32/skinload.h
diffstat 8 files changed, 30 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/DOCS/xml/de/skin.xml	Thu Jan 12 13:36:20 2012 +0000
+++ b/DOCS/xml/de/skin.xml	Thu Jan 12 14:21:55 2012 +0000
@@ -1301,6 +1301,15 @@
       </varlistentry>
 
       <varlistentry>
+        <term><emphasis role="bold">evMenu</emphasis></term>
+        <listitem>
+          <para>
+            Öffne das (Standard-)Menü.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
         <term><emphasis role="bold">evIconify</emphasis></term>
         <listitem>
           <para>
--- a/DOCS/xml/en/skin.xml	Thu Jan 12 13:36:20 2012 +0000
+++ b/DOCS/xml/en/skin.xml	Thu Jan 12 14:21:55 2012 +0000
@@ -1101,6 +1101,13 @@
 </varlistentry>
 
 <varlistentry>
+  <term><emphasis role="bold">evMenu</emphasis></term>
+  <listitem><para>
+  Open the (default) menu.
+  </para></listitem>
+</varlistentry>
+
+<varlistentry>
   <term><emphasis role="bold">evIconify</emphasis></term>
   <listitem><para>
   Iconify the window.
--- a/gui/app.c	Thu Jan 12 13:36:20 2012 +0000
+++ b/gui/app.c	Thu Jan 12 14:21:55 2012 +0000
@@ -79,6 +79,7 @@
     { evAbout,             "evAbout"             },
     { evPreferences,       "evPreferences"       },
     { evSkinBrowser,       "evSkinBrowser"       },
+    { evMenu,              "evMenu"              },
     { evIconify,           "evIconify"           },
     { evExit,              "evExit"              }
 };
--- a/gui/app.h	Thu Jan 12 13:36:20 2012 +0000
+++ b/gui/app.h	Thu Jan 12 14:21:55 2012 +0000
@@ -68,6 +68,7 @@
 #define evAbout             12
 #define evPreferences       14
 #define evSkinBrowser       15
+#define evMenu              33
 
 #define evIconify           11
 #define evExit              1000
--- a/gui/interface.c	Thu Jan 12 13:36:20 2012 +0000
+++ b/gui/interface.c	Thu Jan 12 14:21:55 2012 +0000
@@ -383,7 +383,7 @@
     case GUI_RUN_MESSAGE:
         mp_msg(MSGT_GPLAYER, MSGL_DBG2, "[interface] GUI_RUN_MESSAGE: %s\n", (const char *)data);
         msg = appFindMessage((const char *)data);
-        if (appFindItem(msg))
+        if ((msg == evMenu) || appFindItem(msg))
             uiEventHandling(msg, 0);
         break;
 
--- a/gui/ui/main.c	Thu Jan 12 13:36:20 2012 +0000
+++ b/gui/ui/main.c	Thu Jan 12 14:21:55 2012 +0000
@@ -325,6 +325,15 @@
         break;
 
 
+   case evMenu:
+        /*if (guiApp.menuIsPresent)   NOTE TO MYSELF: Not before mouse over and
+         {                                            cursor keys will work there.
+          gtkShow( ivHidePopUpMenu,NULL );
+          uiShowMenu( 0,0 );
+         }
+        else*/ gtkShow( ivShowPopUpMenu,NULL );
+        break;
+
    case evIconify:
         switch ( iparam )
          {
--- a/gui/win32/skinload.c	Thu Jan 12 13:36:20 2012 +0000
+++ b/gui/win32/skinload.c	Thu Jan 12 14:21:55 2012 +0000
@@ -85,6 +85,7 @@
     {   evAbout,                "evAbout"               },
     {   evPreferences,          "evPreferences"         },
     {   evSkinBrowser,          "evSkinBrowser"         },
+    {   evMenu,                 "evMenu"                },
     {   evIconify,              "evIconify"             },
     {   evExit,                 "evExit"                }
 };
--- a/gui/win32/skinload.h	Thu Jan 12 13:36:20 2012 +0000
+++ b/gui/win32/skinload.h	Thu Jan 12 14:21:55 2012 +0000
@@ -175,6 +175,7 @@
 #define evAbout             12
 #define evPreferences       14
 #define evSkinBrowser       15
+#define evMenu              33
 
 #define evIconify           11
 #define evExit              1000