static void query_editor_changed_callback (NemoQueryEditor *editor, NemoQuery *query, gboolean reload, NemoWindowSlot *slot) { NemoDirectory *directory; g_assert (NEMO_IS_FILE (slot->viewed_file)); directory = nemo_directory_get_for_file (slot->viewed_file); if (!NEMO_IS_SEARCH_DIRECTORY (directory)) { /* this is the first change from the query editor. we ask for a location change to the search directory, indicate the directory needs to be sync'd with the current query. */ create_new_search (slot); /* Focus is now on the new slot, move it back to query_editor */ gtk_widget_grab_focus (GTK_WIDGET (slot->query_editor)); } else { sync_search_directory (slot); } nemo_directory_unref (directory); }
static void sync_search_location_cb (NemoWindow *window, GError *error, gpointer user_data) { NemoWindowSlot *slot = user_data; sync_search_directory (slot); }
static gboolean sync_search_location_cb (NautilusWindow *window, GError *error, gpointer user_data) { NautilusWindowSlot *slot = user_data; if (error == NULL) { sync_search_directory (slot); } return (error == NULL); }
static void query_editor_changed_callback (NautilusQueryEditor *editor, NautilusQuery *query, gboolean reload, NautilusWindowSlot *slot) { NautilusDirectory *directory; g_assert (NAUTILUS_IS_FILE (slot->viewed_file)); directory = nautilus_directory_get_for_file (slot->viewed_file); if (!NAUTILUS_IS_SEARCH_DIRECTORY (directory)) { /* this is the first change from the query editor. we ask for a location change to the search directory, indicate the directory needs to be sync'd with the current query. */ create_new_search (slot); } else { sync_search_directory (slot); } nautilus_directory_unref (directory); }