My favorites
▼
|
Sign in
pymt
PyMT, a framework for making accelerated multitouch UI
Project Home
Downloads
Issues
READ-ONLY: This project has been
archived
. For more information see
this post
.
Search
Search within:
All issues
Open issues
New issues
Issues to verify
for
Advanced search
Search tips
Subscriptions
Issue
318
attachment: 0001-Only-set-the-window-icon-if-PyGame-loads-the-image-i.patch
(1.0 KB)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 3996802a6da98e570885a55a800186540aa17942 Mon Sep 17 00:00:00 2001
From: Fajran Iman Rusadi <fajran@gmail.com>
Date: Mon, 27 Sep 2010 14:03:27 +0200
Subject: [PATCH] Only set the window icon if PyGame loads the image icon successfully
---
pymt/ui/window/win_pygame.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/pymt/ui/window/win_pygame.py b/pymt/ui/window/win_pygame.py
index 6bc3def..97c7638 100644
--- a/pymt/ui/window/win_pygame.py
+++ b/pymt/ui/window/win_pygame.py
@@ -52,8 +52,11 @@ class MTWindowPygame(BaseWindow):
self.flags |= pygame.FULLSCREEN
#set window icon before calling set_mode
- icon = pygame.image.load(pymt.pymt_config.get('graphics', 'window_icon'))
- pygame.display.set_icon(icon)
+ try:
+ icon = pygame.image.load(pymt.pymt_config.get('graphics', 'window_icon'))
+ pygame.display.set_icon(icon)
+ except pygame.error:
+ pass
# init ourself size + setmode
--
1.7.0.6
Powered by
Google Project Hosting