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 679580 - add bookmarks to the file chooser for open windows
add bookmarks to the file chooser for open windows
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-07-08 08:17 UTC by William Jon McCann
Modified: 2012-07-10 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add locations for open windows to the destination selection dialog (2.26 KB, patch)
2012-07-09 13:39 UTC, William Jon McCann
reviewed Details | Review
Add locations for open windows to the destination selection dialog (13.29 KB, patch)
2012-07-09 23:20 UTC, William Jon McCann
none Details | Review
Add locations for open windows to the destination selection dialog (13.29 KB, patch)
2012-07-09 23:43 UTC, William Jon McCann
none Details | Review
Add locations for open windows to the destination selection dialog (13.27 KB, patch)
2012-07-10 04:32 UTC, William Jon McCann
none Details | Review
Add locations for open windows to the destination selection dialog (14.31 KB, patch)
2012-07-10 13:09 UTC, William Jon McCann
reviewed Details | Review
Add locations for open windows to the destination selection dialog (13.14 KB, patch)
2012-07-10 13:51 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2012-07-08 08:17:38 UTC
It might be nice to add bookmarks to the file chooser that is used for copy/move to for the current directory of other open nautilus windows.
Comment 1 William Jon McCann 2012-07-09 13:39:30 UTC
Created attachment 218334 [details] [review]
Add locations for open windows to the destination selection dialog

These locations are identified as interesting by the fact that they
are in use and it makes sense to offer them as quick options for
explicit copies and moves.
Comment 2 Cosimo Cecchi 2012-07-09 17:48:33 UTC
Review of attachment 218334 [details] [review]:

Looks mostly good; some comments below.

::: src/nautilus-view.c
@@ +5797,3 @@
+
+	application = gtk_window_get_application (GTK_WINDOW (view->details->window));
+	GtkApplication *application;

I wonder if we should also connect to the window-added and window-removed signals and update the bookmarks when those get emitted.

@@ +5802,3 @@
+		GList *s;
+
+	GList *w;

I think I would like it better to have a nautilus_window_get_slots() method and avoid including the private header here.

@@ +5812,3 @@
+								  &error);
+			if (error != NULL) {
+		NautilusWindow *window = w->data;

You can use the DEBUG() macro instead
Comment 3 William Jon McCann 2012-07-09 23:20:21 UTC
Created attachment 218368 [details] [review]
Add locations for open windows to the destination selection dialog

These locations are identified as interesting by the fact that they
are in use and it makes sense to offer them as quick options for
explicit copies and moves.
Comment 4 William Jon McCann 2012-07-09 23:43:59 UTC
Created attachment 218370 [details] [review]
Add locations for open windows to the destination selection dialog

These locations are identified as interesting by the fact that they
are in use and it makes sense to offer them as quick options for
explicit copies and moves.

Fix error clearing. Noticed that this still doesn't track the locations of secondary tabs/slots
so more work is needed.
Comment 5 Cosimo Cecchi 2012-07-10 00:09:45 UTC
Review of attachment 218370 [details] [review]:

Looks good so far, just some minor comments below.

::: src/nautilus-window-slot.c
@@ +311,3 @@
+			      0,
+			      NULL, NULL,
+			      nautilus_marshal_VOID__STRING_STRING,

You can just pass NULL here and rely on the (recently introduced) generic marshaller...that will allow to get rid of the marshal.list automake stuff.

::: src/nautilus-window.h
@@ +86,3 @@
         void   (* close) (NautilusWindow *window);
+        void   (* slot_added) (NautilusWindow *window, NautilusWindowSlot *slot);
+        void   (* slot_removed) (NautilusWindow *window, NautilusWindowSlot *slot);

No need for this and the similar snippet in nautilus-window-slot.h, since we don't have any default class handlers to override for these signals.
Comment 6 William Jon McCann 2012-07-10 04:32:01 UTC
Created attachment 218378 [details] [review]
Add locations for open windows to the destination selection dialog

These locations are identified as interesting by the fact that they
are in use and it makes sense to offer them as quick options for
explicit copies and moves.
Comment 7 William Jon McCann 2012-07-10 13:09:03 UTC
Created attachment 218414 [details] [review]
Add locations for open windows to the destination selection dialog

These locations are identified as interesting by the fact that they
are in use and it makes sense to offer them as quick options for
explicit copies and moves.

Fixes some errors with the last rebase and tries harder to disconnect all signals.
Comment 8 Cosimo Cecchi 2012-07-10 13:29:34 UTC
Review of attachment 218414 [details] [review]:

Thanks, looks almost good to go.

::: src/Makefile.am
@@ -71,3 @@
 	glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name nautilus $(srcdir)/nautilus.gresource.xml
 
-

Can you also rebase this out of the patch please?

::: src/nautilus-view.c
@@ +5784,3 @@
+
+	if (slot->location == NULL)
+	GError *error = NULL;

You can use nautilus_window_slot_get_location_uri() (also below)

@@ +5910,3 @@
+	windows = gtk_application_get_windows (application);
+	g_signal_handlers_disconnect_by_func (application, G_CALLBACK (on_app_window_added), data);
+	add_bookmarks_for_window_slot (data, slot);

These are disconnected twice

::: src/nautilus-window.h
@@ +86,3 @@
         void   (* close) (NautilusWindow *window);
+        void   (* slot_added) (NautilusWindow *window, NautilusWindowSlot *slot);
+        void   (* slot_removed) (NautilusWindow *window, NautilusWindowSlot *slot);

No need for these.
Comment 9 William Jon McCann 2012-07-10 13:51:01 UTC
Created attachment 218418 [details] [review]
Add locations for open windows to the destination selection dialog

These locations are identified as interesting by the fact that they
are in use and it makes sense to offer them as quick options for
explicit copies and moves.
Comment 10 Cosimo Cecchi 2012-07-10 14:24:44 UTC
Review of attachment 218418 [details] [review]:

Thanks, looks good.