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 314745 - [patch] Choosing "Connect to server" from a 'remote' nautilus window should default to that URI.
[patch] Choosing "Connect to server" from a 'remote' nautilus window should d...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
0.x.x [obsolete]
Other All
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-08-29 00:58 UTC by Stef Walter
Modified: 2005-09-19 21:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Patch to add feature (2.70 KB, patch)
2005-08-29 01:10 UTC, Stef Walter
needs-work Details | Review

Description Stef Walter 2005-08-29 00:58:40 UTC
As a convenience feature, if I'm at a window displaying a remote location (URI)
in nautilus, and then choose 'Connect to Server' from the menu, it should fill
in the URI that I'm at by default.

Note that usability is not be affected (by defaulting to a 'Custom' location) as
most users will generally choose 'Connect to Server' from the 'Places' menu or
their Home Folder or some such.
Comment 1 Stef Walter 2005-08-29 01:10:20 UTC
Created attachment 51488 [details] [review]
Patch to add feature

Note that we can't call nautilus_window_get_location because nautilus-window.c
is not linked into the nautilus-connect-server binary. So instead I added a
"location" property to the NautilusWindow object.
Comment 2 Christian Neumair 2005-09-04 08:46:28 UTC
Thanks for your bug report and your efforts!
One nitpick: Why don't you simply use nautilus_window_get_location instead of
adding a GObject property?
Comment 3 Stef Walter 2005-09-05 17:24:31 UTC
Hmmm, I thought I explained that above. It's a linking problem:

> Note that we can't call nautilus_window_get_location because 
> nautilus-window.c is not linked into the nautilus-connect-server 
> binary. So instead I added a "location" property to the 
> NautilusWindow object. 

Linking in nautilus-window.c would mean linking in a whole big bunch of other
fun stuff. But we can go that way if it's required. 
Comment 4 Christian Neumair 2005-09-05 17:26:39 UTC
Sorry, you're completely right.
Comment 5 Alexander Larsson 2005-09-19 13:17:14 UTC
Its sort of strange the way you pass the uri via a property. Just add a new
argument to nautilus_connect_server_dialog_new() instead. 

Also, gnome_vfs_uri_is_local() is the wrong call, as it returns FALSE for e.g.
nfs shares. Just look for file: uris instead. You should probably filter out
more locations, like network:, burn:, fonts:.
Comment 6 Stef Walter 2005-09-19 21:22:06 UTC
Made suggested changes:

Changed to use an extra argument when calling nautilus_connect_server_dialog_new(). 

When looking for non applicable URIs checks: !gnome_vfs_uri_is_local() and not
'file:' URIs. I checked and yes, network:, burn:, fonts: etc.. all return TRUE
from gnome_vfs_uri_is_local().

Committed:

2005-09-19  Nate Nielsen <nielsen@memberwebs.com>

	* nautilus-connect-server-dialog-main.c: (main):
	* nautilus-connect-server-dialog.h:
	* nautilus-connect-server-dialog.c:
	(nautilus_connect_server_dialog_new):
	* nautilus-window-menus.c:
	(action_connect_to_server_callback): 
	Autofill "Connect to server" dialog where possible.
	Fixes #314745