diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/greeter-list.vala | 2 | ||||
-rw-r--r-- | src/prompt-box.vala | 7 | ||||
-rw-r--r-- | src/user-list.vala | 25 |
3 files changed, 28 insertions, 6 deletions
diff --git a/src/greeter-list.vala b/src/greeter-list.vala index dc41a8f..c574778 100644 --- a/src/greeter-list.vala +++ b/src/greeter-list.vala @@ -155,7 +155,7 @@ public abstract class GreeterList : FadableBox /* When we swap out a scrolling entry, make sure to hide its * image button, else it will appear in the tab chain. */ if (_scrolling_entry != null) - _scrolling_entry.set_options_image (null); + _scrolling_entry.set_options_image (null, null); _scrolling_entry = value; } } diff --git a/src/prompt-box.vala b/src/prompt-box.vala index 2180c70..273c507 100644 --- a/src/prompt-box.vala +++ b/src/prompt-box.vala @@ -385,13 +385,18 @@ public class PromptBox : FadableBox queue_draw (); } - public void set_options_image (Gdk.Pixbuf? image) + public void set_options_image (Gdk.Pixbuf? image, string? tooltip) { if (option_button == null) return; option_image.pixbuf = image; + if (tooltip == null) + option_image.set_tooltip_text(""); + else + option_image.set_tooltip_text(tooltip); + if (image == null) option_button.hide (); else 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; + } + } + } + } } } |