diff --git a/mugshot/MugshotWindow.py b/mugshot/MugshotWindow.py index 176028e..8fc59d2 100644 --- a/mugshot/MugshotWindow.py +++ b/mugshot/MugshotWindow.py @@ -222,6 +222,7 @@ def finish_initializing(self, builder): # pylint: disable=E1002 # Users without sudo rights cannot change their name. if not self.accounts_service.available(): self.set_name_editable(SudoDialog.check_dependencies(['chfn'])) + self.set_phone_editable(SudoDialog.check_dependencies(['chfn'])) # Populate all of the widgets. self.init_user_details() @@ -232,6 +233,10 @@ def set_name_editable(self, editable): self.last_name_entry.set_sensitive(editable) self.initials_entry.set_sensitive(editable) + def set_phone_editable(self, editable): + self.home_phone_entry.set_sensitive(editable) + self.office_phone_entry.set_sensitive(editable) + def init_user_details(self): """Initialize the user details entries and variables.""" # Check for .face and set profile image. @@ -727,7 +732,7 @@ def get_passwd_data(self): details.append("") # Extract the user details - name, office, office_phone, home_phone = details + name, office, office_phone, home_phone = details[:4] except subprocess.CalledProcessError: logger.warning("User %s not found in /etc/passwd. " "Mugshot may not function correctly." % username) diff --git a/po/mugshot.pot b/po/mugshot.pot index 2e1fb8d..05efc23 100644 --- a/po/mugshot.pot +++ b/po/mugshot.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-30 07:08-0400\n" +"POT-Creation-Date: 2016-03-30 21:15-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -61,7 +61,7 @@ msgstr "" msgid "Browse…" msgstr "" -#: ../data/ui/MugshotWindow.ui.h:9 ../mugshot/MugshotWindow.py:558 +#: ../data/ui/MugshotWindow.ui.h:9 ../mugshot/MugshotWindow.py:563 msgid "Mugshot" msgstr "" @@ -107,45 +107,45 @@ msgstr "" msgid "Retry" msgstr "" -#: ../mugshot/MugshotWindow.py:336 +#: ../mugshot/MugshotWindow.py:341 msgid "Authentication cancelled." msgstr "" -#: ../mugshot/MugshotWindow.py:339 +#: ../mugshot/MugshotWindow.py:344 msgid "Authentication failed." msgstr "" -#: ../mugshot/MugshotWindow.py:342 +#: ../mugshot/MugshotWindow.py:347 msgid "An error occurred when saving changes." msgstr "" -#: ../mugshot/MugshotWindow.py:344 +#: ../mugshot/MugshotWindow.py:349 msgid "User details were not updated." msgstr "" -#: ../mugshot/MugshotWindow.py:445 +#: ../mugshot/MugshotWindow.py:450 msgid "Update Pidgin buddy icon?" msgstr "" -#: ../mugshot/MugshotWindow.py:446 +#: ../mugshot/MugshotWindow.py:451 msgid "Would you also like to update your Pidgin buddy icon?" msgstr "" -#: ../mugshot/MugshotWindow.py:559 +#: ../mugshot/MugshotWindow.py:564 msgid "Enter your password to change user details." msgstr "" -#: ../mugshot/MugshotWindow.py:561 +#: ../mugshot/MugshotWindow.py:566 msgid "" "This is a security measure to prevent unwanted updates\n" "to your personal information." msgstr "" -#: ../mugshot/MugshotWindow.py:812 +#: ../mugshot/MugshotWindow.py:817 msgid "Update LibreOffice user details?" msgstr "" -#: ../mugshot/MugshotWindow.py:813 +#: ../mugshot/MugshotWindow.py:818 msgid "Would you also like to update your user details in LibreOffice?" msgstr ""