GNOME Bugzilla – Bug 777785
Use dbus application launching
Last modified: 2018-03-31 22:23:26 UTC
See https://wiki.gnome.org/HowDoI/DBusApplicationLaunching for the rationale for this
Created attachment 344308 [details] [review] Move all initialization to startup_cb Move as much initialization as possible to startup_cb so it is only performed when necessary.
Created attachment 344309 [details] [review] Move cleanup to shutdown_cb Only preform cleanup in the primary instance. This fixes some ‘g_object_unref: assertion 'G_IS_OBJECT (object)' failed’ warnings when starting a second instance.
Created attachment 344310 [details] [review] Use g_application_add_main_option_entries() Use GApplication’s builtin command line argument handling.
Created attachment 344311 [details] [review] Change application id to org.gnome.SoundJuicer Flatpak doesn’t like application ids with dashes in their name¹ ¹ https://mail.gnome.org/archives/gtk-devel-list/2016-February/msg00000.html
Created attachment 344312 [details] [review] Add a dbus service file Add a service file so we can use dbus application launching¹ ¹ https://wiki.gnome.org/HowDoI/DBusApplicationLaunching
Created attachment 344313 [details] [review] Use dbus application launching Rename the desktop file and DBusActivatable=true to use dbus to launch the program.
(In reply to Phillip Wood from comment #2) > Created attachment 344309 [details] [review] [review] > Move cleanup to shutdown_cb > > Only preform cleanup in the primary instance. This fixes some perform > ‘g_object_unref: assertion 'G_IS_OBJECT (object)' failed’ > warnings when starting a second instance.
Created attachment 345204 [details] [review] Move cleanup to shutdown_cb() Thanks Bastien, well spotted. I’ve fixed the typo, the patches themselves are unchanged, I’m just re-posting them to keep them in order. Only perform cleanup in the primary instance. This fixes some ‘g_object_unref: assertion 'G_IS_OBJECT (object)' failed’ warnings when starting a second instance.
Created attachment 345205 [details] [review] Use g_application_add_main_option_entries() Use GApplication’s builtin command line argument handling.
Created attachment 345206 [details] [review] Change application id to org.gnome.SoundJuicer Flatpak doesn’t like application ids with dashes in their name¹ ¹ https://mail.gnome.org/archives/gtk-devel-list/2016-February/msg00000.html
Created attachment 345207 [details] [review] Add a dbus service file Add a service file so we can use dbus application launching¹ ¹ https://wiki.gnome.org/HowDoI/DBusApplicationLaunching
Created attachment 345208 [details] [review] Use dbus application launching Rename the desktop file and add DBusActivatable=true to use dbus to launch the program.
Attachment 344308 [details] pushed as e35f42d - Move all initialization to startup_cb Attachment 345204 [details] pushed as 1289fc1 - Move cleanup to shutdown_cb() Attachment 345205 [details] pushed as 05cbbe4 - Use g_application_add_main_option_entries() Attachment 345206 [details] pushed as d9a4c3c - Change application id to org.gnome.SoundJuicer Attachment 345207 [details] pushed as 68c9c34 - Add a dbus service file Attachment 345208 [details] pushed as 113e642 - Use dbus application launching
Everything was committed, so closing.