diff options
author | jstebbins <[email protected]> | 2009-07-16 17:52:10 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2009-07-16 17:52:10 +0000 |
commit | a13d7753343d914e2e25ac32ca756b3025b48de2 (patch) | |
tree | 4c5b3a9e64979665ffa48eb5a4b8e57690bbb63c | |
parent | 149a32aa1e1ff4ac32f683d0444c70f625e8fb0b (diff) |
LinGui: fix destination update problem
destination was getting overwritten at the end of a scan, so if the
user modified it during the scan, they lost the setting
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2698 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/src/callbacks.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index bccc03005..e83a54a8f 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -646,7 +646,7 @@ resolve_drive_name(gchar *filename) } static gboolean -update_source_label(signal_user_data_t *ud, const gchar *source) +update_source_label(signal_user_data_t *ud, const gchar *source, gboolean update_dest) { gchar *label = NULL; gint len; @@ -727,7 +727,8 @@ update_source_label(signal_user_data_t *ud, const gchar *source) gtk_label_set_text (GTK_LABEL(widget), label); ghb_settings_set_string(ud->settings, "volume_label", label); g_free(label); - set_destination(ud); + if (update_dest) + set_destination(ud); } else { @@ -904,7 +905,7 @@ ghb_do_scan( { last_scan_file = g_strdup(filename); ghb_settings_set_string(ud->settings, "source", filename); - if (update_source_label(ud, filename)) + if (update_source_label(ud, filename, TRUE)) { gchar *path; gint preview_count; @@ -2320,7 +2321,7 @@ ghb_backend_events(signal_user_data_t *ud) GtkLabel *label; source = ghb_settings_get_string(ud->settings, "source"); - update_source_label(ud, source); + update_source_label(ud, source, FALSE); scan_prog = GTK_PROGRESS_BAR(GHB_WIDGET (ud->builder, "scan_prog")); gtk_progress_bar_set_fraction (scan_prog, 1.0); @@ -3355,7 +3356,7 @@ handle_media_change(const gchar *device, gboolean insert, signal_user_data_t *ud strcmp(device, ud->current_dvd_device) == 0) { show_scan_progress(ud); - update_source_label(ud, device); + update_source_label(ud, device, TRUE); gint preview_count; preview_count = ghb_settings_get_int(ud->settings, "preview_count"); ghb_backend_scan(device, 0, preview_count); @@ -3455,7 +3456,7 @@ drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud) if (g_drive_has_media(gd)) { show_scan_progress(ud); - update_source_label(ud, device); + update_source_label(ud, device, TRUE); gint preview_count; preview_count = ghb_settings_get_int(ud->settings, "preview_count"); ghb_backend_scan(device, 0, preview_count); |