[gnome-control-center/wip/new-keybindings-ui: 2/20] keyboard: Use the same code formatting everywhere
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/new-keybindings-ui: 2/20] keyboard: Use the same code formatting everywhere
- Date: Thu, 9 Dec 2010 13:32:22 +0000 (UTC)
commit 9ac1c649fc464caee582762da13921df14011826
Author: Rodrigo Moya <rodrigo gnome-db org>
Date: Tue Dec 7 14:06:50 2010 +0100
keyboard: Use the same code formatting everywhere
panels/keyboard/gnome-keyboard-panel.c | 72 ++++++++++++++++----------------
1 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/panels/keyboard/gnome-keyboard-panel.c b/panels/keyboard/gnome-keyboard-panel.c
index 4950757..3f58fad 100644
--- a/panels/keyboard/gnome-keyboard-panel.c
+++ b/panels/keyboard/gnome-keyboard-panel.c
@@ -1612,45 +1612,45 @@ start_editing_kb_cb (GtkTreeView *treeview,
GtkTreeViewColumn *column,
gpointer user_data)
{
- GtkTreeModel *model;
- GtkTreeIter iter;
- KeyEntry *key;
-
- model = gtk_tree_view_get_model (treeview);
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_model_get (model, &iter,
- KEYENTRY_COLUMN, &key,
- -1);
+ GtkTreeModel *model;
+ GtkTreeIter iter;
+ KeyEntry *key;
- 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;
- }
+ model = gtk_tree_view_get_model (treeview);
+ gtk_tree_model_get_iter (model, &iter, path);
+ gtk_tree_model_get (model, &iter,
+ KEYENTRY_COLUMN, &key,
+ -1);
- /* if only the accel can be edited on the selected row
- * always select the accel column */
- if (key->desc_editable &&
- column == gtk_tree_view_get_column (treeview, 0))
- {
- gtk_widget_grab_focus (GTK_WIDGET (treeview));
- gtk_tree_view_set_cursor (treeview, path,
- gtk_tree_view_get_column (treeview, 0),
- FALSE);
- update_custom_shortcut (model, &iter);
- }
+ 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_widget_grab_focus (GTK_WIDGET (treeview));
- gtk_tree_view_set_cursor (treeview,
- path,
- gtk_tree_view_get_column (treeview, 1),
- TRUE);
- }
+ 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 &&
+ column == gtk_tree_view_get_column (treeview, 0))
+ {
+ gtk_widget_grab_focus (GTK_WIDGET (treeview));
+ gtk_tree_view_set_cursor (treeview, path,
+ gtk_tree_view_get_column (treeview, 0),
+ FALSE);
+ update_custom_shortcut (model, &iter);
+ }
+ else
+ {
+ gtk_widget_grab_focus (GTK_WIDGET (treeview));
+ gtk_tree_view_set_cursor (treeview,
+ path,
+ gtk_tree_view_get_column (treeview, 1),
+ TRUE);
+ }
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]