GNOME Bugzilla – Bug 584871
Make it easier for 3rd party programs to call nautilus-connect-server
Last modified: 2010-12-03 14:08:07 UTC
Hello! I maintain a program that lets the user backup to a destination, including a remote GIO-supplied URL. So I use a GtkFileChooserButton and all that jazz. I also add a 'Connect to Server...' button that launches nautilus-connect-server (rather than writing that UI myself). There are a couple niceties that would make the integration with nautilus-connect-server much better: 1) Feedback about which URI the user chose (this way, I can set the GtkFileChooserButton rather than relying on the user to choose the same thing he/she just entered in a dialog). 2) An option to not open nautilus after connecting. The user is interacting with my program, not nautilus. The popup is distracting. Attached is a patch to do both those things (prints URI on stdout and adds a command line option to not open nautilus).
Created attachment 135988 [details] [review] Proposed patch
Comment on attachment 135988 [details] [review] Proposed patch This is a good idea, thanks for the patch. >+ /* Print URI to console for the benefit of any programs that launched us. */ >+ g_print ("%s\n", uri); It should probably print the URI only if the file manager wasn't launched, no? >+ { "no-open", 0, G_OPTION_FLAG_REVERSE, G_OPTION_ARG_NONE, &open_in_nautilus, N_("Do not open a nautilus window once connected"), NULL }, I'd turn that into a --print-uri option, with description "Do not open a file manager window once connected, but print the URI".
Created attachment 145248 [details] [review] as print-uri Try this!
Review of attachment 145248 [details] [review]: Hi Michael, sorry for not getting back at this earlier. I changed the connect to server dialog some weeks ago to make it more user-friendly and your patch does not apply anymore now. Could you please update it to git master?
Created attachment 175336 [details] [review] Rebased patch Here's a new version
Review of attachment 175336 [details] [review]: Thanks, looks good! Do you have a GNOME git account? If so, feel free to push to master, otherwise I'll do it for you.
commit 2a20b38c4dc870d8f3a85dae222c125a77f40229 Author: Michael Terry <mike@mterry.name> Date: Fri Nov 26 23:39:58 2010 -0500 Add --print-uri option