summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-06 19:13:25 +0000
committerjstebbins <[email protected]>2008-09-06 19:13:25 +0000
commit74961ccaa30bdf49516c89755e4b2a34e87c18fc (patch)
tree3c61262321e655edb7993d83e162dd937bb660f4 /gtk
parente9120676010fa24947cd6b2d0fff6495bf5ba8cc (diff)
LinGui: Fix a non-fatal Gtk assert when switching the source selection mode
from file to folder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1671 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/callbacks.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index bd07e34b2..36013fa23 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -466,36 +466,29 @@ dvd_device_changed_cb(GtkComboBox *combo, GtkWidget *dialog)
}
}
-
void
source_type_changed_cb(GtkToggleButton *toggle, GtkFileChooser *chooser)
{
- gchar *filename;
+ gchar *folder;
g_debug("source_type_changed_cb ()");
+ folder = gtk_file_chooser_get_current_folder (chooser);
if (gtk_toggle_button_get_active (toggle))
{
- filename = gtk_file_chooser_get_filename (chooser);
gtk_file_chooser_set_action (chooser, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
- if (filename != NULL)
- {
- gtk_file_chooser_set_filename(chooser, filename);
- g_free(filename);
- }
gtk_widget_set_sensitive (dvd_device_combo, FALSE);
gtk_combo_box_set_active (GTK_COMBO_BOX(dvd_device_combo), 0);
}
else
{
- filename = gtk_file_chooser_get_filename (chooser);
gtk_file_chooser_set_action (chooser, GTK_FILE_CHOOSER_ACTION_OPEN);
- if (filename != NULL)
- {
- gtk_file_chooser_set_filename(chooser, filename);
- g_free(filename);
- }
gtk_widget_set_sensitive (dvd_device_combo, TRUE);
}
+ if (folder != NULL)
+ {
+ gtk_file_chooser_set_current_folder(chooser, folder);
+ g_free(folder);
+ }
}
static GtkWidget*