diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2021-09-18 00:14:55 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2021-09-18 00:20:42 -0300 |
commit | bc0d9488eede6f71283cbef1f1a7ecc918065618 (patch) | |
tree | e27667c2656a530828fd8d4c62b80ed76d55a15a | |
parent | 7f2cb1138a8eb80ad9ef8813ffa553a581259f5f (diff) | |
download | gtk+-bc0d9488eede6f71283cbef1f1a7ecc918065618.tar.gz |
filechooserwidget: Match choice id from "options"
When choices are added to the file chooser widget, the options of
that choice are stored object data under the "options" key. However,
gtk_file_chooser_widget_set_choice() was checking for "choices".
Retrieve the options from the "options" key stored data object data.
-rw-r--r-- | gtk/gtkfilechooserwidget.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 47252e4947..88e08c171b 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -8028,15 +8028,15 @@ gtk_file_chooser_widget_set_choice (GtkFileChooser *chooser, if (GTK_IS_BOX (widget)) { guint i; - const char **choices; + const char **options; GtkWidget *dropdown; dropdown = gtk_widget_get_last_child (widget); - choices = (const char **) g_object_get_data (G_OBJECT (dropdown), "choices"); - for (i = 0; choices[i]; i++) + options = (const char **) g_object_get_data (G_OBJECT (dropdown), "options"); + for (i = 0; options[i]; i++) { - if (strcmp (option, choices[i]) == 0) + if (strcmp (option, options[i]) == 0) { gtk_drop_down_set_selected (GTK_DROP_DOWN (dropdown), i); break; |