From 998a6adf0e9f4697ea6cfa6fdff8cf8c0f3af1a1 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Wed, 20 May 2009 16:00:52 +0000 Subject: LinGui: give feedback indicating problems with subtitle selections - highlight subtitles that can not be encoded for some reason example: user adds several subtitles, then changes container from mkv to mp4 - validate subtitle list when adding to queue and show warning popup when there's a problem git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2432 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gtk/src/main.c') diff --git a/gtk/src/main.c b/gtk/src/main.c index d7a15c1b1..a9c07fab2 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -395,17 +395,19 @@ bind_subtitle_tree_model (signal_user_data_t *ud) g_debug("bind_subtitle_tree_model ()\n"); treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "subtitle_list")); selection = gtk_tree_view_get_selection (treeview); - // 5 columns in model. 4 are visible, the other 1 is for storing + // 6 columns in model. 4 are visible, the other 2 is for storing // values that I need - treestore = gtk_list_store_new(5, + treestore = gtk_list_store_new(8, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, - G_TYPE_STRING, G_TYPE_STRING); + G_TYPE_STRING, G_TYPE_STRING, + G_TYPE_STRING, G_TYPE_INT, + G_TYPE_INT); gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore)); cell = gtk_cell_renderer_text_new(); - column = gtk_tree_view_column_new_with_attributes( - _("Track"), cell, "text", 0, NULL); + column = gtk_tree_view_column_new_with_attributes( _("Track"), cell, + "text", 0, "foreground", 5, "weight", 6, "style", 7, NULL); gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column)); cell = gtk_cell_renderer_toggle_new(); @@ -418,7 +420,7 @@ bind_subtitle_tree_model (signal_user_data_t *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, "cell-background", 5, NULL); gtk_tree_view_column_set_max_width (column, 50); gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column)); g_signal_connect(cell, "toggled", subtitle_burned_toggled_cb, ud); -- cgit v1.2.3