summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2013-08-25 17:00:00 +0200
committerGravatar waker <wakeroid@gmail.com>2013-08-25 17:00:00 +0200
commitaca5ab815a34e92c87b4ea25c1f8980d5be1a2b0 (patch)
tree70b6eaf9d46ce3bb4fc52dbd2da03a491aaf80ea /plugins
parent5802fcec75b58a270a9459fb26a606af018adaf0 (diff)
gtkui: playing with hotkey focus
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/ddblistview.c11
-rw-r--r--plugins/gtkui/hotkeys.c1
2 files changed, 5 insertions, 7 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c
index 9ae0db19..080b6161 100644
--- a/plugins/gtkui/ddblistview.c
+++ b/plugins/gtkui/ddblistview.c
@@ -1873,7 +1873,7 @@ ddb_listview_list_set_hscroll (DdbListview *ps, int newscroll) {
}
}
-int
+gboolean
ddb_listview_handle_keypress (DdbListview *ps, int keyval, int state) {
int prev = ps->binding->cursor ();
int cursor = prev;
@@ -1951,10 +1951,10 @@ ddb_listview_handle_keypress (DdbListview *ps, int keyval, int state) {
ps->binding->list_context_menu (ps, it, sel);
ps->binding->unref (it);
}
- return 0;
+ return TRUE;
}
else {
- return 0;
+ return FALSE;
}
if (state & GDK_SHIFT_MASK) {
@@ -2017,7 +2017,7 @@ ddb_listview_handle_keypress (DdbListview *ps, int keyval, int state) {
ps->shift_sel_anchor = cursor;
ddb_listview_set_cursor (ps, cursor);
}
- return 1;
+ return TRUE;
}
int
@@ -3087,8 +3087,7 @@ ddb_listview_clear_sort (DdbListview *listview) {
gboolean
ddb_listview_list_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
DdbListview *listview = DDB_LISTVIEW (g_object_get_data (G_OBJECT (widget), "owner"));
- ddb_listview_handle_keypress (listview, event->keyval, event->state);
- return FALSE;
+ return ddb_listview_handle_keypress (listview, event->keyval, event->state);
}
diff --git a/plugins/gtkui/hotkeys.c b/plugins/gtkui/hotkeys.c
index 04f6af47..dcf17c09 100644
--- a/plugins/gtkui/hotkeys.c
+++ b/plugins/gtkui/hotkeys.c
@@ -497,7 +497,6 @@ on_hotkeys_list_cursor_changed (GtkTreeView *treeview,
}
else {
gtk_widget_set_sensitive (lookup_widget (prefwin, "hotkeys_actions"), FALSE);
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (lookup_widget (prefwin, "hotkeys_actions")), NULL, NULL, FALSE);
gtk_widget_set_sensitive (lookup_widget (prefwin, "hotkey_is_global"), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (lookup_widget (prefwin, "hotkey_is_global")), FALSE);
gtk_widget_set_sensitive (lookup_widget (prefwin, "hotkeys_set_key"), FALSE);