mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
Make right-clicks not pop up the menu.
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.
This commit is contained in:
parent
b8663e868f
commit
b39b0bfc04
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user