From 5ea21615bbd02723bd0855df96e8465bfcf142d0 Mon Sep 17 00:00:00 2001 From: Sean Davis Date: Wed, 17 Jul 2013 15:57:29 -0400 Subject: [PATCH] Update icon location and version number --- data/ui/CameraMugshotDialog.ui | 2 +- data/ui/MugshotWindow.ui | 4 +++- debian/control | 3 +++ setup.py | 20 ++++++++++++++++++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/data/ui/CameraMugshotDialog.ui b/data/ui/CameraMugshotDialog.ui index 975bdf1..ae35e8d 100644 --- a/data/ui/CameraMugshotDialog.ui +++ b/data/ui/CameraMugshotDialog.ui @@ -10,7 +10,7 @@ False 230 300 - ../media/mugshot.svg + mugshot normal diff --git a/data/ui/MugshotWindow.ui b/data/ui/MugshotWindow.ui index b7ae547..748f6ea 100644 --- a/data/ui/MugshotWindow.ui +++ b/data/ui/MugshotWindow.ui @@ -68,7 +68,7 @@ False Mugshot False - ../media/mugshot.svg + mugshot True @@ -498,6 +498,7 @@ 5 True center-always + mugshot dialog True mugshot_window @@ -676,6 +677,7 @@ to your personal information. 600 480 True + mugshot dialog mugshot_window diff --git a/debian/control b/debian/control index 0cdb3f0..e710495 100644 --- a/debian/control +++ b/debian/control @@ -27,6 +27,9 @@ Description: a lightweight user-configuration application Mugshot allows you to easily update personal user details. This includes: . Linux profile image: ~/.face + . User details stored in /etc/passwd (used by finger) + . Pidgin buddy icon + . LibreOffice user details diff --git a/setup.py b/setup.py index 4ecf244..59fd1d4 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,22 @@ def update_config(libdir, values = {}): print ("ERROR: Can't find %s" % filename) sys.exit(1) return oldvalues - + +def move_icon_file(root, target_data, prefix): + old_icon_path = os.path.normpath(root + target_data + '/share/mugshot/media') + old_icon_file = old_icon_path + '/mugshot.svg' + icon_path = os.path.normpath(root + prefix + '/share/icons/hicolor/scalable/apps') + icon_file = icon_path + '/mugshot.svg' + + if not os.path.exists(old_icon_file): + print ("ERROR: Can't find", old_icon_file) + sys.exit(1) + if not os.path.exists(icon_path): + os.makedirs(icon_path) + if old_icon_file != icon_file: + os.rename(old_icon_file, icon_file) + + return icon_file def move_desktop_file(root, target_data, prefix): # The desktop file is rightly installed into install_data. But it should @@ -131,6 +146,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto): update_config(self.install_lib, values) desktop_file = move_desktop_file(self.root, target_data, self.prefix) + icon_file = move_icon_file(self.root, target_data, self.prefix) update_desktop_file(desktop_file, target_pkgdata, target_scripts) compile_schemas(self.root, target_data) @@ -141,7 +157,7 @@ class InstallAndUpdateDataDirectory(DistUtilsExtra.auto.install_auto): DistUtilsExtra.auto.setup( name='mugshot', - version='13.07', + version='0.1', license='GPL-3', author='Sean Davis', author_email='smd.seandavis@gmail.com',