# HG changeset patch # User Simon Cross # Date 1316289626 -7200 # Node ID 4986c22fe5fdb17899851bf577706f85398945a5 # Parent 590aa23648f8c4544acecf5bc9f4174bdf298676 Re-set window icon when the editor re-creates windows. diff -r 590aa23648f8 -r 4986c22fe5fd mamba/habitats/editor.py --- 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):