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)
committerBen O'Steen <bosteen@gmail.com>
Mon, 1 Aug 2011 12:55:04 +0000 (13:55 +0100)
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 a3aaeca..fc529bd 100644 (file)
@@ -40,8 +40,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()