Merge lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/user_background into lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/trunk

Proposed by Andrew P.
Status: Merged
Merged at revision: 284
Proposed branch: lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/user_background
Merge into: lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/trunk
Diff against target: 72 lines (+22/-9)
1 file modified
src/lightdm-gtk-greeter.c (+22/-9)
To merge this branch: bzr merge lp:~lightdm-gtk-greeter-team/lightdm-gtk-greeter/user_background
Reviewer Review Type Date Requested Status
Sean Davis Approve
Simon Steinbeiß Approve
Review via email: mp+209529@code.launchpad.net

Description of the change

New option: user-background=true|false (true by default)
true: greeter uses per-user backgrounds (provided by AccountsService), false - always uses background from .conf

https://bugs.launchpad.net/lightdm-gtk-greeter/+bug/1272426

To post a comment you must log in.
Revision history for this message
Simon Steinbeiß (ochosi) wrote :

Looks good to me – Sean, any thoughts?

review: Approve
Revision history for this message
Sean Davis (bluesabre) wrote :

I approve, but no can do for the 1.8 series (feature freeze and all that).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/lightdm-gtk-greeter.c'
2--- src/lightdm-gtk-greeter.c 2014-03-02 08:13:23 +0000
3+++ src/lightdm-gtk-greeter.c 2014-03-05 19:51:47 +0000
4@@ -44,7 +44,7 @@
5
6 #ifdef HAVE_LIBIDO
7 /* Some indicators need ido library */
8-#include "libido/libido.h"
9+#include <libido/libido.h>
10 #endif
11
12 #include <lightdm.h>
13@@ -133,11 +133,14 @@
14 DimensionPosition x, y;
15 } WindowPosition;
16
17-const WindowPosition CENTERED_WINDOW_POS = { .x = {50, +1, TRUE, 0}, .y = {50, +1, TRUE, 0} };
18-WindowPosition main_window_pos;
19-
20-GdkPixbuf* default_user_pixbuf = NULL;
21-gchar* default_user_icon = "avatar-default";
22+static const WindowPosition CENTERED_WINDOW_POS = { .x = {50, +1, TRUE, 0}, .y = {50, +1, TRUE, 0} };
23+static WindowPosition main_window_pos;
24+
25+static GdkPixbuf* default_user_pixbuf = NULL;
26+static gchar* default_user_icon = "avatar-default";
27+
28+static gboolean use_user_background = TRUE;
29+
30
31 static void
32 pam_message_finalize (PAMConversationMessage *message)
33@@ -1267,7 +1270,8 @@
34 }
35
36 set_login_button_label (greeter, username);
37- set_user_background (username);
38+ if (use_user_background)
39+ set_user_background (username);
40 set_user_image (username);
41 user = lightdm_user_list_get_user_by_name (lightdm_user_list_get_instance (), username);
42 if (user)
43@@ -2370,6 +2374,11 @@
44 }
45 g_free (value);
46
47+ use_user_background = g_key_file_get_boolean(config, "greeter", "user-background", &error);
48+ if (error)
49+ use_user_background = TRUE;
50+ g_clear_error(&error);
51+
52 /* Make the greeter behave a bit more like a screensaver if used as un/lock-screen by blanking the screen */
53 gchar* end_ptr = NULL;
54 int screensaver_timeout = 60;
55@@ -2713,11 +2722,15 @@
56 }
57 }
58 backgrounds = g_slist_reverse(backgrounds);
59-
60- if (lightdm_greeter_get_hide_users_hint (greeter))
61+
62+ if (lightdm_greeter_get_hide_users_hint (greeter) || !use_user_background)
63 {
64 /* Set the background to default */
65 set_background (NULL);
66+ }
67+
68+ if (lightdm_greeter_get_hide_users_hint (greeter))
69+ {
70 start_authentication ("*other");
71 }
72 else

Subscribers

People subscribed via source and target branches