summaryrefslogtreecommitdiffstats
path: root/gtk/src/main.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2009-07-11 17:34:29 +0000
committerjstebbins <[email protected]>2009-07-11 17:34:29 +0000
commit890091c4b70840627df66b7826f522fd8dc936b2 (patch)
treebda558a2abd898de03e4481c17006c944ca80db1 /gtk/src/main.c
parentadadf0a418c77c2d89470b7f0efbf661c3981296 (diff)
LinGui: more preset list improvements
- Make separate menu items for creating new folders and saving presets - Make custom preset and folder names editable git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2684 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/main.c')
-rw-r--r--gtk/src/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gtk/src/main.c b/gtk/src/main.c
index c089a7616..efc2fbc99 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -467,6 +467,7 @@ bind_subtitle_tree_model (signal_user_data_t *ud)
extern G_MODULE_EXPORT void presets_list_selection_changed_cb(void);
extern G_MODULE_EXPORT void presets_drag_cb(void);
extern G_MODULE_EXPORT void presets_drag_motion_cb(void);
+extern G_MODULE_EXPORT void preset_edited_cb(void);
extern void presets_row_expanded_cb(void);
// Create and bind the tree model to the tree view for the preset list
@@ -487,13 +488,17 @@ bind_presets_tree_model (signal_user_data_t *ud)
g_debug("bind_presets_tree_model ()\n");
treeview = GTK_TREE_VIEW(GHB_WIDGET (ud->builder, "presets_list"));
selection = gtk_tree_view_get_selection (treeview);
- treestore = gtk_tree_store_new(5, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
- G_TYPE_STRING, G_TYPE_STRING);
+ treestore = gtk_tree_store_new(6, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT,
+ G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
gtk_tree_view_set_model(treeview, GTK_TREE_MODEL(treestore));
cell = gtk_cell_renderer_text_new();
column = gtk_tree_view_column_new_with_attributes(_("Preset Name"), cell,
- "text", 0, "weight", 1, "style", 2, "foreground", 3, NULL);
+ "text", 0, "weight", 1, "style", 2,
+ "foreground", 3, "editable", 5, NULL);
+
+ g_signal_connect(cell, "edited", preset_edited_cb, ud);
+
gtk_tree_view_append_column(treeview, GTK_TREE_VIEW_COLUMN(column));
gtk_tree_view_column_set_expand (column, TRUE);
gtk_tree_view_set_tooltip_column (treeview, 4);