diff options
author | jstebbins <[email protected]> | 2008-11-26 16:23:23 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-11-26 16:23:23 +0000 |
commit | b69a2ae27d28eba72585246bc810de0ea0d33886 (patch) | |
tree | b753074abf11464925132d55a95f9a550ee7970a /gtk/src/settings.c | |
parent | 54c7e6f7e9f5c2bb57fcca2808fce07aaf0589c9 (diff) |
LinGui: add a file chooser button for the dest directory. dest file is
separated with its own entry box.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1955 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/settings.c')
-rw-r--r-- | gtk/src/settings.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gtk/src/settings.c b/gtk/src/settings.c index 0b5c90283..03d65c766 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -321,6 +321,12 @@ ghb_widget_value(GtkWidget *widget) str = gtk_label_get_text (GTK_LABEL(widget)); value = ghb_string_value_new(str); } + else if (type == GTK_TYPE_FILE_CHOOSER_BUTTON) + { + const gchar *str; + str = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(widget)); + value = ghb_string_value_new(str); + } else { g_debug("Attempt to set unknown widget type: %s\n", name); @@ -569,6 +575,20 @@ update_widget(GtkWidget *widget, const GValue *value) { gtk_label_set_text (GTK_LABEL(widget), str); } + else if (type == GTK_TYPE_FILE_CHOOSER_BUTTON) + { + GtkFileChooserAction act; + act = gtk_file_chooser_get_action(GTK_FILE_CHOOSER(widget)); + if (act == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER || + act == GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER) + { + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(widget), str); + } + else + { + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER(widget), str); + } + } else { g_debug("Attempt to set unknown widget type"); |