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 686556 - Provide a singleton SessionManager proxy object
Provide a singleton SessionManager proxy object
Status: RESOLVED FIXED
Product: gnome-settings-daemon
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on: 686546
Blocks:
 
 
Reported: 2012-10-21 01:50 UTC by Matthias Clasen
Modified: 2012-10-22 08:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (29.46 KB, patch)
2012-10-21 01:50 UTC, Matthias Clasen
accepted-commit_now Details | Review
main: Provide a singleton SessionManager proxy object (3.02 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
main: Use new SessionManager singleton (5.38 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
updates: Use new SessionManager singleton (3.70 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
smartcard: Use new SessionManager singleton (1.80 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
power: Use new SessionManager singleton (4.86 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
keyboard: Use new SessionManager singleton (5.46 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
background: Use new SessionManager singleton (2.66 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
a11y-keyboard: Use new SessionManager singleton (2.82 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review
media-keys: Use new SessionManager singleton (2.40 KB, patch)
2012-10-22 08:05 UTC, Bastien Nocera
committed Details | Review

Description Matthias Clasen 2012-10-21 01:50:43 UTC
Created attachment 226913 [details] [review]
patch

Many plugins were creating these on their own, with ugly async
code. It seems much more straightforward and efficient to get
a proxy once, and keep it around for everybody to use.

At the same time, rely on cached properties for the session name, instead of manual Get roundtrips. This requires a fix to make GetAll work for the SessionManager interface.
Comment 1 Bastien Nocera 2012-10-21 20:08:25 UTC
Review of attachment 226913 [details] [review]:

This need to be split up in a patch for the daemon, and patches for each of the plugins to use that new API.

I can take care of that tomorrow.
Comment 2 Bastien Nocera 2012-10-22 08:05:26 UTC
Created attachment 226959 [details] [review]
main: Provide a singleton SessionManager proxy object

Many plugins were creating these on their own, with ugly async
code. It seems much more straightforward and efficient to get
a proxy once, and keep it around for everybody to use.
Comment 3 Bastien Nocera 2012-10-22 08:05:29 UTC
Created attachment 226960 [details] [review]
main: Use new SessionManager singleton
Comment 4 Bastien Nocera 2012-10-22 08:05:32 UTC
Created attachment 226961 [details] [review]
updates: Use new SessionManager singleton
Comment 5 Bastien Nocera 2012-10-22 08:05:35 UTC
Created attachment 226962 [details] [review]
smartcard: Use new SessionManager singleton
Comment 6 Bastien Nocera 2012-10-22 08:05:38 UTC
Created attachment 226963 [details] [review]
power: Use new SessionManager singleton
Comment 7 Bastien Nocera 2012-10-22 08:05:40 UTC
Created attachment 226964 [details] [review]
keyboard: Use new SessionManager singleton
Comment 8 Bastien Nocera 2012-10-22 08:05:43 UTC
Created attachment 226965 [details] [review]
background: Use new SessionManager singleton
Comment 9 Bastien Nocera 2012-10-22 08:05:46 UTC
Created attachment 226966 [details] [review]
a11y-keyboard: Use new SessionManager singleton
Comment 10 Bastien Nocera 2012-10-22 08:05:49 UTC
Created attachment 226967 [details] [review]
media-keys: Use new SessionManager singleton
Comment 11 Bastien Nocera 2012-10-22 08:10:20 UTC
Attachment 226959 [details] pushed as 58d38a3 - main: Provide a singleton SessionManager proxy object
Attachment 226960 [details] pushed as 00ab478 - main: Use new SessionManager singleton
Attachment 226961 [details] pushed as db2312a - updates: Use new SessionManager singleton
Attachment 226962 [details] pushed as 75c684b - smartcard: Use new SessionManager singleton
Attachment 226963 [details] pushed as d54a86a - power: Use new SessionManager singleton
Attachment 226964 [details] pushed as e0f87ee - keyboard: Use new SessionManager singleton
Attachment 226965 [details] pushed as 35598d8 - background: Use new SessionManager singleton
Attachment 226966 [details] pushed as d8a9e0a - a11y-keyboard: Use new SessionManager singleton
Attachment 226967 [details] pushed as e18eb3a - media-keys: Use new SessionManager singleton