OSDN Git Service

app: refuse to start if icons are missing
authorMartin Renold <martinxyz@gmx.ch>
Sun, 31 Jul 2011 17:24:22 +0000 (19:24 +0200)
committerMartin Renold <martinxyz@gmx.ch>
Sun, 31 Jul 2011 17:28:01 +0000 (19:28 +0200)
Now that we have some important icons, it's probably better to
exit earily and print an error, rather than to let the user stare
puzzled at blank icons.

(Trouble ahead. IIRC this is broken at least on Mac, maybe Windows too.)

gui/application.py

index 9a4452b..625f1d3 100644 (file)
@@ -39,8 +39,10 @@ class Application: # singleton
         themedir_src = join(self.datapath, 'desktop/icons')
         theme.prepend_search_path(themedir_src)
         if not theme.has_icon('mypaint'):
-            print 'Warning: Where have all my icons gone?'
+            print 'Error: Where have all my icons gone?'
             print 'Theme search path:', theme.get_search_path()
+            print 'I see no point in running without icons! Goodbye!'
+            sys.exit(1)
         gtk.window_set_default_icon_name('mypaint')
 
         stock.init_custom_stock_items()