diff options
author | jstebbins <[email protected]> | 2015-06-12 20:52:01 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2015-06-12 20:52:01 +0000 |
commit | 1be7a8e58feb0d26cac7067dcd289aec2aebb2e7 (patch) | |
tree | 07713faf52c6dd0dbf129ec35aecd217bf00b39e /gtk | |
parent | f2b0998a8f4ef77d3ef791b64ad032c1bb8348ea (diff) |
libhb: Allow log level changes and update checks *after* hb_init()
- In the CLI, this allows calling hb_init() before parsing args, which
permits us to see any libhb log messages that are generated during
option parsing. These messages were hidden before.
- In the GUIs, this allows dynamic changes to log level. Previously an
application restart was required. I have only updated the LinGui to
take advantage of this.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7295 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/callbacks.c | 8 | ||||
-rw-r--r-- | gtk/src/ghb-3.12.ui | 2 | ||||
-rw-r--r-- | gtk/src/ghb-3.14.ui | 2 | ||||
-rw-r--r-- | gtk/src/ghb.ui | 2 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 9 | ||||
-rw-r--r-- | gtk/src/hb-backend.h | 1 |
6 files changed, 21 insertions, 3 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 2e0d36000..72bd33a6f 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -4082,6 +4082,14 @@ pref_changed_cb(GtkWidget *widget, signal_user_data_t *ud) } G_MODULE_EXPORT void +log_level_changed_cb(GtkWidget *widget, signal_user_data_t *ud) +{ + pref_changed_cb(widget, ud); + int level = ghb_dict_get_int(ud->prefs, "LoggingLevel"); + ghb_log_level_set(level); +} + +G_MODULE_EXPORT void use_m4v_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { g_debug("use_m4v_changed_cb"); diff --git a/gtk/src/ghb-3.12.ui b/gtk/src/ghb-3.12.ui index e66881fad..6b886d6c1 100644 --- a/gtk/src/ghb-3.12.ui +++ b/gtk/src/ghb-3.12.ui @@ -7444,7 +7444,7 @@ This file may be reloaded at a later time to edit your jobs and re-encode.</prop <property name="width_request">55</property> <property name="visible">True</property> <property name="can_focus">False</property> - <signal name="changed" handler="pref_changed_cb" swapped="no"/> + <signal name="changed" handler="log_level_changed_cb" swapped="no"/> </object> <packing> <property name="expand">False</property> diff --git a/gtk/src/ghb-3.14.ui b/gtk/src/ghb-3.14.ui index 9a3cf537d..8a153c978 100644 --- a/gtk/src/ghb-3.14.ui +++ b/gtk/src/ghb-3.14.ui @@ -7450,7 +7450,7 @@ This file may be reloaded at a later time to edit your jobs and re-encode.</prop <property name="width_request">55</property> <property name="visible">True</property> <property name="can_focus">False</property> - <signal name="changed" handler="pref_changed_cb" swapped="no"/> + <signal name="changed" handler="log_level_changed_cb" swapped="no"/> </object> <packing> <property name="expand">False</property> diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index add5b6c6c..03524f78e 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -7444,7 +7444,7 @@ This file may be reloaded at a later time to edit your jobs and re-encode.</prop <property name="width_request">55</property> <property name="visible">True</property> <property name="can_focus">False</property> - <signal name="changed" handler="pref_changed_cb" swapped="no"/> + <signal name="changed" handler="log_level_changed_cb" swapped="no"/> </object> <packing> <property name="expand">False</property> diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index ecb33f791..839b4e052 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -149,6 +149,7 @@ static options_map_t d_logging_opts[] = {"0", "0", 0, "0"}, {"1", "1", 1, "1"}, {"2", "2", 2, "2"}, + {"3", "3", 3, "3"}, }; combo_opts_t logging_opts = { @@ -2866,6 +2867,14 @@ ghb_backend_init(gint debug) } void +ghb_log_level_set(int level) +{ + hb_log_level_set(h_scan, level); + hb_log_level_set(h_queue, level); + hb_log_level_set(h_live, level); +} + +void ghb_backend_close() { hb_close(&h_live); diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h index 940a4340a..42fefe965 100644 --- a/gtk/src/hb-backend.h +++ b/gtk/src/hb-backend.h @@ -89,6 +89,7 @@ float ghb_vquality_default(signal_user_data_t *ud); void ghb_combo_init(signal_user_data_t *ud); void ghb_backend_init(gint debug); +void ghb_log_level_set(int level); void ghb_backend_close(void); void ghb_add_job(hb_handle_t *h, GhbValue *js, gint unique_id); void ghb_remove_job(gint unique_id); |