diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2014-05-28 09:11:31 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2014-05-28 09:11:31 +0000 |
| commit | 45922bee145584c0161fa89735da108ece53e0f5 (patch) | |
| tree | 66cebac82d424486437d9b1371ce749499252fe9 /src | |
| parent | Convert from 90px to inch to 96px to inch per SVG (CSS) specification. (diff) | |
| download | inkscape-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.cpp | 9 |
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" |
