summaryrefslogtreecommitdiff
path: root/gtk/gtkcellrenderercombo.c
diff options
context:
space:
mode:
authorTristan Van Berkom <tristanvb@openismus.com>2010-10-13 21:52:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2010-10-13 21:52:27 -0400
commit9612c648176378bf237ad0e1a8c6c995b0ca7c61 (patch)
tree875a7b2a6ce93657d756b2bae1a3c5ae07a75574 /gtk/gtkcellrenderercombo.c
parent7c8ee80c5af0909735d1e36b8aba7aa02bf83c95 (diff)
downloadgtk+-9612c648176378bf237ad0e1a8c6c995b0ca7c61.tar.gz
Deprecate GtkComboBoxEntry in favor of added properties to GtkComboBox
GtkComboBox now sports a construct-only "has-entry" property which decides if it uses a GtkEntry to allow additional user input. Also it has a new "entry-text-column" to fetch strings for the entry from the model. This patch deprecates the GtkComboBoxEntry and updates the rest of GTK+ to use the new semantics on GtkComboBox instead. GtkComboBoxEntry will be removed altogether before GTK+ 3, in a later commit.
Diffstat (limited to 'gtk/gtkcellrenderercombo.c')
-rw-r--r--gtk/gtkcellrenderercombo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/gtkcellrenderercombo.c b/gtk/gtkcellrenderercombo.c
index 505f2bc688..d23521d984 100644
--- a/gtk/gtkcellrenderercombo.c
+++ b/gtk/gtkcellrenderercombo.c
@@ -27,7 +27,6 @@
#include "gtkcellrenderercombo.h"
#include "gtkcellrenderertext.h"
#include "gtkcombobox.h"
-#include "gtkcomboboxentry.h"
#include "gtkmarshalers.h"
#include "gtkprivate.h"
@@ -351,7 +350,7 @@ gtk_cell_renderer_combo_editing_done (GtkCellEditable *combo,
return;
}
- if (GTK_IS_COMBO_BOX_ENTRY (combo))
+ if (gtk_combo_box_get_has_entry (GTK_COMBO_BOX (combo)))
{
entry = GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo)));
new_text = g_strdup (gtk_entry_get_text (entry));
@@ -449,11 +448,11 @@ gtk_cell_renderer_combo_start_editing (GtkCellRenderer *cell,
if (priv->has_entry)
{
- combo = gtk_combo_box_entry_new ();
+ combo = g_object_new (GTK_TYPE_COMBO_BOX, "has-entry", TRUE, NULL);
if (priv->model)
gtk_combo_box_set_model (GTK_COMBO_BOX (combo), priv->model);
- gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo),
+ gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (combo),
priv->text_column);
g_object_get (cell_text, "text", &text, NULL);