diff options
author | jstebbins <[email protected]> | 2008-11-30 04:01:14 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-11-30 04:01:14 +0000 |
commit | 98e27438a5fc1d977c16539f89507ca82dce903f (patch) | |
tree | 45b1fdc375ec812141d1a409c8c0b27e1a0b8882 /gtk/src/callbacks.c | |
parent | 69f6bca6694d93d05a69bad93a748cf31d52c28f (diff) |
LinGui: variable number of preview frames. preference option to set
the number of frames
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1971 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r-- | gtk/src/callbacks.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index c5234e59b..0eeae277d 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -576,7 +576,9 @@ ghb_do_scan(signal_user_data_t *ud, const gchar *filename, gboolean force) gtk_progress_bar_set_text (progress, "Scanning ..."); ghb_hb_cleanup(TRUE); prune_logs(ud); - ghb_backend_scan (path, 0); + gint preview_count; + preview_count = ghb_settings_get_int(ud->settings, "preview_count"); + ghb_backend_scan(path, 0, preview_count); g_free(path); } else @@ -1026,10 +1028,15 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) } // Unfortunately, there is no way to query how many frames were - // actually generated during the scan. It attempts to make 10. + // actually generated during the scan. // If I knew how many were generated, I would adjust the spin // control range here. - ghb_ui_update(ud, "preview_frame", ghb_int64_value(1)); + // I do know how many were asked for. + gint preview_count; + preview_count = ghb_settings_get_int(ud->settings, "preview_count"); + widget = GHB_WIDGET(ud->builder, "preview_frame"); + gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, preview_count); + ghb_ui_update(ud, "preview_frame", ghb_int64_value(2)); ghb_set_preview_image (ud); } @@ -2476,13 +2483,15 @@ drive_changed_cb(GVolumeMonitor *gvm, GDrive *gd, signal_user_data_t *ud) update_source_label(ud, device); ghb_hb_cleanup(TRUE); prune_logs(ud); - ghb_backend_scan(device, 0); + gint preview_count; + preview_count = ghb_settings_get_int(ud->settings, "preview_count"); + ghb_backend_scan(device, 0, preview_count); } else { ghb_hb_cleanup(TRUE); prune_logs(ud); - ghb_backend_scan("/dev/null", 0); + ghb_backend_scan("/dev/null", 0, 1); } } g_free(device); |