diff options
author | John Stebbins <[email protected]> | 2015-09-25 14:02:19 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-09-29 09:47:56 -0700 |
commit | 291243c3fcd34282a700b059995c27a993b12e71 (patch) | |
tree | 3d4ec14d3df387ddb47b1611b69cc54c521dd137 /gtk/src | |
parent | c349173bb641530a97f787e75e9aa14fff043506 (diff) |
scan: fix rescan avoidance logic
We need to rescan when the number of previews changes.
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/callbacks.c | 16 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 2 |
2 files changed, 11 insertions, 7 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index b43f85ff5..390abc36e 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -2005,6 +2005,15 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) if (title != NULL) { + gint preview_count; + preview_count = title->preview_count; + if (preview_count < 1) + { + preview_count = 1; + } + widget = GHB_WIDGET(ud->builder, "preview_frame"); + gtk_range_set_range(GTK_RANGE(widget), 1, preview_count); + ghb_set_preview_image(ud); ghb_preview_set_visible(ud); } @@ -4096,15 +4105,10 @@ G_MODULE_EXPORT void pref_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { ghb_widget_to_setting (ud->prefs, widget); -// FIXME? + ghb_check_dependency(ud, widget, NULL); const gchar *name = ghb_get_setting_key(widget); ghb_pref_set(ud->prefs, name); - - gint preview_count; - preview_count = ghb_dict_get_int(ud->prefs, "preview_count"); - widget = GHB_WIDGET(ud->builder, "preview_frame"); - gtk_range_set_range(GTK_RANGE(widget), 1, preview_count); } G_MODULE_EXPORT void diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 839b4e052..fb0cc1e96 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -2906,7 +2906,7 @@ void ghb_backend_queue_scan(const gchar *path, gint titlenum) { g_debug("ghb_backend_queue_scan()"); - hb_scan( h_queue, path, titlenum, 10, 0, 0 ); + hb_scan( h_queue, path, titlenum, -1, 0, 0 ); hb_status.queue.state |= GHB_STATE_SCANNING; } |