make activating a section header row expand or collapse the section as
2009-04-02 Jens Granseuer <jensgr@gmx.net> * gnome-keybinding-properties.c: (start_editing_kb_cb): make activating a section header row expand or collapse the section as expected instead of crashing (bug #577474) svn path=/trunk/; revision=9400
This commit is contained in:
parent
0ff079d565
commit
0f943122ff
2 changed files with 19 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2009-04-02 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* gnome-keybinding-properties.c: (start_editing_kb_cb): make
|
||||
activating a section header row expand or collapse the section as
|
||||
expected instead of crashing (bug #577474)
|
||||
|
||||
==================== 2.26.0 ====================
|
||||
|
||||
2009-03-06 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* gnome-keybinding-properties.glade: fix mnemonics conflict on the
|
||||
|
|
|
@ -1590,7 +1590,7 @@ add_custom_shortcut (GtkTreeView *tree_view,
|
|||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
static void
|
||||
start_editing_kb_cb (GtkTreeView *treeview,
|
||||
GtkTreePath *path,
|
||||
GtkTreeViewColumn *column,
|
||||
|
@ -1606,6 +1606,16 @@ start_editing_kb_cb (GtkTreeView *treeview,
|
|||
KEYENTRY_COLUMN, &key,
|
||||
-1);
|
||||
|
||||
if (key == NULL)
|
||||
{
|
||||
/* This is a section heading - expand or collapse */
|
||||
if (gtk_tree_view_row_expanded (treeview, path))
|
||||
gtk_tree_view_collapse_row (treeview, path);
|
||||
else
|
||||
gtk_tree_view_expand_row (treeview, path, FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
/* if only the accel can be edited on the selected row
|
||||
* always select the accel column */
|
||||
if (key->desc_editable &&
|
||||
|
@ -1625,8 +1635,6 @@ start_editing_kb_cb (GtkTreeView *treeview,
|
|||
gtk_tree_view_get_column (treeview, 1),
|
||||
TRUE);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue