GNOME Bugzilla – Bug 698525
turn gnome-clocks into a GApplication service
Last modified: 2013-04-22 06:57:01 UTC
See patch.
Created attachment 242097 [details] [review] application: turn us into a service Start using GApplication 'service' mode for gnome-clocks. This allows us to launch via D-Bus activation. Provide a 'launcher' helper to install in /usr/bin so we can still be started from the commandline.
Review of attachment 242097 [details] [review]: Feel free to push, but create the 3-8 branch first. A couple of silly nitpicks below ::: src/launcher.vala @@ +17,3 @@ + */ + +namespace Clocks { maybe let's drop the namespace for a single file launcher @@ +19,3 @@ +namespace Clocks { + +public class Application : Gtk.Application { I do not recall the vala scoping rules... can the class be private since it is all in this file?
On a more generic note, should we be able to query the version from the service? With your patch it is just handled in the wrapper, but maybe we should add a version field in the service description file, that way a launcher like this one could be autogenerated
You're always going to have the libexec and the bin versions of the program installed at the same time... and the entire point of handling --version locally is that you don't need to start up the remote program... Do you mean that we should open the D-Bus service file for ourselves and query it?
Comment on attachment 242097 [details] [review] application: turn us into a service Attachment 242097 [details] pushed as abe5c22 - application: turn us into a service Pushed with the suggested changes. Once I update GIO (and the desktop file spec) we can finish up here by adding 'DBusActivatable=true' to the .desktop file.
(In reply to comment #4) > You're always going to have the libexec and the bin versions of the program > installed at the same time... and the entire point of handling --version > locally is that you don't need to start up the remote program... > > Do you mean that we should open the D-Bus service file for ourselves and query > it? No, I meant two things: - maybe we should think of a way to autogenerate these silly launchers from the metadata (like the version) instead of having to cut&paste the same silly program - I expect that in the long run it is the shell or something else that will start the service instead of the launcher, so maybe it should be able to right click show version or something like that (though I guess that is better handled in the real .desktop file, not in the service definition) Anyway, I am closing this