summaryrefslogtreecommitdiffstats
path: root/src/widgets/text-toolbar.cpp
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2013-01-31 18:35:26 +0000
committertavmjong-free <tavmjong@free.fr>2013-01-31 18:35:26 +0000
commit6a597dc85342abf8c88a5b4f1ba99d50589f64ef (patch)
treef78f45549b53f523c50418728426c6170857db6c /src/widgets/text-toolbar.cpp
parentPartial fix to allow change of style when the font-family is a font list. (diff)
downloadinkscape-6a597dc85342abf8c88a5b4f1ba99d50589f64ef.tar.gz
inkscape-6a597dc85342abf8c88a5b4f1ba99d50589f64ef.zip
Text toolbar will display style options for the first font in a font-family list. Also, fix mem leak.
(bzr r12082)
Diffstat (limited to 'src/widgets/text-toolbar.cpp')
-rw-r--r--src/widgets/text-toolbar.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp
index 6c22c81e3..1f60c6214 100644
--- a/src/widgets/text-toolbar.cpp
+++ b/src/widgets/text-toolbar.cpp
@@ -178,6 +178,11 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL)
return;
}
+ // If font list, take only first font in list
+ gchar** tokens = g_strsplit( current_font, ",", 0 );
+ g_strstrip( tokens[0] );
+ current_font = tokens[0];
+
// Get an iter to the selected font from the model data
// We cant get it from the combo, cause it might not have been created yet
gboolean found = false;
@@ -197,6 +202,8 @@ static void sp_text_fontstyle_populate(GObject *tbl, font_instance *font=NULL)
valid = gtk_tree_model_iter_next( model, &iter );
}
+ g_strfreev( tokens );
+
if (!found) {
return;
}