From dded5f2915995dc1e2959ddd35e275e3ace8c2d2 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 20 Jun 2017 21:43:56 +0200 Subject: src/greeter-list.vala: Move get_active_entry() functionality from ListDBusInterface to the GreeterList class. --- src/greeter-list.vala | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/greeter-list.vala') diff --git a/src/greeter-list.vala b/src/greeter-list.vala index 8e25602..47724f1 100644 --- a/src/greeter-list.vala +++ b/src/greeter-list.vala @@ -41,14 +41,8 @@ public class ListDBusInterface : Object public string get_active_entry () { - string entry = ""; - - if (list.selected_entry != null && list.selected_entry.id != null) - entry = list.selected_entry.id; - - return entry; + return list.get_active_entry (); } - public void set_active_entry (string entry_name) { list.set_active_entry (entry_name); @@ -407,6 +401,16 @@ public abstract class GreeterList : FadableBox move_names (); } + public string get_active_entry () + { + string entry = ""; + + if (selected_entry != null && selected_entry.id != null) + entry = selected_entry.id; + + return entry; + } + public void set_active_entry (string ?name) { var e = find_entry (name); -- cgit v1.2.3