~unity-greeter-team/unity-greeter/14.04

« back to all changes in this revision

Viewing changes to tests/unity-greeter.vala

  • Committer: Albert Astals
  • Date: 2012-08-30 11:06:25 UTC
  • mto: This revision was merged to the branch mainline in revision 573.
  • Revision ID: albert.astals@canonical.com-20120830110625-ipxg18uag2fz02z6
Just a lot of stuff, just commiting so i can checkout from the VM

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: Vala; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
 *
 
3
 * Copyright (C) 2011 Canonical Ltd
 
4
 *
 
5
 * This program is free software: you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License version 3 as
 
7
 * published by the Free Software Foundation.
 
8
 *
 
9
 * This program is distributed in the hope that it will be useful,
 
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
 * GNU General Public License for more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License
 
15
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
16
 *
 
17
 * Authored by: Robert Ancell <robert.ancell@canonical.com>
 
18
 */
 
19
 
 
20
public const int grid_size = 40;
 
21
 
 
22
public class UnityGreeter
 
23
{
 
24
    public static UnityGreeter singleton;
 
25
    public static bool test_mode = false;
 
26
 
 
27
    public signal void show_message (string text, LightDM.MessageType type);
 
28
    public signal void show_prompt (string text, LightDM.PromptType type);
 
29
    public signal void authentication_complete ();
 
30
 
 
31
    public bool is_authenticated ()
 
32
    {
 
33
        return false;
 
34
    }
 
35
 
 
36
    public void authenticate (string? userid = null)
 
37
    {
 
38
    }
 
39
 
 
40
    public void authenticate_as_guest ()
 
41
    {
 
42
    }
 
43
 
 
44
    public void cancel_authentication ()
 
45
    {
 
46
    }
 
47
 
 
48
    public void respond (string response)
 
49
    {
 
50
    }
 
51
 
 
52
    public string authentication_user ()
 
53
    {
 
54
        return "";
 
55
    }
 
56
 
 
57
    public string default_session_hint ()
 
58
    {
 
59
        return "";
 
60
    }
 
61
 
 
62
    public string select_user_hint ()
 
63
    {
 
64
        return "";
 
65
    }
 
66
 
 
67
    public bool show_manual_login_hint ()
 
68
    {
 
69
        return false;
 
70
    }
 
71
 
 
72
    public bool hide_users_hint ()
 
73
    {
 
74
        return false;
 
75
    }
 
76
 
 
77
    public bool has_guest_account_hint ()
 
78
    {
 
79
        return false;
 
80
    }
 
81
 
 
82
    public void start_session (string? session)
 
83
    {
 
84
    }
 
85
 
 
86
    public void push_list (GreeterList widget)
 
87
    {
 
88
    }
 
89
 
 
90
    public void pop_list ()
 
91
    {
 
92
    }
 
93
 
 
94
    public string? get_state (string key)
 
95
    {
 
96
        return null;
 
97
    }
 
98
 
 
99
    public void set_state (string key, string value)
 
100
    {
 
101
    }
 
102
 
 
103
    public static LightDM.Layout? get_layout_by_name (string name)
 
104
    {
 
105
        foreach (var layout in LightDM.get_layouts ())
 
106
        {
 
107
            if (layout.name == name)
 
108
                return layout;
 
109
        }
 
110
        return null;
 
111
    }
 
112
 
 
113
    public static void add_style_class (Gtk.Widget widget)
 
114
    {
 
115
        /* Add style context class lightdm-user-list */
 
116
        var ctx = widget.get_style_context ();
 
117
        ctx.add_class ("lightdm");
 
118
    }
 
119
}