summarylogtreecommitdiffstats
path: root/nautilus-restore-typeahead.patch
diff options
context:
space:
mode:
authorAlbert Vaca2018-03-26 14:03:02 +0200
committerAlbert Vaca2018-03-26 14:03:22 +0200
commit3705d540b5f1f887c8414b2b4a6d8dce092c2e60 (patch)
tree314f83d7889178d5adf82da39f0d65837a9000ee /nautilus-restore-typeahead.patch
parent662e34f5884f7b2d01280270b9a7320091f2b944 (diff)
downloadaur-3705d540b5f1f887c8414b2b4a6d8dce092c2e60.tar.gz
Upgrade to 3.28.0.1
Also made nautilus-sendto optional
Diffstat (limited to 'nautilus-restore-typeahead.patch')
-rw-r--r--nautilus-restore-typeahead.patch62
1 files changed, 31 insertions, 31 deletions
diff --git a/nautilus-restore-typeahead.patch b/nautilus-restore-typeahead.patch
index 9c1f4890acfb..7ed3e727ee61 100644
--- a/nautilus-restore-typeahead.patch
+++ b/nautilus-restore-typeahead.patch
@@ -21,13 +21,13 @@ index ce0b32c9d..a624e7551 100644
@@ -161,6 +161,9 @@ typedef enum
/* Recent files */
#define NAUTILUS_PREFERENCES_RECENT_FILES_ENABLED "remember-recent-files"
-
+
+/* Interactive search (typeahead) */
+#define NAUTILUS_PREFERENCES_ENABLE_INTERACTIVE_SEARCH "enable-interactive-search"
+
/* Move to trash shorcut changed dialog */
#define NAUTILUS_PREFERENCES_SHOW_MOVE_TO_TRASH_SHORTCUT_CHANGED_DIALOG "show-move-to-trash-shortcut-changed-dialog"
-
+
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
index 759e3b158..fbfbd6fee 100644
--- a/src/nautilus-list-view.c
@@ -36,28 +36,28 @@ index 759e3b158..fbfbd6fee 100644
GList *node;
GList *iters, *l;
NautilusFile *file;
-+ GtkTreePath *path = NULL;
-
++ GtkTreePath *path2 = NULL;
+
list_view = NAUTILUS_LIST_VIEW (view);
tree_selection = gtk_tree_view_get_selection (list_view->details->tree_view);
@@ -2778,10 +2779,22 @@ nautilus_list_view_set_selection (NautilusFilesView *view,
{
gtk_tree_selection_select_iter (tree_selection,
(GtkTreeIter *) l->data);
-+ if (!path)
-+ path = gtk_tree_model_get_path (GTK_TREE_MODEL (list_view->details->model), (GtkTreeIter *) l->data);
++ if (!path2)
++ path2 = gtk_tree_model_get_path (GTK_TREE_MODEL (list_view->details->model), (GtkTreeIter *) l->data);
}
+
g_list_free_full (iters, g_free);
}
-
-+ if (path) {
+
++ if (path2) {
+ gtk_tree_view_set_cursor_on_cell (list_view->details->tree_view,
-+ path,
++ path2,
+ list_view->details->file_name_column,
+ GTK_CELL_RENDERER (list_view->details->file_name_cell),
+ TRUE);
-+ gtk_tree_path_free (path);
++ gtk_tree_path_free (path2);
+ }
+
g_signal_handlers_unblock_by_func (tree_selection, list_selection_changed_callback, view);
@@ -79,10 +79,10 @@ index 04989fa95..fc15f0986 100644
+++ b/src/nautilus-list-view.h
@@ -39,5 +39,6 @@ struct _NautilusListView
};
-
+
NautilusFilesView * nautilus_list_view_new (NautilusWindowSlot *slot);
+GtkTreeView * nautilus_list_view_get_tree_view (NautilusListView *list_view);
-
+
#endif /* NAUTILUS_LIST_VIEW_H */
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
index d364115a9..054edba8a 100644
@@ -104,12 +104,12 @@ index d364115a9..054edba8a 100644
+ guint isearch_timeout_id;
+ gulong isearch_configure_event_id;
} NautilusWindowSlotPrivate;
-
+
G_DEFINE_TYPE_WITH_PRIVATE (NautilusWindowSlot, nautilus_window_slot, GTK_TYPE_BOX);
@@ -208,6 +219,98 @@ nautilus_window_slot_get_restore_tab_data (NautilusWindowSlot *self)
return data;
}
-
+
+
+/* Interactive search */
+static void isearch_ensure (NautilusWindowSlot *slot);
@@ -208,7 +208,7 @@ index d364115a9..054edba8a 100644
@@ -637,21 +740,86 @@ nautilus_window_slot_handle_event (NautilusWindowSlot *self,
}
}
-
+
- /* If the action is not enabled, don't try to handle search */
- if (g_action_get_enabled (action))
- {
@@ -265,7 +265,7 @@ index d364115a9..054edba8a 100644
+ gtk_widget_grab_focus (GTK_WIDGET (self));
+ return TRUE;
+ }
-
+
- if (retval)
- {
- nautilus_window_slot_set_search_visible (self, TRUE);
@@ -285,10 +285,10 @@ index d364115a9..054edba8a 100644
+ nautilus_window_slot_set_search_visible (self, TRUE);
+ }
}
-
+
return retval;
}
-
+
+/* static gboolean
+configure_event_cb (GtkWidget *widget,
+ GdkEventConfigure *event,
@@ -306,11 +306,11 @@ index d364115a9..054edba8a 100644
{
NautilusWindow *window;
+ NautilusWindowSlotPrivate *priv;
-
+
+ priv = nautilus_window_slot_get_instance_private (self);
window = nautilus_window_slot_get_window (self);
g_assert (self == nautilus_window_get_active_slot (window));
-
+
+ isearch_hide (self, NULL);
+ if (priv->isearch_configure_event_id != 0) {
+ g_signal_handler_disconnect (GTK_WIDGET (priv->window),
@@ -320,11 +320,11 @@ index d364115a9..054edba8a 100644
+
gtk_widget_insert_action_group (GTK_WIDGET (window), "slot", NULL);
}
-
+
@@ -976,9 +1153,30 @@ nautilus_window_slot_init (NautilusWindowSlot *self)
nautilus_application_set_accelerator (app, "slot.files-view-mode(uint32 0)", "<control>2");
nautilus_application_set_accelerator (app, "slot.search-visible", "<control>f");
-
+
+ priv->isearch_enable = g_settings_get_boolean (nautilus_preferences,
+ NAUTILUS_PREFERENCES_ENABLE_INTERACTIVE_SEARCH);
+
@@ -335,7 +335,7 @@ index d364115a9..054edba8a 100644
+
priv->view_mode_before_search = NAUTILUS_VIEW_INVALID_ID;
}
-
+
+static void
+nautilus_window_slot_finalize (GObject *object)
+{
@@ -351,13 +351,13 @@ index d364115a9..054edba8a 100644
+
#define DEBUG_FLAG NAUTILUS_DEBUG_WINDOW
#include "nautilus-debug.h"
-
+
@@ -2782,6 +2980,7 @@ nautilus_window_slot_dispose (GObject *object)
-
+
self = NAUTILUS_WINDOW_SLOT (object);
priv = nautilus_window_slot_get_instance_private (self);
+ isearch_dispose (self);
-
+
nautilus_window_slot_clear_forward_list (self);
nautilus_window_slot_clear_back_list (self);
@@ -2873,6 +3072,7 @@ nautilus_window_slot_class_init (NautilusWindowSlotClass *klass)
@@ -365,11 +365,11 @@ index d364115a9..054edba8a 100644
oclass->set_property = nautilus_window_slot_set_property;
oclass->get_property = nautilus_window_slot_get_property;
+ oclass->finalize = nautilus_window_slot_finalize;
-
+
widget_class->grab_focus = nautilus_window_slot_grab_focus;
-
+
@@ -3295,3 +3495,792 @@ nautilus_window_slot_get_loading (NautilusWindowSlot *self)
-
+
return priv->loading;
}
+
@@ -515,7 +515,7 @@ index d364115a9..054edba8a 100644
+ {
+ NautilusCanvasContainer *cc = nautilus_canvas_view_get_canvas_container (
+ NAUTILUS_CANVAS_VIEW (priv->content_view));
-+ gboolean retval;
++ gboolean retval = FALSE;
+
+ if (event->window == gtk_layout_get_bin_window (GTK_LAYOUT (cc)))
+ g_signal_emit_by_name (GTK_WIDGET (cc), "button-press-event", event,
@@ -525,7 +525,7 @@ index d364115a9..054edba8a 100644
+ }
+ else if (NAUTILUS_IS_LIST_VIEW (priv->content_view))
+ {
-+ gboolean retval;
++ gboolean retval = FALSE;
+ // NautilusListView *lv = NAUTILUS_LIST_VIEW (priv->content_view);
+ GtkTreeView *tv =
+ nautilus_list_view_get_tree_view (NAUTILUS_LIST_VIEW (priv->content_view));