diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index 88e08c171b..a2310f35d8 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -8060,10 +8060,13 @@ gtk_file_chooser_widget_get_choice (GtkFileChooser *chooser, widget = (GtkWidget *)g_hash_table_lookup (impl->choices, id); if (GTK_IS_DROP_DOWN (widget)) { - gpointer selected = gtk_drop_down_get_selected_item (GTK_DROP_DOWN (widget)); - if (GTK_IS_STRING_OBJECT (selected)) - return gtk_string_object_get_string (GTK_STRING_OBJECT (selected)); - return NULL; + const char **options; + guint selected; + + options = (const char **) g_object_get_data (G_OBJECT (widget), "options"); + selected = gtk_drop_down_get_selected (GTK_DROP_DOWN (widget)); + + return options[selected]; } else if (GTK_IS_CHECK_BUTTON (widget)) {