~ubuntu-branches/debian/sid/xfce4-indicator-plugin/sid

« back to all changes in this revision

Viewing changes to debian/patches/attach_button_to_menu_right_at_the_beginning.patch

  • Committer: Package Import Robot
  • Author(s): Evgeni Golov
  • Date: 2011-09-04 22:43:47 UTC
  • Revision ID: package-import@ubuntu.com-20110904224347-dcobn77bfb0zmh99
Tags: 0.3.1-2
Add fix_menu_position.patch and 
attach_button_to_menu_right_at_the_beginning.patch
as suggested by upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
5
 
 
6
---
 
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
 
12
   {
 
13
     if( event->button == 1) /* left click only */
 
14
     {
 
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 ());
 
21
       
 
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));
 
24
 
 
25
   if (entry->menu != NULL)
 
26
+  {
 
27
     g_object_set_data(G_OBJECT(button), "menu", entry->menu);
 
28
+    gtk_menu_attach_to_widget(entry->menu, button, NULL);
 
29
+  }
 
30
 
 
31
   g_signal_connect(button, "button-press-event", G_CALLBACK(on_button_press),
 
32
                    user_data);
 
33
--
 
34
cgit