summaryrefslogtreecommitdiff
path: root/gtk/gtkcombobox.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2009-12-04 02:15:00 +0100
committerJavier Jardón <jjardon@gnome.org>2009-12-04 02:50:57 +0100
commit325bd9299aaf05f18138c7e5f490a9bf9e1ce00a (patch)
tree7c654f496c72f673ccb1758d716d48a96c7df3f3 /gtk/gtkcombobox.c
parent46f5ee1d0c0f4601853ed57e99b1b513f1baa445 (diff)
downloadgtk+-325bd9299aaf05f18138c7e5f490a9bf9e1ce00a.tar.gz
Use GtkCellEditable::editing-canceled
GtkCellEditable::editing-canceled property was added in 2.19 cycle, so we should make the code that currently uses entry->editing_canceled directly go through the property Fixes https://bugzilla.gnome.org/show_bug.cgi?id=599213
Diffstat (limited to 'gtk/gtkcombobox.c')
-rw-r--r--gtk/gtkcombobox.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index ebe90d9fa2..666cb7fb00 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -3198,7 +3198,9 @@ gtk_combo_box_menu_item_activate (GtkWidget *item,
gtk_tree_path_free (path);
- combo_box->priv->editing_canceled = FALSE;
+ g_object_set (combo_box,
+ "editing-canceled", FALSE,
+ NULL);
}
static void
@@ -5510,8 +5512,9 @@ gtk_cell_editable_key_press (GtkWidget *widget,
if (event->keyval == GDK_Escape)
{
- combo_box->priv->editing_canceled = TRUE;
-
+ g_object_set (combo_box,
+ "editing-canceled", TRUE,
+ NULL);
gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (combo_box));
gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (combo_box));
@@ -5566,7 +5569,9 @@ popup_idle (gpointer data)
combo_box, 0);
/* we unset this if a menu item is activated */
- combo_box->priv->editing_canceled = TRUE;
+ g_object_set (combo_box,
+ "editing-canceled", TRUE,
+ NULL);
gtk_combo_box_popup (combo_box);
combo_box->priv->popup_idle_id = 0;
@@ -5727,14 +5732,6 @@ gtk_combo_box_set_title (GtkComboBox *combo_box,
}
}
-gboolean
-_gtk_combo_box_editing_canceled (GtkComboBox *combo_box)
-{
- g_return_val_if_fail (GTK_IS_COMBO_BOX (combo_box), TRUE);
-
- return combo_box->priv->editing_canceled;
-}
-
/**
* gtk_combo_box_get_popup_accessible:
* @combo_box: a #GtkComboBox