static void create_new_search (NemoWindowSlot *slot) { char *uri; NemoDirectory *directory; GFile *location; uri = nemo_search_directory_generate_new_uri (); location = g_file_new_for_uri (uri); directory = nemo_directory_get (location); g_assert (NEMO_IS_SEARCH_DIRECTORY (directory)); nemo_window_slot_open_location_full (slot, location, NEMO_WINDOW_OPEN_FLAG_SEARCH, NULL, sync_search_location_cb, slot); nemo_directory_unref (directory); g_object_unref (location); g_free (uri); }
static void nemo_main_application_open_location (NemoApplication *application, GFile *location, GFile *selection, const char *startup_id) { NemoWindow *window; GList *sel_list = NULL; window = nemo_main_application_create_window (application, gdk_screen_get_default ()); gtk_window_set_startup_id (GTK_WINDOW (window), startup_id); if (selection != NULL) { sel_list = g_list_prepend (sel_list, nemo_file_get (selection)); } nemo_window_slot_open_location_full (nemo_window_get_active_slot (window), location, 0, sel_list, NULL, NULL); if (sel_list != NULL) { nemo_file_list_free (sel_list); } }