Merge lp:~attente/unity-greeter/entry-selected-signal into lp:unity-greeter

Proposed by William Hua
Status: Merged
Approved by: Michael Terry
Approved revision: 969
Merged at revision: 968
Proposed branch: lp:~attente/unity-greeter/entry-selected-signal
Merge into: lp:unity-greeter
Diff against target: 31 lines (+15/-0)
1 file modified
src/greeter-list.vala (+15/-0)
To merge this branch: bzr merge lp:~attente/unity-greeter/entry-selected-signal
Reviewer Review Type Date Requested Status
Michael Terry (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+188755@code.launchpad.net

Commit message

Add a DBus method+signal to get the selected user. (LP #1233945)

Description of the change

Add a DBus method+signal to get the selected user.

We add this so that LP #1233945 can be fixed using https://code.launchpad.net/~attente/indicator-keyboard/unity-greeter-default-layout.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
969. By William Hua

Don't use well-known bus name.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Michael Terry (mterry) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/greeter-list.vala'
2--- src/greeter-list.vala 2013-08-01 07:22:58 +0000
3+++ src/greeter-list.vala 2013-10-02 15:45:49 +0000
4@@ -32,12 +32,27 @@
5 public ListDBusInterface (GreeterList list)
6 {
7 this.list = list;
8+ this.list.entry_selected.connect ((name) => {
9+ entry_selected (name);
10+ });
11+ }
12+
13+ public string get_active_entry ()
14+ {
15+ string entry = "";
16+
17+ if (list.selected_entry != null && list.selected_entry.id != null)
18+ entry = list.selected_entry.id;
19+
20+ return entry;
21 }
22
23 public void set_active_entry (string entry_name)
24 {
25 list.set_active_entry (entry_name);
26 }
27+
28+ public signal void entry_selected (string entry_name);
29 }
30
31 public abstract class GreeterList : FadableBox

Subscribers

People subscribed via source and target branches