summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2013-02-05 18:45:34 +0000
committertavmjong-free <tavmjong@free.fr>2013-02-05 18:45:34 +0000
commitf7810c8932b5097aebb9c1b11e346d1a56b4a11e (patch)
tree7e73b4b4a47726cdedab9d9f98d52eaa283e2d6f /src/widgets/text-toolbar.cpp
parentBuild. Adding test for external GDL build (--enable-gtk3-experimental option). (diff)
downloadinkscape-f7810c8932b5097aebb9c1b11e346d1a56b4a11e.tar.gz
inkscape-f7810c8932b5097aebb9c1b11e346d1a56b4a11e.zip
Second try at getting text toolbar properly initialized when there is no prefs file.
(bzr r12101)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
-rw-r--r--src/widgets/text-toolbar.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 6adff8bfb..3eccf1d2f 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -1173,13 +1173,6 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
std::cout << selected_text << std::endl;
#endif
- // Check if the toolbar has been created; quit if it has not.
- Ink_ComboBoxEntry_Action* fontFamilyAction =
- INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontFamilyAction" ) );
- if( fontFamilyAction->combobox == NULL ) {
- return;
- }
-
// quit if run by the _changed callbacks
if (g_object_get_data(G_OBJECT(tbl), "freeze")) {
#ifdef DEBUG_TEXT
@@ -1243,7 +1236,13 @@ static void sp_text_toolbox_selection_changed(Inkscape::Selection */*selection*/
return;
}
- g_object_set_data(tbl, "text_style_from_prefs", GINT_TO_POINTER(TRUE));
+ // To ensure the value of the combobox is properly set on start-up, only mark
+ // the prefs set if the combobox has already been constructed.
+ Ink_ComboBoxEntry_Action* fontFamilyAction =
+ INK_COMBOBOXENTRY_ACTION( g_object_get_data( tbl, "TextFontFamilyAction" ) );
+ if( fontFamilyAction->combobox != NULL ) {
+ g_object_set_data(tbl, "text_style_from_prefs", GINT_TO_POINTER(TRUE));
+ }
} else {
g_object_set_data(tbl, "text_style_from_prefs", GINT_TO_POINTER(FALSE));
}