diff --git a/plugins/filebrowser/xed-file-browser-view.c b/plugins/filebrowser/xed-file-browser-view.c index 7eddd49..ff07ef3 100644 --- a/plugins/filebrowser/xed-file-browser-view.c +++ b/plugins/filebrowser/xed-file-browser-view.c @@ -593,14 +593,15 @@ button_press_event (GtkWidget *widget, if (event->type == GDK_2BUTTON_PRESS) { + /* Chain up, must be before activating the selected + items because this will cause the view to grab focus */ + widget_parent->button_press_event (widget, event); + if (view->priv->double_click_path[1] && gtk_tree_path_compare (view->priv->double_click_path[0], view->priv->double_click_path[1]) == 0) { activate_selected_items (view); } - - /* Chain up */ - widget_parent->button_press_event (widget, event); } else { diff --git a/xed/xed-commands-file.c b/xed/xed-commands-file.c index 7602efe..91fc2c2 100644 --- a/xed/xed-commands-file.c +++ b/xed/xed-commands-file.c @@ -193,6 +193,9 @@ load_file_list (XedWindow *window, { _xed_tab_load (tab, l->data, encoding, line_pos, create); + /* make sure the view has focus */ + gtk_widget_grab_focus (GTK_WIDGET (xed_tab_get_view (tab))); + l = g_slist_next (l); jump_to = FALSE; diff --git a/xed/xed-documents-panel.c b/xed/xed-documents-panel.c index 8f3aff4..dad2282 100644 --- a/xed/xed-documents-panel.c +++ b/xed/xed-documents-panel.c @@ -716,6 +716,14 @@ xed_documents_panel_init (XedDocumentsPanel *panel) gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (panel->priv->treeview), FALSE); gtk_tree_view_set_reorderable (GTK_TREE_VIEW (panel->priv->treeview), TRUE); + /* Disable search because each time the selection is changed, the + active tab is changed which focusses the view, and thus would remove + the search entry, rendering it useless */ + gtk_tree_view_set_enable_search (GTK_TREE_VIEW (panel->priv->treeview), FALSE); + + /* Disable focus so it doesn't steel focus each time from the view */ + gtk_widget_set_can_focus (panel->priv->treeview, FALSE); + g_object_set (panel->priv->treeview, "has-tooltip", TRUE, NULL); gtk_widget_show (panel->priv->treeview); diff --git a/xed/xed-window.c b/xed/xed-window.c index a378b01..77207cb 100644 --- a/xed/xed-window.c +++ b/xed/xed-window.c @@ -3970,6 +3970,9 @@ xed_window_set_active_tab (XedWindow *window, page_num = gtk_notebook_page_num (GTK_NOTEBOOK(window->priv->notebook), GTK_WIDGET(tab)); g_return_if_fail(page_num != -1); gtk_notebook_set_current_page (GTK_NOTEBOOK(window->priv->notebook), page_num); + + /* Make sure to grab focus if the page didn't change */ + gtk_widget_grab_focus (GTK_WIDGET (xed_tab_get_view (tab))); } /**