1
From defca954a995cba535ece42ae2a890ea0fdb3f10 Mon Sep 17 00:00:00 2001
2
From: Mark Trompell <mark@foresightlinux.org>
3
Date: Tue, 19 Jul 2011 07:00:00 +0000
4
Subject: attach button to menu right at the beginning
7
diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c
8
index 4468a52..613c1a5 100644
9
--- a/panel-plugin/indicator.c
10
+++ b/panel-plugin/indicator.c
11
@@ -163,9 +163,7 @@ on_button_press (GtkWidget *widget, GdkEventButton *event, IndicatorPlugin *indi
13
if( event->button == 1) /* left click only */
15
- GtkMenu * menu = GTK_MENU(g_object_get_data (G_OBJECT(widget),"menu"));
16
- gtk_menu_attach_to_widget(menu, widget, NULL);
17
- gtk_menu_popup (menu, NULL, NULL,
18
+ gtk_menu_popup (GTK_MENU(g_object_get_data (G_OBJECT(widget),"menu")), NULL, NULL,
19
xfce_panel_plugin_position_menu,
20
indicator->plugin, 1, gtk_get_current_event_time ());
22
@@ -234,7 +232,10 @@ entry_added (IndicatorObject * io, IndicatorObjectEntry * entry, gpointer user_d
23
gtk_button_set_label(GTK_BUTTON(button), gtk_label_get_label (entry->label));
25
if (entry->menu != NULL)
27
g_object_set_data(G_OBJECT(button), "menu", entry->menu);
28
+ gtk_menu_attach_to_widget(entry->menu, button, NULL);
31
g_signal_connect(button, "button-press-event", G_CALLBACK(on_button_press),