=== modified file 'src/background.vala' --- src/background.vala 2012-04-03 15:50:50 +0000 +++ src/background.vala 2012-04-04 22:48:47 +0000 @@ -253,6 +253,23 @@ public Background (Cairo.Surface target_surface) { + var bg_color = Gdk.RGBA (); + /* + * Checking if /etc/lightdm/greeter-bottom-color.conf exists and if it contains a valid color + * If it does, using this color instead of the standard value + */ + var file = File.new_for_path ("/etc/lightdm/greeter-bottom-color.conf"); + if (file.query_exists ()) + { + var dis = new DataInputStream (file.read ()); + string line; + if ((line = dis.read_line (null)) != null) + { + if (bg_color.parse (line)) + default_background = line; + } + } + this.target_surface = target_surface; timer = new AnimateTimer (AnimateTimer.ease_in_out, 700); timer.animate.connect (animate_cb); === modified file 'src/main-window.vala' --- src/main-window.vala 2012-03-15 09:37:28 +0000 +++ src/main-window.vala 2012-04-04 22:48:47 +0000 @@ -37,7 +37,21 @@ add_accel_group (accel_group); var bg_color = Gdk.RGBA (); - bg_color.parse ("#2C001E"); + /* + * Checking if /etc/lightdm/greeter-bottom-color.conf exists and if it contains a valid color + * If it does, using this color instead of the standard value + */ + var file = File.new_for_path ("/etc/lightdm/greeter-bottom-color.conf"); + if (file.query_exists ()) + { + var dis = new DataInputStream (file.read ()); + string line; + if ((line = dis.read_line (null)) != null) + { + if (!bg_color.parse (line)) + bg_color.parse ("#2C001E"); + } + } override_background_color (Gtk.StateFlags.NORMAL, bg_color); get_accessible ().set_name (_("Login Screen")); has_resize_grip = false; @@ -46,12 +60,20 @@ realize (); background = new Background (Gdk.cairo_create (get_window ()).get_target ()); background.draw_grid = UGSettings.get_boolean (UGSettings.KEY_DRAW_GRID); + /* + * This line would load the default Ubuntu wallpaper(which is set for the lightdm user as standard), + * which may differ from the user selected wallpaper. Afterwards the background would fade to the + * user selected background. Which may be annoying, if the colors are not matching + background.default_background = UGSettings.get_string (UGSettings.KEY_BACKGROUND); + + */ + background.set_logo (UGSettings.get_string (UGSettings.KEY_LOGO), UGSettings.get_string (UGSettings.KEY_BACKGROUND_LOGO)); background.show (); add (background); UnityGreeter.add_style_class (background); - + login_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); login_box.show (); background.add (login_box); @@ -64,13 +86,6 @@ user_list = new UserList (background, menubar); user_list.expand = true; - user_list.user_displayed_start.connect (() => { - change_background (); - }); - user_list.user_displayed_done.connect (() => { - menubar.set_layouts (user_list.selected_entry.keyboard_layouts); - change_background (); - }); user_list.show (); login_box.add (user_list); UnityGreeter.add_style_class (user_list); @@ -91,6 +106,18 @@ screen.monitors_changed.connect (monitors_changed_cb); monitors_changed_cb (screen); } + + /* + * There is no background image drawn, when adding the *guest user(has a background now) to the user_list + * (because the events are connected after adding the users) + */ + user_list.user_displayed_start.connect (() => { + change_background (); + }); + user_list.user_displayed_done.connect (() => { + menubar.set_layouts (user_list.selected_entry.keyboard_layouts); + change_background (); + }); } private void monitors_changed_cb (Gdk.Screen screen) === modified file 'src/user-list.vala' --- src/user-list.vala 2012-04-03 15:50:50 +0000 +++ src/user-list.vala 2012-04-04 22:48:47 +0000 @@ -77,7 +77,10 @@ { _offer_guest = value; if (value) - add_entry ("*guest", _("Guest Session")); + /* + * Added a background to the guest entry + */ + add_entry ("*guest", _("Guest Session"), "/usr/share/backgrounds/warty-final-ubuntu.png"); else remove_entry ("*guest"); }