changeset 475:4986c22fe5fd

Re-set window icon when the editor re-creates windows.
author Simon Cross <hodgestar@gmail.com>
date Sat, 17 Sep 2011 22:00:26 +0200
parents 590aa23648f8
children 38175efa97be
files mamba/habitats/editor.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mamba/habitats/editor.py	Sat Sep 17 21:58:22 2011 +0200
+++ b/mamba/habitats/editor.py	Sat Sep 17 22:00:26 2011 +0200
@@ -16,9 +16,10 @@
 from mamba.widgets.editsprite import EditSpriteBox
 from mamba.widgets.editlevel import EditLevelBox
 from mamba.level import Level, Tileset, TILE_MAP, THING_MAP, InvalidMapError
-from mamba.data import check_level_exists, get_level_list, load_file
+from mamba.data import (check_level_exists, get_level_list, load_file,
+                        load_image)
 from mamba.constants import (SCREEN, EDIT_SCREEN, NAME, ESCAPE_KEYS,
-        RESERVED_NAMES)
+        RESERVED_NAMES, WINDOW_ICON)
 
 MAX_TOOLS = 6
 MODE_HEIGHT = 500
@@ -42,6 +43,7 @@
         pygame.display.quit()
         pygame.display.init()
         pygame.display.set_mode(EDIT_SCREEN, SWSURFACE)
+        pygame.display.set_icon(load_image(WINDOW_ICON))
         pygame.display.set_caption('%s Level editor' % NAME)
         super(EditorHabitat, self).on_enter()
         self.setup_toolbar()
@@ -53,6 +55,7 @@
         pygame.display.quit()
         pygame.display.init()
         pygame.display.set_mode(SCREEN, SWSURFACE)
+        pygame.display.set_icon(load_image(WINDOW_ICON))
         pygame.display.set_caption(NAME)
 
     def keydown_event(self, ev, widget):