diff options
author | Matthias Clasen <mclasen@redhat.com> | 2016-07-05 22:11:44 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2016-07-08 00:08:28 -0400 |
commit | 5839c138434cd2ba3b0bec400e17b6334a020800 (patch) | |
tree | e3f6298e3cf377a91d6b5b7f1c9e3586525a83c0 /gtk/gtkfilechooserutils.c | |
parent | 6fc7485077505c946ec8f0878e22e418a46a7679 (diff) | |
download | gtk+-5839c138434cd2ba3b0bec400e17b6334a020800.tar.gz |
Implement combobox apis in GtkFileChooserWidget
https://bugzilla.gnome.org/show_bug.cgi?id=768499
Diffstat (limited to 'gtk/gtkfilechooserutils.c')
-rw-r--r-- | gtk/gtkfilechooserutils.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/gtk/gtkfilechooserutils.c b/gtk/gtkfilechooserutils.c index 53246caaba..7965ab0f20 100644 --- a/gtk/gtkfilechooserutils.c +++ b/gtk/gtkfilechooserutils.c @@ -68,6 +68,19 @@ static void delegate_file_activated (GtkFileChooser *choose static GtkFileChooserConfirmation delegate_confirm_overwrite (GtkFileChooser *chooser, gpointer data); +static void delegate_add_choice (GtkFileChooser *chooser, + const char *id, + const char *label, + const char **options, + const char **option_labels); +static void delegate_remove_choice (GtkFileChooser *chooser, + const char *id); +static void delegate_set_choice (GtkFileChooser *chooser, + const char *id, + const char *option); +static const char * delegate_get_choice (GtkFileChooser *chooser, + const char *id); + /** * _gtk_file_chooser_install_properties: @@ -149,6 +162,10 @@ _gtk_file_chooser_delegate_iface_init (GtkFileChooserIface *iface) iface->add_shortcut_folder = delegate_add_shortcut_folder; iface->remove_shortcut_folder = delegate_remove_shortcut_folder; iface->list_shortcut_folders = delegate_list_shortcut_folders; + iface->add_choice = delegate_add_choice; + iface->remove_choice = delegate_remove_choice; + iface->set_choice = delegate_set_choice; + iface->get_choice = delegate_get_choice; } /** @@ -499,3 +516,35 @@ _gtk_file_chooser_label_for_file (GFile *file) return label; } +static void +delegate_add_choice (GtkFileChooser *chooser, + const char *id, + const char *label, + const char **options, + const char **option_labels) +{ + gtk_file_chooser_add_choice (get_delegate (chooser), + id, label, options, option_labels); +} +static void +delegate_remove_choice (GtkFileChooser *chooser, + const char *id) +{ + gtk_file_chooser_remove_choice (get_delegate (chooser), id); +} + +static void +delegate_set_choice (GtkFileChooser *chooser, + const char *id, + const char *option) +{ + gtk_file_chooser_set_choice (get_delegate (chooser), id, option); +} + + +static const char * +delegate_get_choice (GtkFileChooser *chooser, + const char *id) +{ + return gtk_file_chooser_get_choice (get_delegate (chooser), id); +} |