From b5526f35fe83ede6affbdeb9eed3e4e6d9c8f6b1 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Tue, 30 Jun 2009 17:22:43 +0000 Subject: LinGui: SRT support - there are now two buttons to add subtitles one button adds normal subtitles from the source. the second adds SRT subtitles. - when an SRT subtitle is selected in the list, the available controls change SRT controls are: Language, Character Codeset, File, and Time Offset (ms) - A combo entry box is used for character code. A subset of the most common character codes is available in the popup. Other codes can be manually entered in the entry box. - The last used SRT file directory is remembered. - Remove the debug printf eddyg left in decsrtsub.c git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2648 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/main.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'gtk/src/main.c') diff --git a/gtk/src/main.c b/gtk/src/main.c index 34d3c149d..48a8e8d0d 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -404,12 +404,16 @@ bind_subtitle_tree_model (signal_user_data_t *ud) selection = gtk_tree_view_get_selection (treeview); // 6 columns in model. 5 are visible, the other 1 is for storing // values that I need - // Track, force, burn, default, type, track short - treestore = gtk_list_store_new(6, + // Track, force, burn, default, type, srt offset, track short, source + // force visible, burn visible, offset visible + treestore = gtk_list_store_new(11, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_STRING, - G_TYPE_STRING); + G_TYPE_INT, G_TYPE_STRING, + G_TYPE_INT, + G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, + G_TYPE_BOOLEAN); gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore)); cell = gtk_cell_renderer_text_new(); @@ -421,14 +425,14 @@ bind_subtitle_tree_model (signal_user_data_t *ud) cell = gtk_cell_renderer_toggle_new(); column = gtk_tree_view_column_new_with_attributes( - _("Forced Only"), cell, "active", 1, NULL); + _("Forced Only"), cell, "active", 1, "visible", 8, NULL); gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column)); g_signal_connect(cell, "toggled", subtitle_forced_toggled_cb, ud); cell = gtk_cell_renderer_toggle_new(); gtk_cell_renderer_toggle_set_radio(GTK_CELL_RENDERER_TOGGLE(cell), TRUE); column = gtk_tree_view_column_new_with_attributes( - _("Burned In"), cell, "active", 2, NULL); + _("Burned In"), cell, "active", 2, "visible", 9, NULL); gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column)); g_signal_connect(cell, "toggled", subtitle_burned_toggled_cb, ud); @@ -443,6 +447,12 @@ bind_subtitle_tree_model (signal_user_data_t *ud) column = gtk_tree_view_column_new_with_attributes( _("Type"), cell, "text", 4, NULL); gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column)); + gtk_tree_view_column_set_min_width (column, 240); + + cell = gtk_cell_renderer_text_new(); + column = gtk_tree_view_column_new_with_attributes( + _("Srt Offset"), cell, "text", 5, "visible", 10, NULL); + gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column)); g_signal_connect(selection, "changed", subtitle_list_selection_changed_cb, ud); -- cgit v1.2.3