After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 679900 - Awesomer search
Awesomer search
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 42203 663211 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-07-13 23:29 UTC by William Jon McCann
Modified: 2012-08-14 01:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Combine the search bar and query editor (54.87 KB, patch)
2012-07-13 23:29 UTC, William Jon McCann
reviewed Details | Review
Enable "just type" searching (17.28 KB, patch)
2012-07-13 23:29 UTC, William Jon McCann
none Details | Review
Interpret a blank search as a search for any name (2.12 KB, patch)
2012-07-13 23:29 UTC, William Jon McCann
accepted-commit_now Details | Review
Shorten the live search timeout value (786 bytes, patch)
2012-07-13 23:29 UTC, William Jon McCann
committed Details | Review
Enable "just type" searching (33.45 KB, patch)
2012-07-14 00:53 UTC, William Jon McCann
reviewed Details | Review
Combine the search bar and query editor (54.92 KB, patch)
2012-07-14 11:27 UTC, William Jon McCann
committed Details | Review
Enable "just type" searching (33.43 KB, patch)
2012-07-14 11:27 UTC, William Jon McCann
committed Details | Review
Interpret a blank search as a search for any name (2.74 KB, patch)
2012-07-14 11:27 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-07-13 23:29:01 UTC
It would be nice to have an awesomer search. There are a few things we may
be able to do.

 * Integrate the search and query editor bars to save space and make it
   easier to use and less disruptive when it comes up
 * Bring up the search when typing anything in the window
 * Make search faster
 * Allow a simpler way to select where to search
Comment 1 William Jon McCann 2012-07-13 23:29:03 UTC
Created attachment 218769 [details] [review]
Combine the search bar and query editor

Save vertical space by integrating the search bar
with the query editor. This makes it less visually
disruptive when a search becomes active.
Comment 2 William Jon McCann 2012-07-13 23:29:07 UTC
Created attachment 218770 [details] [review]
Enable "just type" searching
Comment 3 William Jon McCann 2012-07-13 23:29:09 UTC
Created attachment 218771 [details] [review]
Interpret a blank search as a search for any name

This allows us to filter the list based on other parameters
like file type and to make clearing the search make more sense.
Comment 4 William Jon McCann 2012-07-13 23:29:12 UTC
Created attachment 218772 [details] [review]
Shorten the live search timeout value

This makes search more responsive.
Comment 5 William Jon McCann 2012-07-14 00:53:16 UTC
Created attachment 218783 [details] [review]
Enable "just type" searching

Remove all the unused code.
Comment 6 Cosimo Cecchi 2012-07-14 03:08:12 UTC
Review of attachment 218769 [details] [review]:

Looks great, just a couple of minor things

::: src/nautilus-query-editor.c
@@ +1099,3 @@
+		gtk_button_set_label (GTK_BUTTON (editor->details->search_current_button),
+				      name);
+		} else {

You should unref the NautilusFile

::: src/nautilus-window-slot.c
@@ +132,3 @@
+		   current query. */
+		create_new_search (slot);
+	g_object_unref (location);

I don't think it's correct to return here

@@ +667,3 @@
+	NautilusDirectory *directory;
+
+	directory = nautilus_directory_get (slot->location);

We're leaking the NautilusDirectory
Comment 7 Cosimo Cecchi 2012-07-14 03:11:10 UTC
Review of attachment 218771 [details] [review]:

Looks good

::: src/nautilus-query-editor.c
@@ +1075,3 @@
 query_is_valid (NautilusQueryEditor *editor)
 {
+	return TRUE;

Can we remove this function altogether? (not a blocker for merging it)
Comment 8 Cosimo Cecchi 2012-07-14 03:11:34 UTC
Review of attachment 218772 [details] [review]:

Okay
Comment 9 Cosimo Cecchi 2012-07-14 03:21:20 UTC
Review of attachment 218783 [details] [review]:

::: src/nautilus-window-slot.c
@@ +200,3 @@
+		gtk_widget_hide (GTK_WIDGET (slot->query_editor));
+		g_signal_handler_disconnect (slot->query_editor, slot->qe_changed_id);
+		g_signal_handler_disconnect (slot->query_editor, slot->qe_cancel_id);

Are you sure this function is called always with alternating values for the visible parameter?

::: src/nautilus-window.c
@@ +1508,3 @@
+		if (nautilus_window_slot_handle_event (window->details->active_slot, event)) {
+			toggle_toolbar_search_button (window, TRUE);
+			handled = TRUE;

You could follow the same style of the rest of the function and return TRUE here directly without using another variable.
Comment 10 William Jon McCann 2012-07-14 11:27:17 UTC
Created attachment 218802 [details] [review]
Combine the search bar and query editor

Save vertical space by integrating the search bar
with the query editor. This makes it less visually
disruptive when a search becomes active.
Comment 11 William Jon McCann 2012-07-14 11:27:41 UTC
Created attachment 218803 [details] [review]
Enable "just type" searching
Comment 12 William Jon McCann 2012-07-14 11:27:57 UTC
Created attachment 218804 [details] [review]
Interpret a blank search as a search for any name

This allows us to filter the list based on other parameters
like file type and to make clearing the search make more sense.
Comment 13 Cosimo Cecchi 2012-07-14 15:28:35 UTC
Review of attachment 218802 [details] [review]:

Looks good
Comment 14 Cosimo Cecchi 2012-07-14 15:33:40 UTC
Review of attachment 218803 [details] [review]:

Looks good

::: src/nautilus-window.c
@@ +1510,3 @@
+			return TRUE;
+		}
+	    event->keyval != GDK_KEY_Delete) {

Can you remove the handled variable completely? It's always FALSE
Comment 15 Cosimo Cecchi 2012-07-14 15:34:16 UTC
Review of attachment 218804 [details] [review]:

Looks good
Comment 16 Tobias Wolf 2012-07-15 15:55:50 UTC
The new search is cool, but replacing the previous type-ahead search to find and select stuff in the current view with the immediate recursive directory crawling is a bad idea.

In a folder full of stuff, how do I quickly jump to a particular file or folder?
I know there’s still Ctrl-S, this is not the same.

I think tying type-ahead to the crawling search is a bad idea. Crawling is slow, and people are used to typing initial letters to scroll to and highlight what they are looking for.
Comment 17 Alexandre Franke 2012-07-19 14:13:23 UTC
(In reply to comment #16)
> I think tying type-ahead to the crawling search is a bad idea. Crawling is
> slow, and people are used to typing initial letters to scroll to and highlight
> what they are looking for.

True. Should we file a bug to report the fact that this essential feature is now broken?
Comment 18 Tobias Wolf 2012-07-19 14:35:57 UTC
Alex, cf. bug #680118
Comment 19 William Jon McCann 2012-07-20 13:19:04 UTC
*** Bug 663211 has been marked as a duplicate of this bug. ***
Comment 20 William Jon McCann 2012-08-14 01:02:25 UTC
*** Bug 42203 has been marked as a duplicate of this bug. ***