Kaydet (Commit) 4ffcfbba authored tarafından Colomban Wendling's avatar Colomban Wendling

Don't allow editing keybinding column of group rows

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5681 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 65800f76
......@@ -2,6 +2,8 @@
* src/main.c, src/prefs.c, src/tools.c:
Fix loading and updating menu accelerators for custom commands.
* src/prefs.c:
Don't allow editing keybinding column of group rows.
2011-04-02 Colomban Wendling <colomban(at)geany(dot)org>
......
......@@ -128,7 +128,8 @@ enum
{
KB_TREE_ACTION,
KB_TREE_SHORTCUT,
KB_TREE_INDEX
KB_TREE_INDEX,
KB_TREE_EDITABLE
};
......@@ -266,7 +267,7 @@ static void kb_init_tree(void)
tree = GTK_TREE_VIEW(ui_lookup_widget(ui_widgets.prefs_dialog, "treeview7"));
store = gtk_tree_store_new(3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT);
store = gtk_tree_store_new(4, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN);
gtk_tree_view_set_model(GTK_TREE_VIEW(tree), GTK_TREE_MODEL(store));
g_object_unref(store);
......@@ -275,8 +276,8 @@ static void kb_init_tree(void)
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
renderer = gtk_cell_renderer_text_new();
g_object_set(renderer, "editable", TRUE, NULL);
column = gtk_tree_view_column_new_with_attributes(_("Shortcut"), renderer, "text", KB_TREE_SHORTCUT, NULL);
column = gtk_tree_view_column_new_with_attributes(_("Shortcut"), renderer,
"text", KB_TREE_SHORTCUT, "editable", KB_TREE_EDITABLE, NULL);
gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column);
/* set policy settings for the scrolled window around the treeview again, because glade
......@@ -316,7 +317,7 @@ static void kb_init(void)
key_string = gtk_accelerator_name(kb->key, kb->mods);
gtk_tree_store_append(store, &iter, &parent);
gtk_tree_store_set(store, &iter, KB_TREE_ACTION, label,
KB_TREE_SHORTCUT, key_string, KB_TREE_INDEX, kb->id, -1);
KB_TREE_SHORTCUT, key_string, KB_TREE_EDITABLE, TRUE, KB_TREE_INDEX, kb->id, -1);
g_free(key_string);
g_free(label);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment