GNOME Bugzilla – Bug 704872
Connect to server: unhelpful error dialog
Last modified: 2016-04-22 13:56:48 UTC
Created attachment 250123 [details] screenshot I tried to connect to my home server today, and it failed for some unknown reason. It would be really nice if we could provide some extra information in the error dialog. Is the server at the specified IP address? Was the protocol I tried not available? Do we have any ideas about which protocols might be available? etc
Could you please point me to the relevant source code. I could try submitting a patch. Seems good enough for my first bug fix.
It's in gtk+ gtkplacesview.c file. Search for connect to server code.
The behavioral changed a bit since this was reported. I don't see any error message at all if I use "Other Locations -> Connect to Server: sftp://nonexistent -> Connect", so I am not sure it is intentional or not, but I think error dialog should be shown... GVfs returns error message in a such case: $ gvfs-mount sftp://nonexistent Error mounting location: Connection failed
Created attachment 326194 [details] [review] Show error dialog on failed connections This patch reintroduces (were they intentionally removed?) the error dialog.
Review of attachment 326194 [details] [review]: Thanks for the patch Ernestas! We had a completely different "connect to server" handling before. But I'm surprised we overkilled this... Would be good to make sure we really overkilled it when we introduced the places-view a few months ago. Can you check it? Looks good otherwise except: ::: src/nautilus-places-view.c @@ +372,3 @@ self); + g_signal_connect_swapped (priv->places_view, forgot to disconnect somewhere
Answering your questions on IRC here. Just noticed I had the wrong meaning of "Overkill" for years. I meant "I didn't notice before". About the signal, it's true it's not necessary in this case.
I searched high and low, but only in nautilus_window_set_up_sidebar() is the “show-error-message” signal mentioned and even there it’s the sidebar signal. Tried the commit log, but nothing useful turned up, either. All signs point to it having been overlooked, but it also can be that I’m missing something.
(In reply to Ernestas Kulik from comment #7) > I searched high and low, but only in nautilus_window_set_up_sidebar() is the > “show-error-message” signal mentioned and even there it’s the sidebar signal. > Tried the commit log, but nothing useful turned up, either. > > All signs point to it having been overlooked, but it also can be that I’m Overlooked, that's the word I wanted to say with "overkilled". Thanks :) > missing something. Ok I traced this, this relates to where we have the connect to server funcionality inside nautilus, and we removed it on https://git.gnome.org/browse/nautilus/commit/?id=474a6c2aa025fcd94bff50e3501a2eb41e4f0388 Note in the go_to_server_cb how we handled the errors. And we *overlooked* the error handling in the new implementation. Can you add this to the commit message?
Created attachment 326428 [details] [review] Restore error reporting How’s this?
Created attachment 326429 [details] [review] Restore error reporting (w\ fixed indentation) I just can’t not mess it up, haha.
(In reply to Ernestas Kulik from comment #10) > Created attachment 326429 [details] [review] [review] > Restore error reporting (w\ fixed indentation) > > I just can’t not mess it up, haha. This looks good now to me, thanks! I guess you don't have commit rights right? I think it's time to have them :)
Review of attachment 326429 [details] [review]: forgot to set the patch status.