summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
Diffstat (limited to 'gtk')
-rw-r--r--gtk/src/ghb.ui42
-rw-r--r--gtk/src/hb-backend.c27
-rw-r--r--gtk/src/hb-backend.h3
-rw-r--r--gtk/src/internal_defaults.xml2
-rw-r--r--gtk/src/main.c7
-rw-r--r--gtk/src/resource_data.h62
-rw-r--r--gtk/src/resources.plist44
7 files changed, 175 insertions, 12 deletions
diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui
index 489c8b7dc..f2183eb26 100644
--- a/gtk/src/ghb.ui
+++ b/gtk/src/ghb.ui
@@ -3275,6 +3275,44 @@ location as the movie.</property>
<property name="position">6</property>
</packing>
</child>
+
+ <child>
+ <object class="GtkAlignment" id="alignment_j6">
+ <property name="visible">True</property>
+ <property name="left_padding">4</property>
+ <child>
+ <object class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="spacing">4</property>
+ <child>
+ <object class="GtkComboBox" id="LoggingLevel">
+ <property name="visible">True</property>
+ <property name="width_request">55</property>
+ <signal name="changed" handler="pref_changed_cb"/>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Logging Level</property>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="position">7</property>
+ </packing>
+ </child>
+
<child>
<object class="GtkCheckButton" id="allow_tweaks">
<property name="can_focus">True</property>
@@ -3283,7 +3321,7 @@ location as the movie.</property>
<signal name="toggled" handler="tweaks_changed_cb"/>
</object>
<packing>
- <property name="position">7</property>
+ <property name="position">8</property>
</packing>
</child>
<child>
@@ -3294,7 +3332,7 @@ location as the movie.</property>
<signal name="toggled" handler="hbfd_feature_changed_cb"/>
</object>
<packing>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
</object>
diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c
index ba3eb8abc..0b93a4d12 100644
--- a/gtk/src/hb-backend.c
+++ b/gtk/src/hb-backend.c
@@ -63,6 +63,18 @@ static const gchar *index_str[] =
"10",
};
+static options_map_t d_logging_opts[] =
+{
+ {"0", "0", 0, "0"},
+ {"1", "1", 1, "1"},
+ {"2", "2", 2, "2"},
+};
+combo_opts_t logging_opts =
+{
+ sizeof(d_logging_opts)/sizeof(options_map_t),
+ d_logging_opts
+};
+
static options_map_t d_container_opts[] =
{
{"MKV", "mkv", HB_MUX_MKV, "mkv"},
@@ -224,6 +236,7 @@ typedef struct
combo_name_map_t combo_name_map[] =
{
+ {"LoggingLevel", &logging_opts},
{"FileFormat", &container_opts},
{"PictureDeinterlace", &deint_opts},
{"tweak_PictureDeinterlace", &deint_opts},
@@ -1742,6 +1755,7 @@ ghb_update_ui_combo_box(GtkBuilder *builder, const gchar *name, gint user_data,
subtitle_opts_set(builder, "Subtitles", user_data);
title_opts_set(builder, "title");
audio_track_opts_set(builder, "AudioTrack", user_data);
+ generic_opts_set(builder, "LoggingLevel", &logging_opts);
generic_opts_set(builder, "FileFormat", &container_opts);
generic_opts_set(builder, "PictureDeinterlace", &deint_opts);
generic_opts_set(builder, "tweak_PictureDeinterlace", &deint_opts);
@@ -1977,11 +1991,8 @@ ghb_set_default_bitrate_opts(GtkBuilder *builder, gint last_rate)
static ghb_status_t hb_status;
void
-ghb_backend_init(GtkBuilder *builder, gint debug, gint update)
+ghb_combo_init(GtkBuilder *builder)
{
- /* Init libhb */
- h_scan = hb_init( debug, update );
- h_queue = hb_init( debug, 0 );
// Set up the list model for the combos
init_ui_combo_boxes(builder);
// Populate all the combos
@@ -1989,6 +2000,14 @@ ghb_backend_init(GtkBuilder *builder, gint debug, gint update)
}
void
+ghb_backend_init(gint debug)
+{
+ /* Init libhb */
+ h_scan = hb_init( debug, 0 );
+ h_queue = hb_init( debug, 0 );
+}
+
+void
ghb_backend_close()
{
hb_close(&h_queue);
diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h
index 8fa0ddc82..ff8609661 100644
--- a/gtk/src/hb-backend.h
+++ b/gtk/src/hb-backend.h
@@ -93,7 +93,8 @@ void ghb_vquality_range(
gdouble *page,
gint *digits);
//const gchar* ghb_get_rate_string(gint rate, gint type);
-void ghb_backend_init(GtkBuilder *builder, gint debug, gint update);
+void ghb_combo_init(GtkBuilder *builder);
+void ghb_backend_init(gint debug);
void ghb_backend_close(void);
void ghb_add_job(GValue *js, gint unique_id);
void ghb_remove_job(gint unique_id);
diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml
index d531a0c36..329f6e11d 100644
--- a/gtk/src/internal_defaults.xml
+++ b/gtk/src/internal_defaults.xml
@@ -106,6 +106,8 @@
<false />
<key>hbfd_feature</key>
<false />
+ <key>LoggingLevel</key>
+ <string>1</string>
<key>nocheckvquality</key>
<false />
<key>reduce_hd_preview</key>
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 9f7b940d3..30b20dca4 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -226,6 +226,7 @@ bind_chapter_tree_model (signal_user_data_t *ud)
g_debug("Done\n");
}
+
extern void queue_list_selection_changed_cb(void);
extern void queue_remove_clicked_cb(void);
extern void queue_list_size_allocate_cb(void);
@@ -543,7 +544,7 @@ main (int argc, char *argv[])
g_signal_connect(buffer, "changed", (GCallback)x264_entry_changed_cb, ud);
ghb_file_menu_add_dvd(ud);
- ghb_backend_init(ud->builder, 1, 0);
+ ghb_combo_init(ud->builder);
g_debug("ud %p\n", ud);
g_debug("ud->builder %p\n", ud->builder);
@@ -569,6 +570,10 @@ main (int argc, char *argv[])
ghb_prefs_to_ui(ud);
+ gint logLevel;
+ logLevel = ghb_settings_get_int(ud->settings, "LoggingLevel");
+ ghb_backend_init(logLevel);
+
if (ghb_settings_get_boolean(ud->settings, "hbfd"))
{
ghb_hbfd(ud, TRUE);
diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h
index a085d2ca2..5b46e5eee 100644
--- a/gtk/src/resource_data.h
+++ b/gtk/src/resource_data.h
@@ -5337,6 +5337,62 @@
"&lt;/property&gt;\n"
" &lt;/packing&gt;\n"
" &lt;/child&gt;\n"
+"\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkAlignment&quot; id="
+"&quot;alignment_j6&quot;&gt;\n"
+" &lt;property name=&quot;visible&quot;&gt;Tr"
+"ue&lt;/property&gt;\n"
+" &lt;property name=&quot;left_padding&quot;&"
+"gt;4&lt;/property&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkHBox&quot; id=&"
+"quot;hbox1&quot;&gt;\n"
+" &lt;property name=&quot;visible&quot;&g"
+"t;True&lt;/property&gt;\n"
+" &lt;property name=&quot;spacing&quot;&g"
+"t;4&lt;/property&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkComboBox&qu"
+"ot; id=&quot;LoggingLevel&quot;&gt;\n"
+" &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;width_reque"
+"st&quot;&gt;55&lt;/property&gt;\n"
+" &lt;signal name=&quot;changed&quot;"
+" handler=&quot;pref_changed_cb&quot;/&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;expand&quot"
+";&gt;False&lt;/property&gt;\n"
+" &lt;property name=&quot;position&qu"
+"ot;&gt;0&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;child&gt;\n"
+" &lt;object class=&quot;GtkLabel&quot;"
+" id=&quot;label1&quot;&gt;\n"
+" &lt;property name=&quot;visible&quo"
+"t;&gt;True&lt;/property&gt;\n"
+" &lt;property name=&quot;xalign&quot"
+";&gt;0&lt;/property&gt;\n"
+" &lt;property name=&quot;label&quot;"
+" translatable=&quot;yes&quot;&gt;Logging Level&lt;/property&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;position&qu"
+"ot;&gt;1&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;/child&gt;\n"
+" &lt;/object&gt;\n"
+" &lt;packing&gt;\n"
+" &lt;property name=&quot;position&quot;&gt;7"
+"&lt;/property&gt;\n"
+" &lt;/packing&gt;\n"
+" &lt;/child&gt;\n"
+"\n"
" &lt;child&gt;\n"
" &lt;object class=&quot;GtkCheckButton&quot; i"
"d=&quot;allow_tweaks&quot;&gt;\n"
@@ -5350,7 +5406,7 @@
"=&quot;tweaks_changed_cb&quot;/&gt;\n"
" &lt;/object&gt;\n"
" &lt;packing&gt;\n"
-" &lt;property name=&quot;position&quot;&gt;7"
+" &lt;property name=&quot;position&quot;&gt;8"
"&lt;/property&gt;\n"
" &lt;/packing&gt;\n"
" &lt;/child&gt;\n"
@@ -5367,7 +5423,7 @@
"=&quot;hbfd_feature_changed_cb&quot;/&gt;\n"
" &lt;/object&gt;\n"
" &lt;packing&gt;\n"
-" &lt;property name=&quot;position&quot;&gt;8"
+" &lt;property name=&quot;position&quot;&gt;9"
"&lt;/property&gt;\n"
" &lt;/packing&gt;\n"
" &lt;/child&gt;\n"
@@ -10491,6 +10547,8 @@
" <dict>\n"
" <key>EncodeLogLocation</key>\n"
" <false />\n"
+" <key>LoggingLevel</key>\n"
+" <string>1</string>\n"
" <key>allow_tweaks</key>\n"
" <false />\n"
" <key>chapters_in_destination</key>\n"
diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist
index 5cc700ced..0da246c43 100644
--- a/gtk/src/resources.plist
+++ b/gtk/src/resources.plist
@@ -3280,6 +3280,44 @@ location as the movie.&lt;/property&gt;
&lt;property name=&quot;position&quot;&gt;6&lt;/property&gt;
&lt;/packing&gt;
&lt;/child&gt;
+
+ &lt;child&gt;
+ &lt;object class=&quot;GtkAlignment&quot; id=&quot;alignment_j6&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;left_padding&quot;&gt;4&lt;/property&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkHBox&quot; id=&quot;hbox1&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;spacing&quot;&gt;4&lt;/property&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkComboBox&quot; id=&quot;LoggingLevel&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;width_request&quot;&gt;55&lt;/property&gt;
+ &lt;signal name=&quot;changed&quot; handler=&quot;pref_changed_cb&quot;/&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;expand&quot;&gt;False&lt;/property&gt;
+ &lt;property name=&quot;position&quot;&gt;0&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+ &lt;child&gt;
+ &lt;object class=&quot;GtkLabel&quot; id=&quot;label1&quot;&gt;
+ &lt;property name=&quot;visible&quot;&gt;True&lt;/property&gt;
+ &lt;property name=&quot;xalign&quot;&gt;0&lt;/property&gt;
+ &lt;property name=&quot;label&quot; translatable=&quot;yes&quot;&gt;Logging Level&lt;/property&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;position&quot;&gt;1&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+ &lt;/object&gt;
+ &lt;/child&gt;
+ &lt;/object&gt;
+ &lt;packing&gt;
+ &lt;property name=&quot;position&quot;&gt;7&lt;/property&gt;
+ &lt;/packing&gt;
+ &lt;/child&gt;
+
&lt;child&gt;
&lt;object class=&quot;GtkCheckButton&quot; id=&quot;allow_tweaks&quot;&gt;
&lt;property name=&quot;can_focus&quot;&gt;True&lt;/property&gt;
@@ -3288,7 +3326,7 @@ location as the movie.&lt;/property&gt;
&lt;signal name=&quot;toggled&quot; handler=&quot;tweaks_changed_cb&quot;/&gt;
&lt;/object&gt;
&lt;packing&gt;
- &lt;property name=&quot;position&quot;&gt;7&lt;/property&gt;
+ &lt;property name=&quot;position&quot;&gt;8&lt;/property&gt;
&lt;/packing&gt;
&lt;/child&gt;
&lt;child&gt;
@@ -3299,7 +3337,7 @@ location as the movie.&lt;/property&gt;
&lt;signal name=&quot;toggled&quot; handler=&quot;hbfd_feature_changed_cb&quot;/&gt;
&lt;/object&gt;
&lt;packing&gt;
- &lt;property name=&quot;position&quot;&gt;8&lt;/property&gt;
+ &lt;property name=&quot;position&quot;&gt;9&lt;/property&gt;
&lt;/packing&gt;
&lt;/child&gt;
&lt;/object&gt;
@@ -5196,6 +5234,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A
<dict>
<key>EncodeLogLocation</key>
<false />
+ <key>LoggingLevel</key>
+ <string>1</string>
<key>allow_tweaks</key>
<false />
<key>chapters_in_destination</key>