diff options
author | Tristan Van Berkom <tristanvb@openismus.com> | 2010-10-13 21:52:27 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-10-13 21:52:27 -0400 |
commit | 9612c648176378bf237ad0e1a8c6c995b0ca7c61 (patch) | |
tree | 875a7b2a6ce93657d756b2bae1a3c5ae07a75574 /gtk/gtkprinteroptionwidget.c | |
parent | 7c8ee80c5af0909735d1e36b8aba7aa02bf83c95 (diff) | |
download | gtk+-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/gtkprinteroptionwidget.c')
-rw-r--r-- | gtk/gtkprinteroptionwidget.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/gtkprinteroptionwidget.c b/gtk/gtkprinteroptionwidget.c index 8831dfc092..8349d2c8bb 100644 --- a/gtk/gtkprinteroptionwidget.c +++ b/gtk/gtkprinteroptionwidget.c @@ -29,7 +29,6 @@ #include "gtkcelllayout.h" #include "gtkcellrenderertext.h" #include "gtkcombobox.h" -#include "gtkcomboboxentry.h" #include "gtkfilechooserbutton.h" #include "gtkimage.h" #include "gtklabel.h" @@ -287,11 +286,11 @@ static GtkWidget * combo_box_entry_new (void) { GtkWidget *combo_box; - combo_box = gtk_combo_box_entry_new (); + combo_box = g_object_new (GTK_TYPE_COMBO_BOX, "has-entry", TRUE, NULL); combo_box_set_model (combo_box); - gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (combo_box), NAME_COLUMN); + gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (combo_box), NAME_COLUMN); return combo_box; } @@ -373,7 +372,7 @@ combo_box_get (GtkWidget *combo) gchar *value; GtkTreeIter iter; - if (GTK_IS_COMBO_BOX_ENTRY (combo)) + if (gtk_combo_box_get_has_entry (GTK_COMBO_BOX (combo))) { value = gtk_combo_box_get_active_text(GTK_COMBO_BOX (combo)); } |