diff options
author | Clement Lefebvre <clement.lefebvre@linuxmint.com> | 2023-01-13 17:44:38 +0000 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-02-06 12:08:33 +0100 |
commit | 2577b8a7f3c9e95749665ee48f28d45cbc02ac9c (patch) | |
tree | f1c5b4d25168eb85632f2c3589e7a76dd09c223b /src/user-list.vala | |
parent | f026668e8ec52331fd70296fa25e24d0e23eee63 (diff) | |
download | arctica-greeter-2577b8a7f3c9e95749665ee48f28d45cbc02ac9c.tar.gz arctica-greeter-2577b8a7f3c9e95749665ee48f28d45cbc02ac9c.tar.bz2 arctica-greeter-2577b8a7f3c9e95749665ee48f28d45cbc02ac9c.zip |
sessions: Add a tooltip on the session badge.
Ported from Slick Greeter ported by Mike Gabriel.
https://github.com/linuxmint/slick-greeter/commit/cf3742cf155e0925904c7da86457deaea6a87885
Diffstat (limited to 'src/user-list.vala')
-rw-r--r-- | src/user-list.vala | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/src/user-list.vala b/src/user-list.vala index b4cab22..abbf576 100644 --- a/src/user-list.vala +++ b/src/user-list.vala @@ -121,8 +121,15 @@ public class UserList : GreeterList set { _default_session = value; - if (selected_entry != null) - selected_entry.set_options_image (get_badge ()); + if (selected_entry != null) { + selected_entry.set_options_image (get_badge (), value); + foreach (var session in LightDM.get_sessions ()) { + if (session.key == value) { + selected_entry.set_options_image (get_badge (), session.name); + break; + } + } + } } } @@ -136,8 +143,18 @@ public class UserList : GreeterList set { _session = value; - if (selected_entry != null) - selected_entry.set_options_image (get_badge ()); + if (selected_entry != null) { + selected_entry.set_options_image (get_badge (), value); + if (selected_entry != null) { + selected_entry.set_options_image (get_badge (), value); + foreach (var session in LightDM.get_sessions ()) { + if (session.key == value) { + selected_entry.set_options_image (get_badge (), session.name); + break; + } + } + } + } } } |