summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-05-28 09:11:31 +0000
committertavmjong-free <tavmjong@free.fr>2014-05-28 09:11:31 +0000
commit45922bee145584c0161fa89735da108ece53e0f5 (patch)
tree66cebac82d424486437d9b1371ce749499252fe9 /src
parentConvert from 90px to inch to 96px to inch per SVG (CSS) specification. (diff)
downloadinkscape-45922bee145584c0161fa89735da108ece53e0f5.tar.gz
inkscape-45922bee145584c0161fa89735da108ece53e0f5.zip
Initialize style store with default styles. Fixes Gtk-CRITICAL and GLib-Gobject-CRITICAL errors.
(bzr r13341.1.40)
Diffstat (limited to 'src')
-rw-r--r--src/libnrtype/font-lister.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp
index 98589d9d7..300273378 100644
--- a/src/libnrtype/font-lister.cpp
+++ b/src/libnrtype/font-lister.cpp
@@ -83,6 +83,15 @@ namespace Inkscape
font_list_store->thaw_notify();
style_list_store = Gtk::ListStore::create (FontStyleList);
+
+ // Initialize style store with defaults
+ style_list_store->freeze_notify();
+ style_list_store->clear();
+ for (GList *l=default_styles; l; l = l->next) {
+ Gtk::TreeModel::iterator treeModelIter = style_list_store->append();
+ (*treeModelIter)[FontStyleList.styles] = (char*)l->data;
+ }
+ style_list_store->thaw_notify();
}
// Example of how to use "foreach_iter"