Skip to content

Commit 978fb2e

Browse files
committed
Rename xlocal seat to local - it supports Mir and Wayland as well as X. The xlocal seat type is now an alias for local
1 parent f651913 commit 978fb2e

File tree

12 files changed

+144
-98
lines changed

12 files changed

+144
-98
lines changed

data/lightdm.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# [Seat:seat0] matches the seat named "seat0".
4343
# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client".
4444
#
45-
# type = Seat type (xlocal, xremote, unity)
45+
# type = Seat type (local, xremote, unity)
4646
# pam-service = PAM service to use for login
4747
# pam-autologin-service = PAM service to use for autologin
4848
# pam-greeter-service = PAM service to use for greeters
@@ -85,7 +85,7 @@
8585
# exit-on-failure = True if the daemon should exit if this seat fails
8686
#
8787
[Seat:*]
88-
#type=xlocal
88+
#type=local
8989
#pam-service=lightdm
9090
#pam-autologin-service=lightdm-autologin
9191
#pam-greeter-service=lightdm-greeter

po/lightdm.pot

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2016-06-01 12:01+1200\n"
11+
"POT-Creation-Date: 2016-06-20 12:03+1200\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -18,57 +18,57 @@ msgstr ""
1818
"Content-Transfer-Encoding: 8bit\n"
1919

2020
#. Help string for command line --config flag
21-
#: ../src/lightdm.c:1187
21+
#: ../src/lightdm.c:1198
2222
msgid "Use configuration file"
2323
msgstr ""
2424

2525
#. Help string for command line --debug flag
26-
#: ../src/lightdm.c:1190
26+
#: ../src/lightdm.c:1201
2727
msgid "Print debugging messages"
2828
msgstr ""
2929

3030
#. Help string for command line --test-mode flag
31-
#: ../src/lightdm.c:1193
31+
#: ../src/lightdm.c:1204
3232
msgid "Run as unprivileged user, skipping things that require root access"
3333
msgstr ""
3434

3535
#. Help string for command line --pid-file flag
36-
#: ../src/lightdm.c:1196
36+
#: ../src/lightdm.c:1207
3737
msgid "File to write PID into"
3838
msgstr ""
3939

4040
#. Help string for command line --log-dir flag
41-
#: ../src/lightdm.c:1199
41+
#: ../src/lightdm.c:1210
4242
msgid "Directory to write logs to"
4343
msgstr ""
4444

4545
#. Help string for command line --run-dir flag
46-
#: ../src/lightdm.c:1202
46+
#: ../src/lightdm.c:1213
4747
msgid "Directory to store running state"
4848
msgstr ""
4949

5050
#. Help string for command line --cache-dir flag
51-
#: ../src/lightdm.c:1205
51+
#: ../src/lightdm.c:1216
5252
msgid "Directory to cache information"
5353
msgstr ""
5454

5555
#. Help string for command line --show-config flag
56-
#: ../src/lightdm.c:1208
56+
#: ../src/lightdm.c:1219
5757
msgid "Show combined configuration"
5858
msgstr ""
5959

6060
#. Help string for command line --version flag
61-
#: ../src/lightdm.c:1211
61+
#: ../src/lightdm.c:1222
6262
msgid "Show release version"
6363
msgstr ""
6464

6565
#. Arguments and description for --help test
66-
#: ../src/lightdm.c:1230
66+
#: ../src/lightdm.c:1241
6767
msgid "- Display Manager"
6868
msgstr ""
6969

7070
#. Text printed out when an unknown command-line argument provided
71-
#: ../src/lightdm.c:1240
71+
#: ../src/lightdm.c:1251
7272
#, c-format
7373
msgid "Run '%s --help' to see a full list of available command line options."
7474
msgstr ""

src/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ lightdm_SOURCES = \
2929
process.h \
3030
seat.c \
3131
seat.h \
32+
seat-local.c \
33+
seat-local.h \
3234
seat-unity.c \
3335
seat-unity.h \
3436
seat-xdmcp-session.c \
3537
seat-xdmcp-session.h \
36-
seat-xlocal.c \
37-
seat-xlocal.h \
3838
seat-xremote.c \
3939
seat-xremote.h \
4040
seat-xvnc.c \

src/display-manager.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
#include "display-manager.h"
1919
#include "configuration.h"
20-
#include "seat-xlocal.h"
20+
#include "seat-local.h"
2121
#include "seat-xremote.h"
2222
#include "seat-unity.h"
2323
#include "plymouth.h"
@@ -162,7 +162,7 @@ display_manager_init (DisplayManager *manager)
162162
manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, DISPLAY_MANAGER_TYPE, DisplayManagerPrivate);
163163

164164
/* Load the seat modules */
165-
seat_register_module ("xlocal", SEAT_XLOCAL_TYPE);
165+
seat_register_module ("local", SEAT_LOCAL_TYPE);
166166
seat_register_module ("xremote", SEAT_XREMOTE_TYPE);
167167
seat_register_module ("unity", SEAT_UNITY_TYPE);
168168
}

src/lightdm.c

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,17 @@ display_manager_stopped_cb (DisplayManager *display_manager)
218218
g_main_loop_quit (loop);
219219
}
220220

221+
static Seat *
222+
create_seat (const gchar *module_name, const gchar *name)
223+
{
224+
if (strcmp (module_name, "xlocal") == 0) {
225+
g_warning ("Seat type 'xlocal' is deprecated, use 'type=local' instead");
226+
return seat_new ("local", name);
227+
}
228+
else
229+
return seat_new (module_name, name);
230+
}
231+
221232
static void
222233
display_manager_seat_removed_cb (DisplayManager *display_manager, Seat *seat)
223234
{
@@ -237,7 +248,7 @@ display_manager_seat_removed_cb (DisplayManager *display_manager, Seat *seat)
237248

238249
if (!next_seat)
239250
{
240-
next_seat = seat_new (*iter, seat_get_name (seat));
251+
next_seat = create_seat (*iter, seat_get_name (seat));
241252
g_string_assign (next_types, *iter);
242253
}
243254
else
@@ -354,7 +365,7 @@ handle_display_manager_call (GDBusConnection *connection,
354365

355366
g_debug ("Adding local X seat :%d", display_number);
356367

357-
seat = seat_new ("xremote", "xremote0"); // FIXME: What to use for a name?
368+
seat = create_seat ("xremote", "xremote0"); // FIXME: What to use for a name?
358369
if (seat)
359370
{
360371
gchar *display_number_string;
@@ -1020,7 +1031,7 @@ add_login1_seat (Login1Seat *login1_seat)
10201031
g_list_free_full (config_sections, g_free);
10211032

10221033
for (type = types; !seat && type && *type; type++)
1023-
seat = seat_new (*type, seat_name);
1034+
seat = create_seat (*type, seat_name);
10241035
g_strfreev (types);
10251036

10261037
if (seat)
@@ -1397,7 +1408,7 @@ main (int argc, char **argv)
13971408
if (!config_has_key (config_get_instance (), "LightDM", "backup-logs"))
13981409
config_set_boolean (config_get_instance (), "LightDM", "backup-logs", TRUE);
13991410
if (!config_has_key (config_get_instance (), "Seat:*", "type"))
1400-
config_set_string (config_get_instance (), "Seat:*", "type", "xlocal");
1411+
config_set_string (config_get_instance (), "Seat:*", "type", "local");
14011412
if (!config_has_key (config_get_instance (), "Seat:*", "pam-service"))
14021413
config_set_string (config_get_instance (), "Seat:*", "pam-service", "lightdm");
14031414
if (!config_has_key (config_get_instance (), "Seat:*", "pam-autologin-service"))
@@ -1531,7 +1542,7 @@ main (int argc, char **argv)
15311542
types = config_get_string_list (config_get_instance (), "Seat:*", "type");
15321543
for (type = types; type && *type; type++)
15331544
{
1534-
seat = seat_new (*type, "seat0");
1545+
seat = create_seat (*type, "seat0");
15351546
if (seat)
15361547
break;
15371548
}

0 commit comments

Comments
 (0)