From bf3187225ddfabaa532cb9e9b6b36cb0517c1b34 Mon Sep 17 00:00:00 2001 From: Martin Renold Date: Sun, 31 Jul 2011 19:24:22 +0200 Subject: [PATCH] app: refuse to start if icons are missing 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/application.py b/gui/application.py index a3aaeca..fc529bd 100644 --- a/gui/application.py +++ b/gui/application.py @@ -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() -- 2.11.0