After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 777785 - Use dbus application launching
Use dbus application launching
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-01-26 11:36 UTC by Phillip Wood
Modified: 2018-03-31 22:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Move all initialization to startup_cb (1.48 KB, patch)
2017-01-26 11:37 UTC, Phillip Wood
committed Details | Review
Move cleanup to shutdown_cb (1.78 KB, patch)
2017-01-26 11:37 UTC, Phillip Wood
none Details | Review
Use g_application_add_main_option_entries() (2.27 KB, patch)
2017-01-26 11:37 UTC, Phillip Wood
none Details | Review
Change application id to org.gnome.SoundJuicer (1.29 KB, patch)
2017-01-26 11:37 UTC, Phillip Wood
none Details | Review
Add a dbus service file (1.47 KB, patch)
2017-01-26 11:37 UTC, Phillip Wood
none Details | Review
Use dbus application launching (2.79 KB, patch)
2017-01-26 11:37 UTC, Phillip Wood
none Details | Review
Move cleanup to shutdown_cb() (1.79 KB, patch)
2017-02-08 11:56 UTC, Phillip Wood
committed Details | Review
Use g_application_add_main_option_entries() (2.27 KB, patch)
2017-02-08 11:56 UTC, Phillip Wood
committed Details | Review
Change application id to org.gnome.SoundJuicer (1.29 KB, patch)
2017-02-08 11:56 UTC, Phillip Wood
committed Details | Review
Add a dbus service file (1.62 KB, patch)
2017-02-08 11:57 UTC, Phillip Wood
committed Details | Review
Use dbus application launching (2.80 KB, patch)
2017-02-08 11:57 UTC, Phillip Wood
committed Details | Review

Description Phillip Wood 2017-01-26 11:36:56 UTC
See https://wiki.gnome.org/HowDoI/DBusApplicationLaunching for the
rationale for this
Comment 1 Phillip Wood 2017-01-26 11:37:01 UTC
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.
Comment 2 Phillip Wood 2017-01-26 11:37:05 UTC
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.
Comment 3 Phillip Wood 2017-01-26 11:37:10 UTC
Created attachment 344310 [details] [review]
Use g_application_add_main_option_entries()

Use GApplication’s builtin command line argument handling.
Comment 4 Phillip Wood 2017-01-26 11:37:15 UTC
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
Comment 5 Phillip Wood 2017-01-26 11:37:19 UTC
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
Comment 6 Phillip Wood 2017-01-26 11:37:24 UTC
Created attachment 344313 [details] [review]
Use dbus application launching

Rename the desktop file and DBusActivatable=true to use dbus to launch
the program.
Comment 7 Bastien Nocera 2017-01-26 12:54:23 UTC
(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.
Comment 8 Phillip Wood 2017-02-08 11:56:35 UTC
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.
Comment 9 Phillip Wood 2017-02-08 11:56:46 UTC
Created attachment 345205 [details] [review]
Use g_application_add_main_option_entries()

Use GApplication’s builtin command line argument handling.
Comment 10 Phillip Wood 2017-02-08 11:56:53 UTC
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
Comment 11 Phillip Wood 2017-02-08 11:57:00 UTC
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
Comment 12 Phillip Wood 2017-02-08 11:57:07 UTC
Created attachment 345208 [details] [review]
Use dbus application launching

Rename the desktop file and add DBusActivatable=true to use dbus to
launch the program.
Comment 13 Phillip Wood 2017-02-13 10:58:31 UTC
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
Comment 14 Bastien Nocera 2018-03-31 22:23:26 UTC
Everything was committed, so closing.