Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
103 lines (98 sloc) 4.71 KB
diff -rupN a/usr/lib/lightdm-settings/lightdm-settings b/usr/lib/lightdm-settings/lightdm-settings
--- a/usr/lib/lightdm-settings/lightdm-settings 2018-05-10 15:36:02.000000000 +0200
+++ b/usr/lib/lightdm-settings/lightdm-settings 2018-05-16 01:59:53.865609297 +0200
@@ -137,13 +137,9 @@ class Application(Gtk.Application):
row.set_tooltip_text(_("Background color"))
section.add_row(row)
- try:
- if self.should_show_user_bg_switch ():
- row = SettingsRow(Gtk.Label(_("Draw user backgrounds")), SettingsSwitch(keyfile, settings, "draw-user-backgrounds"))
- row.set_tooltip_text(_("When a user is selected, show that user's background."))
- section.add_row(row)
- except:
- pass
+ row = SettingsRow(Gtk.Label(_("Draw user backgrounds")), SettingsSwitch(keyfile, settings, "draw-user-backgrounds"))
+ row.set_tooltip_text(_("When a user is selected, show that user's background."))
+ section.add_row(row)
row = SettingsRow(Gtk.Label(_("Draw a grid")), SettingsSwitch(keyfile, settings, "draw-grid"))
row.set_tooltip_text(_("Draw a grid of white dots on top of the background."))
@@ -371,81 +367,6 @@ class Application(Gtk.Application):
pass
return (value)
- def should_show_user_bg_switch (self):
- # Setting the user background was an ubuntu-only patch to AccountsService, but as
- # of lightdm 1.25.2, it's provided as a plugin to AccountsService. We can check on
- # the bus to see if we have either form of support (either via AccountsService.User or
- # DisplayManager.AccountsService)
- #
- # It doesn't matter whether we're root here - we don't care about the return values,
- # just that the calls succeed.
- #
- # see https://github.com/linuxmint/slick-greeter/issues/94
-
- # Find a user node
- try:
- proxy = Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SYSTEM,
- Gio.DBusProxyFlags.NONE,
- None,
- "org.freedesktop.Accounts",
- "/org/freedesktop/Accounts",
- "org.freedesktop.Accounts",
- None)
-
- user_var = proxy.call_sync("FindUserByName",
- GLib.Variant("(s)", (GLib.get_user_name(),)),
- Gio.DBusCallFlags.NONE,
- -1,
- None)
- except GLib.Error as e:
- print(e.message)
- return False
-
- try:
- object_path = user_var.unpack()[0]
- except IndexError:
- return False
-
- # Initialize a properties interface
- try:
- props = Gio.DBusProxy.new_for_bus_sync(Gio.BusType.SYSTEM,
- Gio.DBusProxyFlags.NONE,
- None,
- "org.freedesktop.Accounts",
- object_path,
- "org.freedesktop.DBus.Properties",
- None)
- except GLib.Error as e:
- print(e.message)
- return False
-
- # Try the new way (plugin)
- try:
- ret = props.call_sync("Get",
- GLib.Variant("(ss)",
- ("org.freedesktop.DisplayManager.AccountsService",
- "BackgroundFile")),
- Gio.DBusCallFlags.NONE,
- -1,
- None)
- except GLib.Error as e:
- print(e.message)
-
- # Try the old way (patched AccountsService)
- try:
- ret = props.call_sync("Get",
- GLib.Variant("(ss)",
- ("org.freedesktop.Accounts.User",
- "BackgroundFile")),
- Gio.DBusCallFlags.NONE,
- -1,
- None)
- except GLib.Error as e:
- print(e.message)
- return False
-
- return True
-
def get_monitors(self):
monitors = []
You can’t perform that action at this time.