summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--gtk/gtkmenutoolbutton.c18
4 files changed, 30 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index dfe5f80012..8a1aab5b1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Mar 18 23:59:49 2005 Soeren Sandmann <sandmann@redhat.com>
+
+ * gtk/gtkmenutoolbutton.c (arrow_button_button_press_event_cb):
+ Make right-clicks not pop up the menu.
+
2005-03-18 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_finish):
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index dfe5f80012..8a1aab5b1f 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+Fri Mar 18 23:59:49 2005 Soeren Sandmann <sandmann@redhat.com>
+
+ * gtk/gtkmenutoolbutton.c (arrow_button_button_press_event_cb):
+ Make right-clicks not pop up the menu.
+
2005-03-18 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_finish):
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index dfe5f80012..8a1aab5b1f 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
+Fri Mar 18 23:59:49 2005 Soeren Sandmann <sandmann@redhat.com>
+
+ * gtk/gtkmenutoolbutton.c (arrow_button_button_press_event_cb):
+ Make right-clicks not pop up the menu.
+
2005-03-18 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkdrawable-x11.c (_gdk_x11_drawable_finish):
diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c
index ad6932630f..7881d99d75 100644
--- a/gtk/gtkmenutoolbutton.c
+++ b/gtk/gtkmenutoolbutton.c
@@ -261,6 +261,9 @@ button_state_changed_cb (GtkWidget *widget,
GtkWidget *other;
GtkStateType state = GTK_WIDGET_STATE (widget);
+ if (state == GTK_STATE_INSENSITIVE)
+ return;
+
priv = GTK_MENU_TOOL_BUTTON_GET_PRIVATE (button);
other = (widget == priv->arrow_button) ? priv->button : priv->arrow_button;
@@ -381,10 +384,17 @@ arrow_button_button_press_event_cb (GtkWidget *widget,
GdkEventButton *event,
GtkMenuToolButton *button)
{
- popup_menu_under_arrow (button, event);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
+ if (event->button == 1)
+ {
+ popup_menu_under_arrow (button, event);
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
- return TRUE;
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
}
static void
@@ -426,10 +436,12 @@ gtk_menu_tool_button_init (GtkMenuToolButton *button)
button->priv->arrow_button = arrow_button;
button->priv->box = box;
+#if 0
g_signal_connect (real_button, "state_changed",
G_CALLBACK (button_state_changed_cb), button);
g_signal_connect (arrow_button, "state_changed",
G_CALLBACK (button_state_changed_cb), button);
+#endif
g_signal_connect (arrow_button, "toggled",
G_CALLBACK (arrow_button_toggled_cb), button);
g_signal_connect (arrow_button, "button_press_event",