File FATE_301986.patch of Package gnome-main-menu

Index: gnome-main-menu-0.9.11/main-menu/etc/Makefile.am
===================================================================
--- gnome-main-menu-0.9.11.orig/main-menu/etc/Makefile.am
+++ gnome-main-menu-0.9.11/main-menu/etc/Makefile.am
@@ -10,7 +10,7 @@ uidir   = $(datadir)/gnome-2.0/ui
 ui_DATA = GNOME_MainMenu_ContextMenu.xml
 
 desktopdir   = $(datadir)/applications
-desktop_DATA = gnome-screensaver-lock.desktop gnome-session-kill.desktop
+desktop_DATA = gnome-screensaver-lock.desktop gnome-session-kill.desktop trigger-panel-run-dialog.desktop
 @INTLTOOL_DESKTOP_RULE@
 
 bookmarkdir = $(datadir)/gnome-main-menu
Index: gnome-main-menu-0.9.11/main-menu/src/Makefile.am
===================================================================
--- gnome-main-menu-0.9.11.orig/main-menu/src/Makefile.am
+++ gnome-main-menu-0.9.11/main-menu/src/Makefile.am
@@ -8,6 +8,8 @@ glade_DATA = slab-window.glade
 
 libexec_PROGRAMS = main-menu
 
+bin_PROGRAMS = trigger-panel-run-dialog
+
 AM_CPPFLAGS =								\
 	$(GLADE_CFLAGS)							\
 	-DDATADIR=\""$(datadir)"\"					\
@@ -30,4 +32,10 @@ main_menu_LDADD =							\
 	$(GLADE_LIBS)							\
 	$(top_builddir)/libslab/libslab.la
 
+trigger_panel_run_dialog_SOURCES =					\
+	trigger-panel-run-dialog.c
+
+trigger_panel_run_dialog_LDADD =					\
+	$(MAIN_MENU_LIBS)
+
 EXTRA_DIST = $(glade_DATA)
Index: gnome-main-menu-0.9.11/main-menu/etc/trigger-panel-run-dialog.desktop
===================================================================
--- /dev/null
+++ gnome-main-menu-0.9.11/main-menu/etc/trigger-panel-run-dialog.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Run Application
+Comment=Show the "Run Application" panel app
+Exec=trigger-panel-run-dialog
+Terminal=false
+Type=Application
+Icon=system-run
+Hidden=true
+Categories=System;SystemSetup;
+OnlyShowIn=GNOME;
+StartupNotify=true
Index: gnome-main-menu-0.9.11/main-menu/src/trigger-panel-run-dialog.c
===================================================================
--- /dev/null
+++ gnome-main-menu-0.9.11/main-menu/src/trigger-panel-run-dialog.c
@@ -0,0 +1,62 @@
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+#include <X11/Xlib.h>
+
+static void
+run_dialog (GdkDisplay *display, GdkScreen  *screen, guint32 timestamp)
+{
+	Atom action_atom;
+	Atom atom;
+	Window root;
+	XClientMessageEvent ev;
+	
+	if (!display)
+		display = gdk_display_get_default ();
+	if (!screen)
+		screen = gdk_display_get_default_screen (display);
+	root = GDK_WINDOW_XWINDOW (gdk_screen_get_root_window (screen));
+	
+	action_atom = gdk_x11_get_xatom_by_name_for_display (display, "_GNOME_PANEL_ACTION");
+	atom = gdk_x11_get_xatom_by_name_for_display (display, "_GNOME_PANEL_ACTION_RUN_DIALOG");
+	
+	ev.type = ClientMessage;
+	ev.window = root;
+	ev.message_type = action_atom;
+	ev.format = 32;
+	ev.data.l[0] = atom;
+	ev.data.l[1] = timestamp;
+	
+	gdk_error_trap_push ();
+	
+	XSendEvent (gdk_x11_display_get_xdisplay (display),
+			root, False, StructureNotifyMask, (XEvent*) &ev);
+	
+	gdk_flush ();
+	gdk_error_trap_pop ();
+}
+
+int
+main (int argc, char **argv)
+{
+	gint lastentry = 0;
+	guint32 timestamp;
+	
+	const gchar* startup_id = g_getenv ("DESKTOP_STARTUP_ID");
+	//printf ("startup id is %s\n", startup_id);
+	if (startup_id && (startup_id[0] != '\0'))
+	{
+		gchar **results = g_strsplit (startup_id, "_TIME", 0);
+		while (results[lastentry] != NULL)
+			lastentry++;
+		timestamp = (guint32) g_strtod (results[lastentry - 1], NULL);
+		g_strfreev (results);
+	}
+	else
+		timestamp = GDK_CURRENT_TIME;
+	
+	gdk_init (&argc, &argv);
+	run_dialog (NULL, NULL, timestamp);
+	gdk_notify_startup_complete ();
+	
+	return 0;
+}