summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2012-12-27 22:49:32 +0000
committerjstebbins <[email protected]>2012-12-27 22:49:32 +0000
commitd21a843f23df368e191925e2665caf4ecf7390b5 (patch)
tree87910495c5fa44e70549415b226b3498b6bf156f /gtk/src/main.c
parent40373fc63256c3e135e9ca0352d70efe1291e929 (diff)
LinGui: add x264 preset/tune/profile/level support
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5110 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index eede9b2ac..0d84725f5 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -720,6 +720,7 @@ watch_volumes(signal_user_data_t *ud)
}
G_MODULE_EXPORT void x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud);
+G_MODULE_EXPORT void x264_option_changed_cb(GtkWidget *widget, signal_user_data_t *ud);
void preview_window_expose_cb(void);
// Some style definitions for the preview window and hud
@@ -859,6 +860,10 @@ main (int argc, char *argv[])
buffer = gtk_text_view_get_buffer (textview);
g_signal_connect(buffer, "changed", (GCallback)x264_entry_changed_cb, ud);
+ textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "x264OptionExtra"));
+ buffer = gtk_text_view_get_buffer (textview);
+ g_signal_connect(buffer, "changed", (GCallback)x264_option_changed_cb, ud);
+
ghb_combo_init(ud);
g_debug("ud %p\n", ud);
@@ -874,6 +879,13 @@ main (int argc, char *argv[])
// to the callbacks. Builder's standard autoconnect doesn't all this.
gtk_builder_connect_signals_full (ud->builder, MyConnect, ud);
+ GtkWidget *presetSlider = GHB_WIDGET(ud->builder, "x264PresetSlider");
+ const char * const *x264_presets;
+ int count = 0;
+ x264_presets = hb_x264_presets();
+ while (x264_presets && x264_presets[count]) count++;
+ gtk_range_set_range (GTK_RANGE(presetSlider), 0, count-1);
+
// Load all internal settings
ghb_settings_init(ud);
// Load the presets files