diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2013-02-10 06:33:41 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2013-02-10 06:33:41 +0000 |
| commit | d950a5453a26c6d887e3fcd597da9a7818bab7f3 (patch) | |
| tree | bcdeef173772ea5d0344fef81cf1771e5fade13d /src/libnrtype | |
| parent | Use update_font_list() in font-lister.cpp. Remove equivalent code in text-too... (diff) | |
| download | inkscape-d950a5453a26c6d887e3fcd597da9a7818bab7f3.tar.gz inkscape-d950a5453a26c6d887e3fcd597da9a7818bab7f3.zip | |
Attempt to speed up font-family handling be freezing/thawing Gtk::ListStore when modifying.
(bzr r12113)
Diffstat (limited to 'src/libnrtype')
| -rw-r--r-- | src/libnrtype/font-lister.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libnrtype/font-lister.cpp b/src/libnrtype/font-lister.cpp index 1e51d8803..647bbc056 100644 --- a/src/libnrtype/font-lister.cpp +++ b/src/libnrtype/font-lister.cpp @@ -24,7 +24,8 @@ namespace Inkscape FontLister::FontLister () { font_list_store = Gtk::ListStore::create (FontList); - + font_list_store->freeze_notify(); + FamilyToStylesMap familyStyleMap; font_factory::Default()->GetUIFamiliesAndStyles(&familyStyleMap); @@ -60,6 +61,7 @@ namespace Inkscape (*treeModelIter)[FontList.onSystem] = true; } } + font_list_store->thaw_notify(); } // Example of how to use "foreach_iter" @@ -82,6 +84,8 @@ namespace Inkscape return; } + font_list_store->freeze_notify(); + /* Clear all old document font-family entries */ Gtk::TreeModel::iterator iter = font_list_store->get_iter( "0" ); while( iter != font_list_store->children().end() ) { @@ -146,6 +150,8 @@ namespace Inkscape (*treeModelIter)[FontList.styles] = styles; (*treeModelIter)[FontList.onSystem] = false; } + + font_list_store->thaw_notify(); } void |
