GNOME Bugzilla – Bug 555486
No way to recover command line from GAppInfo
Last modified: 2008-11-28 23:16:54 UTC
When you use g_app_info_create_from_commandline(), there is no way to recover the command line using the getters, at least not for the GDesktopAppInfo implementation. g_app_info_get_executable () returns the name of the executable (usually the basename of the first component of the command line) without any options. This makes the Nautilus "Open With" dialog inconsistent. You can create a new handler using a command line, but when you get back to the dialog and click the command you created, the entry box will only contain the executable, not the whole command line - although launching the command works fine, since the arguments are stored in the background. This could be solved by either making the get_executable () method return the whole command line (not a good option as apps may be relying on the old behavior), or adding a new method, get_commandline ().
I guess g_app_info_get_commandline would be an ok addition.
* gio.symbols: * gappinfo.[hc]: Add g_app_info_get_commandline. Requested by Hans Petter Jansson. * gdesktopappinfo.c: And implement it here.