2 * Copyright (C) 2014 Canonical, Ltd.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17#include "UsersModelPrivate.h"
18#include "UsersModel.h"
23UsersModelPrivate::UsersModelPrivate(UsersModel* parent)
27 char *envMockMode = getenv("LIBLIGHTDM_MOCK_MODE");
29 mockMode = envMockMode;
34void UsersModelPrivate::resetEntries()
40 if (mockMode == "single") {
41 resetEntries_single();
42 } else if (mockMode == "single-passphrase") {
43 resetEntries_singlePassphrase();
44 } else if (mockMode == "single-pin") {
45 resetEntries_singlePin();
46 } else if (mockMode == "full") {
53void UsersModelPrivate::resetEntries_single()
57 { "single", "Single User", 0, 0, false, false, 0, 0 },
61void UsersModelPrivate::resetEntries_singlePassphrase()
65 { "single", "Single User", 0, 0, false, false, 0, 0 },
69void UsersModelPrivate::resetEntries_singlePin()
73 { "has-pin", "Has PIN", 0, 0, false, false, 0, 0 },
77void UsersModelPrivate::resetEntries_full()
81 { "has-password", "Has Password", 0, 0, false, false, 0, 0 },
82 { "has-pin", "Has PIN", 0, 0, false, false, 0, 0 },
83 { "different-prompt", "Different Prompt", 0, 0, false, false, 0, 0 },
84 { "no-password", "No Password", 0, 0, false, false, 0, 0 },
85 { "auth-error", "Auth Error", 0, 0, false, false, 0, 0 },
86 { "two-factor", "Two Factor", 0, 0, false, false, 0, 0 },
87 { "info-prompt", "Info Prompt", 0, 0, false, false, 0, 0 },
88 { "html-info-prompt", "HTML Info Prompt", 0, 0, false, false, 0, 0 },
89 { "long-info-prompt", "Long Info Prompt", 0, 0, false, false, 0, 0 },
90 { "wide-info-prompt", "Wide Info Prompt", 0, 0, false, false, 0, 0 },
91 { "multi-info-prompt", "Multi Info Prompt", 0, 0, false, false, 0, 0 },
92 { "long-name", "Long name (far far too long to fit)", 0, 0, false, false, 0, 0 },
93 { "color-background", "Color Background", "#dd4814", 0, false, false, 0, 0 },
94 // white and black are a bit redundant, but useful for manually testing if UI is still readable
95 { "white-background", "White Background", "#ffffff", 0, false, false, 0, 0 },
96 { "black-background", "Black Background", "#000000", 0, false, false, 0, 0 },
97 { "no-background", "No Background", "", 0, false, false, 0, 0 },
98 { "unicode", "가나다라마", 0, 0, false, false, 0, 0 },
99 { "no-response", "No Response", 0, 0, false, false, 0, 0 },
100 { "empty-name", "", 0, 0, false, false, 0, 0 },
104} // namespace QLightDM
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list