[Skencil-commits] r803 - skencil/branches/skencil-0.6/src/Sketch/Base
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sun Feb 6 21:40:42 CET 2011
Author: bh
Date: 2011-02-06 21:40:42 +0100 (Sun, 06 Feb 2011)
New Revision: 803
Modified:
skencil/branches/skencil-0.6/src/Sketch/Base/gtkutils.py
Log:
Print warnings if determining colors and fonts from GTK settings fails.
Modified: skencil/branches/skencil-0.6/src/Sketch/Base/gtkutils.py
===================================================================
--- skencil/branches/skencil-0.6/src/Sketch/Base/gtkutils.py 2011-02-06 20:36:54 UTC (rev 802)
+++ skencil/branches/skencil-0.6/src/Sketch/Base/gtkutils.py 2011-02-06 20:40:42 UTC (rev 803)
@@ -21,7 +21,9 @@
import os, string, copy
from tempfile import NamedTemporaryFile
+from Sketch.warn import INTERNAL, warn_tb
+
##################################################
# Font routines
##################################################
@@ -59,6 +61,8 @@
fixed_font = copy.deepcopy(normal_font)
fixed_font[0] = 'monospace'
except:
+ warn_tb(INTERNAL, "Cannot determine the font from the GTK settings."
+ " Using helvetica 9 instead")
small_font = normal_font = large_font = fixed_font = \
['helvetica', '', 9]
@@ -204,6 +208,9 @@
try:
self.import_gtk_colors()
except:
+ warn_tb(INTERNAL, "Cannot determine the colors from the GTK"
+ " settings. Using built-in color scheme instead")
+
scheme == BUILTIN_SCHEME
def import_gtk_colors(self):
More information about the Skencil-commits
mailing list