gnome-control-center r9400 - trunk/capplets/keybindings
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-control-center r9400 - trunk/capplets/keybindings
- Date: Thu, 2 Apr 2009 16:40:37 +0000 (UTC)
Author: jensg
Date: Thu Apr 2 16:40:37 2009
New Revision: 9400
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=9400&view=rev
Log:
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)
Modified:
trunk/capplets/keybindings/ChangeLog
trunk/capplets/keybindings/gnome-keybinding-properties.c
Modified: trunk/capplets/keybindings/gnome-keybinding-properties.c
==============================================================================
--- trunk/capplets/keybindings/gnome-keybinding-properties.c (original)
+++ trunk/capplets/keybindings/gnome-keybinding-properties.c Thu Apr 2 16:40:37 2009
@@ -1590,7 +1590,7 @@
}
}
-static gboolean
+static void
start_editing_kb_cb (GtkTreeView *treeview,
GtkTreePath *path,
GtkTreeViewColumn *column,
@@ -1606,6 +1606,16 @@
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 @@
gtk_tree_view_get_column (treeview, 1),
TRUE);
}
-
- return FALSE;
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]