summaryrefslogtreecommitdiff
path: root/gtk/tests
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/tests
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/tests')
-rw-r--r--gtk/tests/builder.c3
-rw-r--r--gtk/tests/object.c10
2 files changed, 3 insertions, 10 deletions
diff --git a/gtk/tests/builder.c b/gtk/tests/builder.c
index 0a3f62539a..b9ad395c57 100644
--- a/gtk/tests/builder.c
+++ b/gtk/tests/builder.c
@@ -1336,8 +1336,9 @@ test_combo_box_entry (void)
" </object>"
" <object class=\"GtkWindow\" id=\"window1\">"
" <child>"
- " <object class=\"GtkComboBoxEntry\" id=\"comboboxentry1\">"
+ " <object class=\"GtkComboBox\" id=\"comboboxentry1\">"
" <property name=\"model\">liststore1</property>"
+ " <property name=\"has-entry\">True</property>"
" <property name=\"visible\">True</property>"
" <child>"
" <object class=\"GtkCellRendererText\" id=\"renderer1\"/>"
diff --git a/gtk/tests/object.c b/gtk/tests/object.c
index feb724adad..4a38f005fe 100644
--- a/gtk/tests/object.c
+++ b/gtk/tests/object.c
@@ -72,7 +72,6 @@ list_ignore_properties (gboolean buglist)
{ "GtkColorSelection", "current-color", (void*) NULL, }, /* not a valid boxed color */
{ "GtkComboBox", "row-span-column", (void*) MATCH_ANY_VALUE }, /* GtkComboBoxEntry needs a tree model for this */
{ "GtkComboBox", "column-span-column", (void*) MATCH_ANY_VALUE }, /* GtkComboBoxEntry needs a tree model for this */
- { "GtkComboBoxEntry", "text-column", (void*) MATCH_ANY_VALUE }, /* GtkComboBoxEntry needs a tree model for this */
{ "GtkFileChooserButton", "select-multiple", (void*) MATCH_ANY_VALUE }, /* property disabled */
{ "GtkFileChooserButton", "action", (void*) GTK_FILE_CHOOSER_ACTION_SAVE },
{ "GtkFileChooserButton", "action", (void*) GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER },
@@ -279,14 +278,7 @@ static void
widget_fixups (GtkWidget *widget)
{
/* post-constructor for widgets that need additional settings to work correctly */
- if (GTK_IS_COMBO_BOX_ENTRY (widget))
- {
- GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
- g_object_set (widget, "model", store, "text-column", 0, NULL);
- g_object_unref (store);
- gtk_combo_box_append_text (GTK_COMBO_BOX (widget), "test text");
- }
- else if (GTK_IS_COMBO_BOX (widget))
+ if (GTK_IS_COMBO_BOX (widget))
{
GtkListStore *store = gtk_list_store_new (1, G_TYPE_STRING);
g_object_set (widget, "model", store, NULL);