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 601848 - Connect to Server Custom Location does not work in 2.28.x
Connect to Server Custom Location does not work in 2.28.x
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: general
2.28.x
Other All
: Normal enhancement
: ---
Assigned To: Tomas Bzatek
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-11-13 22:20 UTC by Henrik Holst
Modified: 2011-09-09 04:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to make connect-to-server-dialog not check server field for custom locations (1.62 KB, patch)
2009-11-13 22:20 UTC, Henrik Holst
none Details | Review
proposed patch (4.75 KB, patch)
2010-05-20 14:43 UTC, Tomas Bzatek
reviewed Details | Review
proposed patch (7.12 KB, patch)
2010-05-21 15:16 UTC, Tomas Bzatek
none Details | Review

Description Henrik Holst 2009-11-13 22:20:02 UTC
Created attachment 147696 [details] [review]
patch to make connect-to-server-dialog not check server field for custom locations

When using the Custom Location in the Connect To Server dialog, the connection attempt fails every time due to the code verifying that the "server" field is filled, a field that is not present in the Custom Location dialog...

So I created a small patch that only checks the field for the other connection types.
Comment 1 Tomas Bzatek 2010-05-20 14:43:51 UTC
Created attachment 161552 [details] [review]
proposed patch

Thanks for the patch, I've spotted this issue recently. The only caveat in your patch is the missing check for empty input.

Attached please find different patch, I've also did little cleanup in the code around, getting rid of extra variables, changing string memory management a little. This however introduces new strings for the added error message.
Comment 2 Cosimo Cecchi 2010-05-20 15:08:13 UTC
Review of attachment 161552 [details] [review]:

Hi Tomas, thanks for the patch.

I inlined two comments below.

::: src/nautilus-connect-server-dialog.c
@@ +186,3 @@
+		if (strlen (uri) == 0) {
+			eel_show_error_dialog (_("Cannot Connect to the Location. You must enter a valid URI string."),
+					       _("Please enter a location and try again."),

This error message doesn't look too nice.
Could you make it so that the 'Connect' button becomes sensitive only when the entry actually contains some chars? That way, this check would be useless.

@@ +198,3 @@
+		if (strlen (server) == 0) {
+			eel_show_error_dialog (_("Cannot Connect to Server. You must enter a name for the server."),
+					       _("Please enter a name and try again."),

Same as previous comment, we could avoid making the 'Connect' button sensitive at all if 'Server' is empty.
Comment 3 Tomas Bzatek 2010-05-21 15:16:57 UTC
Created attachment 161654 [details] [review]
proposed patch

(In reply to comment #2)
> This error message doesn't look too nice.
> Could you make it so that the 'Connect' button becomes sensitive only when the
> entry actually contains some chars? That way, this check would be useless.
I agree, this updated patch removes the error messages and makes the Connect button reflect the contents of the watched entries.

Thanks for reviewing this, Cosimo!
Comment 4 Cosimo Cecchi 2011-09-09 04:22:37 UTC
I believe this is not relevant anymore with the Connect to Server dialog redesign we did some time ago, closing as OBSOLETE.