Manually merge ~thad-fisch/mugshot/improved-accountsservice-integration:96
This commit is contained in:
parent
303ed23225
commit
8fadc36e3c
|
@ -40,6 +40,7 @@ libreoffice_prefs = os.path.join(GLib.get_user_config_dir(), 'libreoffice',
|
||||||
'4', 'user', 'registrymodifications.xcu')
|
'4', 'user', 'registrymodifications.xcu')
|
||||||
pidgin_prefs = os.path.join(home, '.purple', 'prefs.xml')
|
pidgin_prefs = os.path.join(home, '.purple', 'prefs.xml')
|
||||||
faces_dir = '/usr/share/pixmaps/faces/'
|
faces_dir = '/usr/share/pixmaps/faces/'
|
||||||
|
icons_dir = '/var/lib/AccountsService/icons/'
|
||||||
|
|
||||||
|
|
||||||
def which(command):
|
def which(command):
|
||||||
|
@ -219,7 +220,13 @@ class MugshotWindow(Window):
|
||||||
if os.path.isfile(face):
|
if os.path.isfile(face):
|
||||||
self.set_user_image(face)
|
self.set_user_image(face)
|
||||||
else:
|
else:
|
||||||
self.set_user_image(None)
|
logger.debug('Checking AccountsService for profile image')
|
||||||
|
face = os.path.join(icons_dir, username)
|
||||||
|
logger.debug("%s" % face)
|
||||||
|
if os.path.isfile(face):
|
||||||
|
self.set_user_image(face)
|
||||||
|
else:
|
||||||
|
self.set_user_image(None)
|
||||||
self.updated_image = None
|
self.updated_image = None
|
||||||
|
|
||||||
# Search /etc/passwd for the current user's details.
|
# Search /etc/passwd for the current user's details.
|
||||||
|
@ -348,7 +355,8 @@ class MugshotWindow(Window):
|
||||||
first_name = get_entry_value(self.first_name_entry)
|
first_name = get_entry_value(self.first_name_entry)
|
||||||
last_name = get_entry_value(self.last_name_entry)
|
last_name = get_entry_value(self.last_name_entry)
|
||||||
if get_entry_value(self.initials_entry) == '':
|
if get_entry_value(self.initials_entry) == '':
|
||||||
self.initials_entry.set_text(self.suggest_initials(first_name, last_name))
|
self.initials_entry.set_text(self.suggest_initials(first_name,
|
||||||
|
last_name))
|
||||||
|
|
||||||
def on_cancel_button_clicked(self, widget):
|
def on_cancel_button_clicked(self, widget):
|
||||||
"""When the window cancel button is clicked, close the program."""
|
"""When the window cancel button is clicked, close the program."""
|
||||||
|
|
Loading…
Reference in New Issue