diff src/skins/ui_main.c @ 3110:a522493de76e

Set up a hook_call for showing the main menu, since it's implemented in a plugin now (fixes #38).
author John Lindgren <john.lindgren@tds.net>
date Sat, 02 May 2009 11:16:23 -0400
parents 5b59df43b93f
children d4c3a48f1d92
line wrap: on
line diff
--- a/src/skins/ui_main.c	Fri May 01 12:28:48 2009 -0500
+++ b/src/skins/ui_main.c	Sat May 02 11:16:23 2009 -0400
@@ -329,9 +329,16 @@
     return TRUE;
 }
 
+static void show_main_menu (GdkEventButton * event, void * unused)
+{
+    ui_manager_popup_menu_show ((GtkMenu *) mainwin_general_menu, event->x_root,
+     event->y_root, event->button, event->time);
+}
+
 static void
 mainwin_destroy(GtkWidget * widget, gpointer data)
 {
+    aud_hook_dissociate ("show main menu", (HookFunction) show_main_menu);
     mainwin_quit_cb();
 }
 
@@ -2367,6 +2374,7 @@
     gtk_window_add_accel_group( GTK_WINDOW(mainwin) , ui_manager_get_accel_group() );
 
     mainwin_create_widgets();
+    aud_hook_associate ("show main menu", (HookFunction) show_main_menu, 0);
 }
 
 gboolean
@@ -2795,12 +2803,3 @@
 {
     mainwin_quit_cb();
 }
-
-void
-util_menu_main_show( gint x , gint y , guint button , guint time )
-{
-    /* convenience function that shows the main popup menu wherever requested */
-    ui_manager_popup_menu_show( GTK_MENU(mainwin_general_menu),
-                                x , y , button , time );
-    return;
-}