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 787257 - Usage doesn't work in multiple instances
Usage doesn't work in multiple instances
Status: RESOLVED FIXED
Product: gnome-usage
Classification: Other
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Usage maintainer(s)
GNOME Usage maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-04 14:15 UTC by Felipe Borges
Modified: 2017-09-06 10:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
application: Make sure there's just a single Window instance (719 bytes, patch)
2017-09-04 14:16 UTC, Felipe Borges
committed Details | Review

Description Felipe Borges 2017-09-04 14:15:52 UTC
Opening gnome-usage multiple times simultaneously causes the first instance (window) to work properly and the other ones don't show plenty of the desired information.

gnome-system-monitor didn't allow multiple instances of it, and it seems reasonable to import this behavior to gnome-usage, IMO.

If we want to support multiple instances, the code will need some major decoupling regarding the Window object and other singletons that are instantiated at the GtkApplication level.

For now the best solution seems to be just to prevent multiple instances from being launched.
Comment 1 Felipe Borges 2017-09-04 14:16:13 UTC
Created attachment 359079 [details] [review]
application: Make sure there's just a single Window instance
Comment 2 Petr Štětka 2017-09-04 15:06:49 UTC
Review of attachment 359079 [details] [review]:

Accepted.
Comment 3 Petr Štětka 2017-09-04 15:07:27 UTC
I'll try to explore how big changes would be needed to support multiple instances.
Comment 4 Felipe Borges 2017-09-06 10:16:36 UTC
Attachment 359079 [details] pushed as 309db9b - application: Make sure there's just a single Window instance


Thanks Petr!

(In reply to Petr Štětka from comment #3)
> I'll try to explore how big changes would be needed to support multiple
> instances.

We could ask a designer whether this is desirable. There's no point in putting your time to this if it is not wanted.