diff options
author | 2012-11-25 12:38:03 +0100 | |
---|---|---|
committer | 2012-11-25 12:38:03 +0100 | |
commit | 9137f81defa498f29f824dc5834f2051f3487a89 (patch) | |
tree | d6e2d312fc1e4a316a78a947d8c05ef828bee64f /plugins/gtkui/hotkeys.c | |
parent | e1e8da8bfe85e42b4e0c893170acd7ecbe3af512 (diff) |
gtkui: set cursor to new hotkey after it's been added
Diffstat (limited to 'plugins/gtkui/hotkeys.c')
-rw-r--r-- | plugins/gtkui/hotkeys.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/gtkui/hotkeys.c b/plugins/gtkui/hotkeys.c index f13fbee1..3556ed35 100644 --- a/plugins/gtkui/hotkeys.c +++ b/plugins/gtkui/hotkeys.c @@ -436,6 +436,10 @@ on_hotkey_add_clicked (GtkButton *button, GtkTreeIter iter; gtk_list_store_append (hkstore, &iter); gtk_list_store_set (hkstore, &iter, 0, _("<Not set>"), 1, _("<Not set>"), 2, _("<Not set>"), 3, 0, 4, NULL, 5, -1, -1); + GtkTreePath *path = gtk_tree_model_get_path (GTK_TREE_MODEL (hkstore), &iter); + gtk_tree_view_set_cursor (GTK_TREE_VIEW (hotkeys), path, NULL, FALSE); + gtk_tree_path_free (path); + gtk_widget_grab_focus (hotkeys); } |