Merge lp:~thad-fisch-deactivatedaccount/mugshot/menu-item-visibility into lp:~mugshot-dev/mugshot/trunk

Proposed by Thaddaeus Tintenfisch
Status: Merged
Merged at revision: 74
Proposed branch: lp:~thad-fisch-deactivatedaccount/mugshot/menu-item-visibility
Merge into: lp:~mugshot-dev/mugshot/trunk
Diff against target: 28 lines (+5/-5)
1 file modified
mugshot/MugshotWindow.py (+5/-5)
To merge this branch: bzr merge lp:~thad-fisch-deactivatedaccount/mugshot/menu-item-visibility
Reviewer Review Type Date Requested Status
Sean Davis Approve
Review via email: mp+208869@code.launchpad.net

Description of the change

Commit does also include a cosmetic change (use faces_dir which is globally defined).

To post a comment you must log in.
Revision history for this message
Sean Davis (bluesabre) wrote :

Wow, silly typo on my part. Merging!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mugshot/MugshotWindow.py'
--- mugshot/MugshotWindow.py 2014-01-26 00:44:26 +0000
+++ mugshot/MugshotWindow.py 2014-02-28 19:12:03 +0000
@@ -179,8 +179,8 @@
179 self.image_menu = builder.get_object('image_menu')179 self.image_menu = builder.get_object('image_menu')
180 self.image_menu.attach_to_widget(self.image_button, detach_cb)180 self.image_menu.attach_to_widget(self.image_button, detach_cb)
181 self.image_from_camera = builder.get_object('image_from_camera')181 self.image_from_camera = builder.get_object('image_from_camera')
182 image_from_browse = builder.get_object('image_from_browse')182 image_from_stock = builder.get_object('image_from_stock')
183 image_from_browse.set_visible(os.path.exists(faces_dir) and183 image_from_stock.set_visible(os.path.exists(faces_dir) and
184 len(os.listdir(faces_dir)) > 0)184 len(os.listdir(faces_dir)) > 0)
185185
186 # Entry widgets (chfn)186 # Entry widgets (chfn)
@@ -713,10 +713,10 @@
713 logger.debug("Stock browser already loaded.")713 logger.debug("Stock browser already loaded.")
714 return714 return
715715
716 # If they have not, load each photo from /usr/share/pixmaps/faces.716 # If they have not, load each photo from faces_dir.
717 logger.debug("Loading stock browser photos.")717 logger.debug("Loading stock browser photos.")
718 for filename in os.listdir('/usr/share/pixmaps/faces'):718 for filename in os.listdir(faces_dir):
719 full_path = os.path.join('/usr/share/pixmaps/faces/', filename)719 full_path = os.path.join(faces_dir, filename)
720 if os.path.isfile(full_path):720 if os.path.isfile(full_path):
721 pixbuf = GdkPixbuf.Pixbuf.new_from_file(full_path)721 pixbuf = GdkPixbuf.Pixbuf.new_from_file(full_path)
722 scaled = pixbuf.scale_simple(90, 90, GdkPixbuf.InterpType.HYPER)722 scaled = pixbuf.scale_simple(90, 90, GdkPixbuf.InterpType.HYPER)

Subscribers

People subscribed via source and target branches

to all changes: