diff options
author | jstebbins <[email protected]> | 2008-12-02 00:27:38 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-12-02 00:27:38 +0000 |
commit | 2dddca5b3135ed939df9cdcaf2e5ffb2e4d7f44f (patch) | |
tree | 0a82a97cf3df70eca8333ff3d47ccbc69527c85c /gtk | |
parent | 7ff50a3ab593821c96a60951ef8e2551ce6c288d (diff) |
LinGui: add logging level to preferences
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1986 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/src/ghb.ui | 42 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 27 | ||||
-rw-r--r-- | gtk/src/hb-backend.h | 3 | ||||
-rw-r--r-- | gtk/src/internal_defaults.xml | 2 | ||||
-rw-r--r-- | gtk/src/main.c | 7 | ||||
-rw-r--r-- | gtk/src/resource_data.h | 62 | ||||
-rw-r--r-- | gtk/src/resources.plist | 44 |
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 @@ "</property>\n" " </packing>\n" " </child>\n" +"\n" +" <child>\n" +" <object class="GtkAlignment" id=" +""alignment_j6">\n" +" <property name="visible">Tr" +"ue</property>\n" +" <property name="left_padding"&" +"gt;4</property>\n" +" <child>\n" +" <object class="GtkHBox" id=&" +"quot;hbox1">\n" +" <property name="visible"&g" +"t;True</property>\n" +" <property name="spacing"&g" +"t;4</property>\n" +" <child>\n" +" <object class="GtkComboBox&qu" +"ot; id="LoggingLevel">\n" +" <property name="visible&quo" +"t;>True</property>\n" +" <property name="width_reque" +"st">55</property>\n" +" <signal name="changed"" +" handler="pref_changed_cb"/>\n" +" </object>\n" +" <packing>\n" +" <property name="expand"" +";>False</property>\n" +" <property name="position&qu" +"ot;>0</property>\n" +" </packing>\n" +" </child>\n" +" <child>\n" +" <object class="GtkLabel"" +" id="label1">\n" +" <property name="visible&quo" +"t;>True</property>\n" +" <property name="xalign"" +";>0</property>\n" +" <property name="label"" +" translatable="yes">Logging Level</property>\n" +" </object>\n" +" <packing>\n" +" <property name="position&qu" +"ot;>1</property>\n" +" </packing>\n" +" </child>\n" +" </object>\n" +" </child>\n" +" </object>\n" +" <packing>\n" +" <property name="position">7" +"</property>\n" +" </packing>\n" +" </child>\n" +"\n" " <child>\n" " <object class="GtkCheckButton" i" "d="allow_tweaks">\n" @@ -5350,7 +5406,7 @@ "="tweaks_changed_cb"/>\n" " </object>\n" " <packing>\n" -" <property name="position">7" +" <property name="position">8" "</property>\n" " </packing>\n" " </child>\n" @@ -5367,7 +5423,7 @@ "="hbfd_feature_changed_cb"/>\n" " </object>\n" " <packing>\n" -" <property name="position">8" +" <property name="position">9" "</property>\n" " </packing>\n" " </child>\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.</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> @@ -3288,7 +3326,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> @@ -3299,7 +3337,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> @@ -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> |