aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--src/greeter-list.vala21
2 files changed, 12 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog
index 4e0df52..a225090 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,7 @@ unity-greeter-x2go (14.04.10-0x2go1) UNRELEASED; urgency=medium
- Show Remote Login box if no other boxes (usernames, other login,
guest login) are to be shown.
- Fix config parameter (show-remote-login -> greeter-show-remote-login).
+ - Improve selection code of new entry if an entry is removed.
* debian/control:
+ Add to S: lightdm-remote-session-x2go.
+ Drop from S: lightdm-remote-session-uccsconfigure.
diff --git a/src/greeter-list.vala b/src/greeter-list.vala
index 62f3681..2433a10 100644
--- a/src/greeter-list.vala
+++ b/src/greeter-list.vala
@@ -456,22 +456,23 @@ public abstract class GreeterList : FadableBox
return;
var index = entries.index (entry);
- entry.destroy ();
- entries.remove (entry);
- /* Select another entry if the selected one was removed */
+ /* Select another entry if the selected one was removed */
if (entry == selected_entry)
{
- if (entries.length () == 1)
- index = 0;
- else if (index >= entries.length () && index > 0)
+ if (index > 0) {
index--;
- else if (index < entries.length ())
+ if (entries.nth_data (index) != null)
+ select_entry (entries.nth_data (index), -1.0);
+ }
+ else if (index < entries.length () -1 ) {
index++;
-
- if (entries.nth_data (index) != null)
- select_entry (entries.nth_data (index), -1.0);
+ if (entries.nth_data (index) != null)
+ select_entry (entries.nth_data (index), +1.0);
+ }
}
+ entries.remove (entry);
+ entry.destroy ();
/* Show a manual login if no users and no remote login entry */
if (!have_entries () && !UnityGreeter.singleton.show_remote_login_hint ())