summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-07-26 09:34:08 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-07-26 18:09:54 -0400
commitf7ab6f665d405c0eaa20da4491e4550d867bd9cf (patch)
treeea48453bb9da6b437ed9970f992b6604ddbd6b9d /tests
parentef6babf896cd06bd42d0fb11e3aae7c109708bdd (diff)
downloadgtk+-f7ab6f665d405c0eaa20da4491e4550d867bd9cf.tar.gz
dropdown: Revise constructors
A dropdown without a model is useless, so accept a model and expression in the constructor. Allow them to be NULL, but consume them if given. This makes chained constructors convenient without breaking language bindings. Drop gtk_drop_down_set_from_strings() and instead add gtk_drop_down_new_from_strings(). Update all users.
Diffstat (limited to 'tests')
-rw-r--r--tests/testdropdown.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/testdropdown.c b/tests/testdropdown.c
index d207256271..5dcd7fcae7 100644
--- a/tests/testdropdown.c
+++ b/tests/testdropdown.c
@@ -469,7 +469,7 @@ main (int argc, char *argv[])
gtk_widget_set_margin_bottom (box, 10);
gtk_window_set_child (GTK_WINDOW (window), box);
- button = gtk_drop_down_new ();
+ button = gtk_drop_down_new (NULL, NULL);
model = G_LIST_MODEL (pango_cairo_font_map_get_default ());
gtk_drop_down_set_model (GTK_DROP_DOWN (button), model);
@@ -513,7 +513,7 @@ main (int argc, char *argv[])
button = drop_down_new_from_strings (device_titles, device_icons, device_descriptions);
gtk_box_append (GTK_BOX (box), button);
- button = gtk_drop_down_new ();
+ button = gtk_drop_down_new (NULL, NULL);
store = g_list_store_new (GTK_TYPE_STRING_PAIR);
g_list_store_append (store, gtk_string_pair_new ("1", "One"));
@@ -536,7 +536,7 @@ main (int argc, char *argv[])
gtk_widget_add_css_class (hbox, "linked");
entry = gtk_entry_new ();
- button = gtk_drop_down_new ();
+ button = gtk_drop_down_new (NULL, NULL);
gtk_drop_down_set_model (GTK_DROP_DOWN (button), G_LIST_MODEL (store));