diff options
author | John Stebbins <[email protected]> | 2015-10-05 10:42:23 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2015-10-05 10:42:23 -0700 |
commit | 5c466ff03a3c5236d738ff914ece330457b7fefc (patch) | |
tree | 84c0691b948584d320f2276aaac13d8648597681 /gtk/src/hb-backend.c | |
parent | fe7cf56e8129d7376dde8857360652b39e514b28 (diff) |
LinGui: fix filter display in queue list
Under some circumstances, incorrect filter preset values might have been
shown.
Diffstat (limited to 'gtk/src/hb-backend.c')
-rw-r--r-- | gtk/src/hb-backend.c | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index f76574134..346b60e24 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -198,9 +198,9 @@ combo_opts_t vqual_granularity_opts = static options_map_t d_denoise_opts[] = { - {N_("Off"), "off", 0, ""}, - {N_("NLMeans"), "nlmeans", 1, ""}, - {N_("HQDN3D"), "hqdn3d", 2, ""}, + {N_("Off"), "off", HB_FILTER_INVALID, ""}, + {N_("NLMeans"), "nlmeans", HB_FILTER_NLMEANS, ""}, + {N_("HQDN3D"), "hqdn3d", HB_FILTER_HQDN3D, ""}, }; combo_opts_t denoise_opts = { @@ -3893,6 +3893,34 @@ get_preview_geometry(signal_user_data_t *ud, const hb_title_t *title, } } +const char* +ghb_lookup_filter_name(int filter_id, const char *short_name, int preset) +{ + hb_filter_param_t *map; + int ii; + + if (short_name == NULL) + { + return NULL; + } + if (preset) + { + map = hb_filter_param_get_presets(filter_id); + } + else + { + map = hb_filter_param_get_tunes(filter_id); + } + for (ii = 0; map[ii].name != NULL; ii++) + { + if (!strcasecmp(map[ii].short_name, short_name)) + { + return map[ii].name; + } + } + return NULL; +} + gboolean ghb_validate_filters(GhbValue *settings, GtkWindow *parent) { |