summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-06-02 15:32:01 +0000
committerjstebbins <[email protected]>2009-06-02 15:32:01 +0000
commitb1fcb3154f5c09a81e0cf712fad9d22f4e8e89bc (patch)
tree263ef770c5316bd112024f2a688c272c69f5b528 /gtk/src/main.c
parent8868e9649a2ff1c60a3334e00418bba92eb67f70 (diff)
softsubtitles:
- when doing an indepth scan, do not scan CC tracks - separate subtitle configureation attributes into separate hb_subtitle_config_t. Add an instance of this to hb_job_t for setting the attributes of the subtitle found through an indepth scan - Add a default_track flag to hb_subtitle_config_t that tells the muxer that the track should be flaged as the default. muxmkv uses this. - When an indepth scan is complete, check to see if the autoselected subtitle matchces (by id) one of the manually selected subtitles. If a match is found, the autoselected subtitle with all the attributes the user assigned to it replaces the manually selected subtitle. - LinGui: Add "Default" column to subtitle tab. This is a radio that lets the user choose which subtitle should be displayed by default. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2468 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index ef0dc18c2..7331c0b7e 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -384,6 +384,7 @@ extern G_MODULE_EXPORT void subtitle_list_selection_changed_cb(void);
extern G_MODULE_EXPORT void subtitle_enable_toggled_cb(void);
extern G_MODULE_EXPORT void subtitle_forced_toggled_cb(void);
extern G_MODULE_EXPORT void subtitle_burned_toggled_cb(void);
+extern G_MODULE_EXPORT void subtitle_default_toggled_cb(void);
extern G_MODULE_EXPORT void subtitle_track_changed_cb(void);
// Create and bind the tree model to the tree view for the subtitle track list
@@ -403,16 +404,17 @@ bind_subtitle_tree_model (signal_user_data_t *ud)
selection = gtk_tree_view_get_selection (treeview);
// 6 columns in model. 4 are visible, the other 2 is for storing
// values that I need
- treestore = gtk_list_store_new(7,
+ // Enable, Track, force, burn, default, type, track short, can delete
+ treestore = gtk_list_store_new(8,
G_TYPE_BOOLEAN, G_TYPE_STRING,
G_TYPE_BOOLEAN, G_TYPE_BOOLEAN,
- G_TYPE_STRING, G_TYPE_STRING,
- G_TYPE_BOOLEAN);
+ G_TYPE_BOOLEAN, G_TYPE_STRING,
+ G_TYPE_STRING, G_TYPE_BOOLEAN);
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
cell = gtk_cell_renderer_toggle_new();
column = gtk_tree_view_column_new_with_attributes(
- _("On"), cell, "active", 0, NULL);
+ _("Enable"), cell, "active", 0, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
g_signal_connect(cell, "toggled", subtitle_enable_toggled_cb, ud);
@@ -438,9 +440,16 @@ bind_subtitle_tree_model (signal_user_data_t *ud)
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
g_signal_connect(cell, "toggled", subtitle_burned_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(
+ _("Default"), cell, "active", 4, NULL);
+ gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
+ g_signal_connect(cell, "toggled", subtitle_default_toggled_cb, ud);
+
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(
- _("Type"), cell, "text", 4, NULL);
+ _("Type"), cell, "text", 5, NULL);
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));