GNOME Bugzilla – Bug 601848
Connect to Server Custom Location does not work in 2.28.x
Last modified: 2011-09-09 04:22:37 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.
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.
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.
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!
I believe this is not relevant anymore with the Connect to Server dialog redesign we did some time ago, closing as OBSOLETE.