diff options
author | Aneesh Agrawal <aneeshusa@gmail.com> | 2017-04-16 22:07:39 -0400 |
---|---|---|
committer | Aneesh Agrawal <aneeshusa@gmail.com> | 2017-04-16 22:12:17 -0400 |
commit | ff74faee109fc4977865512aa5657166667da6b4 (patch) | |
tree | 09766da25c08d23f232b1805038126ebd4d8c638 /python/servo/build_commands.py | |
parent | 5ccb087769fdb5253514e1ea2babd28b21c65907 (diff) | |
download | servo-ff74faee109fc4977865512aa5657166667da6b4.tar.gz servo-ff74faee109fc4977865512aa5657166667da6b4.zip |
Fix setting Servo icon on macOS
Originally introduced in PR #11646,
this appears to have been accidentally broken by commit
82df8e9399cad363ba2ff1fbe5350327935d8289.
Diffstat (limited to 'python/servo/build_commands.py')
-rw-r--r-- | python/servo/build_commands.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/python/servo/build_commands.py b/python/servo/build_commands.py index 48de80811ee..cb4f108400c 100644 --- a/python/servo/build_commands.py +++ b/python/servo/build_commands.py @@ -325,19 +325,19 @@ class MachCommands(CommandBase): shutil.copy(path.join(env['OPENSSL_LIB_DIR'], "../bin" + msvc_x64, ssl_lib), servo_exe_dir) - elif sys.platform == "darwin": - # On the Mac, set a lovely icon. This makes it easier to pick out the Servo binary in tools - # like Instruments.app. - try: - import Cocoa - icon_path = path.join(self.get_top_dir(), "resources", "servo.png") - icon = Cocoa.NSImage.alloc().initWithContentsOfFile_(icon_path) - if icon is not None: - Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(icon, - servo_path, - 0) - except ImportError: - pass + elif sys.platform == "darwin": + # On the Mac, set a lovely icon. This makes it easier to pick out the Servo binary in tools + # like Instruments.app. + try: + import Cocoa + icon_path = path.join(self.get_top_dir(), "resources", "servo.png") + icon = Cocoa.NSImage.alloc().initWithContentsOfFile_(icon_path) + if icon is not None: + Cocoa.NSWorkspace.sharedWorkspace().setIcon_forFile_options_(icon, + servo_path, + 0) + except ImportError: + pass # Generate Desktop Notification if elapsed-time > some threshold value notify_build_done(self.config, elapsed, status == 0) |