[gtk+/wip/dboles/combobox-events: 1/3] combobox—Remove useless button-press-event handler
- From: Daniel Boles <dboles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/dboles/combobox-events: 1/3] combobox—Remove useless button-press-event handler
- Date: Thu, 16 Feb 2017 21:04:07 +0000 (UTC)
commit f1a42b2d9242e42be464ca29f543449e7a5131ad
Author: Daniel Boles <dboles src gnome org>
Date: Thu Feb 16 20:36:36 2017 +0000
combobox—Remove useless button-press-event handler
We use toggled, which does everything we need; this adds nothing useful.
gtk/gtkcombobox.c | 26 --------------------------
gtk/ui/gtkcombobox.ui | 1 -
2 files changed, 0 insertions(+), 27 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 8b67b39..3bb5d8c 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -286,9 +286,6 @@ static void gtk_combo_box_model_row_changed (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data);
-static gboolean gtk_combo_box_menu_button_press (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data);
static void gtk_combo_box_menu_activate (GtkWidget *menu,
const gchar *path,
GtkComboBox *combo_box);
@@ -971,7 +968,6 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkComboBox, area);
gtk_widget_class_bind_template_child_internal_private (widget_class, GtkComboBox, popup_widget);
gtk_widget_class_bind_template_callback (widget_class, gtk_combo_box_button_toggled);
- gtk_widget_class_bind_template_callback (widget_class, gtk_combo_box_menu_button_press);
gtk_widget_class_bind_template_callback (widget_class, gtk_combo_box_menu_activate);
gtk_widget_class_bind_template_callback (widget_class, gtk_combo_box_menu_key_press);
gtk_widget_class_bind_template_callback (widget_class, gtk_combo_box_menu_show);
@@ -1977,28 +1973,6 @@ gtk_combo_box_scroll_event (GtkWidget *widget,
}
/* callbacks */
-static gboolean
-gtk_combo_box_menu_button_press (GtkWidget *widget,
- GdkEventButton *event,
- gpointer user_data)
-{
- GtkComboBox *combo_box = GTK_COMBO_BOX (user_data);
- GtkComboBoxPrivate *priv = combo_box->priv;
-
- if (event->type == GDK_BUTTON_PRESS && event->button == GDK_BUTTON_PRIMARY)
- {
- if (gtk_widget_get_focus_on_click (GTK_WIDGET (combo_box)) &&
- !gtk_widget_has_focus (priv->button))
- gtk_widget_grab_focus (priv->button);
-
- gtk_combo_box_menu_popup (combo_box, (const GdkEvent *) event);
-
- return TRUE;
- }
-
- return FALSE;
-}
-
static void
gtk_combo_box_menu_activate (GtkWidget *menu,
const gchar *path,
diff --git a/gtk/ui/gtkcombobox.ui b/gtk/ui/gtkcombobox.ui
index a3126c8..09f7e4e 100644
--- a/gtk/ui/gtkcombobox.ui
+++ b/gtk/ui/gtkcombobox.ui
@@ -22,7 +22,6 @@
</child>
</object>
</child>
- <signal name="button-press-event" handler="gtk_combo_box_menu_button_press" swapped="no" />
</object>
<packing>
<property name="pack-type">end</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]