diff options
author | António Fernandes <antoniof@gnome.org> | 2018-08-29 09:01:50 +0100 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2018-08-29 09:41:06 +0000 |
commit | 0683ced73794582dfb020f987a081318a0cf0575 (patch) | |
tree | a8735a5cb89672717a5b2b216d0ae9608f5887ed | |
parent | 0e8988aa98b60a7a380a8f5755bc8cb7b0384bae (diff) | |
download | nautilus-0683ced73794582dfb020f987a081318a0cf0575.tar.gz |
Revert "Search filter popover on [Ctrl]+[F]"
This reverts commit 543f5ae369213f90238466e6366a0d2e09260e05.
When this feature was originally proposed, the use cases when <Ctrl><F>
is required because "just typing" doesn't do the trick were not
considered. Two such cases are searching for a ~ (tilde) and pasting
text to search with <Ctrl><V>. Both are now impractical because the
filter popover steals the focus.
Furthermore, we have a few inconsistent state bugs related to this.
Instead of shipping version 3.30 with these regressions and bugs, let's
withdraw this change.
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/597
Closes https://gitlab.gnome.org/GNOME/nautilus/issues/570
And closes https://gitlab.gnome.org/GNOME/nautilus/issues/571
-rw-r--r-- | src/nautilus-query-editor.c | 10 | ||||
-rw-r--r-- | src/nautilus-query-editor.h | 3 | ||||
-rw-r--r-- | src/nautilus-window-slot.c | 32 |
3 files changed, 3 insertions, 42 deletions
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c index 8f48b3c8e..b95dbe5c8 100644 --- a/src/nautilus-query-editor.c +++ b/src/nautilus-query-editor.c @@ -514,16 +514,6 @@ entry_tag_clicked (NautilusQueryEditor *editor) TRUE); } -void -nautilus_query_editor_show_popover (NautilusQueryEditor *editor) -{ - g_return_if_fail (NAUTILUS_IS_QUERY_EDITOR (editor)); - - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->dropdown_button), - TRUE); - gtk_widget_grab_focus (GTK_WIDGET (editor->popover)); -} - static void entry_tag_close_button_clicked (NautilusQueryEditor *editor, GdTaggedEntryTag *tag) diff --git a/src/nautilus-query-editor.h b/src/nautilus-query-editor.h index a05970dea..c09de18a0 100644 --- a/src/nautilus-query-editor.h +++ b/src/nautilus-query-editor.h @@ -75,6 +75,3 @@ void nautilus_query_editor_set_text (NautilusQueryEditor *editor, gboolean nautilus_query_editor_handle_event (NautilusQueryEditor *self, GdkEvent *event); - -void -nautilus_query_editor_show_popover (NautilusQueryEditor *editor); diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c index 0fbb9818d..b3a7bc211 100644 --- a/src/nautilus-window-slot.c +++ b/src/nautilus-window-slot.c @@ -993,17 +993,13 @@ nautilus_window_slot_constructed (GObject *object) static void action_search_visible (GSimpleAction *action, GVariant *state, - gpointer user_data, - gboolean show_popover) + gpointer user_data) { NautilusWindowSlot *self; GVariant *current_state; - NautilusWindowSlotPrivate *priv; self = NAUTILUS_WINDOW_SLOT (user_data); - priv = nautilus_window_slot_get_instance_private (self); current_state = g_action_get_state (G_ACTION (action)); - if (g_variant_get_boolean (current_state) != g_variant_get_boolean (state)) { g_simple_action_set_state (action, state); @@ -1012,10 +1008,6 @@ action_search_visible (GSimpleAction *action, { show_query_editor (self); nautilus_window_slot_set_searching (self, TRUE); - if(show_popover == TRUE) - { - nautilus_query_editor_show_popover (priv->query_editor); - } } else { @@ -1030,23 +1022,6 @@ action_search_visible (GSimpleAction *action, } static void -search_visible_with_popover (GSimpleAction *action, - GVariant *state, - gpointer user_data) -{ - action_search_visible (action, state, user_data, TRUE); -} - -static void -search_visible_without_popover (GSimpleAction *action, - GVariant *state, - gpointer user_data) -{ - action_search_visible (action, state, user_data, FALSE); -} - - -static void change_files_view_mode (NautilusWindowSlot *self, guint view_id) { @@ -1116,8 +1091,7 @@ const GActionEntry slot_entries[] = /* 4 is NAUTILUS_VIEW_INVALID_ID */ { "files-view-mode", NULL, "u", "uint32 4", action_files_view_mode }, { "files-view-mode-toggle", action_files_view_mode_toggle }, - { "search-visible", NULL, NULL, "false", search_visible_without_popover }, - { "search-visible-popover", NULL, NULL, "false", search_visible_with_popover }, + { "search-visible", NULL, NULL, "false", action_search_visible }, }; static void @@ -1230,7 +1204,7 @@ nautilus_window_slot_init (NautilusWindowSlot *self) G_ACTION_GROUP (priv->slot_action_group)); nautilus_application_set_accelerator (app, "slot.files-view-mode(uint32 1)", "<control>1"); nautilus_application_set_accelerator (app, "slot.files-view-mode(uint32 0)", "<control>2"); - nautilus_application_set_accelerator (app, "slot.search-visible-popover", "<control>f"); + nautilus_application_set_accelerator (app, "slot.search-visible", "<control>f"); priv->view_mode_before_search = NAUTILUS_VIEW_INVALID_ID; } |