diff options
| author | Ralf Stephan <ralf@ark.in-berlin.de> | 2006-06-25 07:49:33 +0000 |
|---|---|---|
| committer | rwst <rwst@users.sourceforge.net> | 2006-06-25 07:49:33 +0000 |
| commit | 765b93bad405ffee4f14acf9a44fe9fba1935e74 (patch) | |
| tree | 952be84f5e7302ab0cc261d646d251d74bcfb68b /src/widgets/font-selector.cpp | |
| parent | radial gradients faster by about 10% (diff) | |
| download | inkscape-765b93bad405ffee4f14acf9a44fe9fba1935e74.tar.gz inkscape-765b93bad405ffee4f14acf9a44fe9fba1935e74.zip | |
glib-2.4 system fixes: some includes to get prototypes, some version checks
(bzr r1280)
Diffstat (limited to 'src/widgets/font-selector.cpp')
| -rw-r--r-- | src/widgets/font-selector.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 51f706d4b..614484073 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -307,7 +307,16 @@ static void sp_font_selector_style_select_row (GtkTreeSelection *selection, static void sp_font_selector_size_changed (GtkComboBox *cbox, SPFontSelector *fsel) { +#if GTK_CHECK_VERSION(2,6,0) char *sstr = gtk_combo_box_get_active_text (GTK_COMBO_BOX (fsel->size)); +#else // GTK_CHECK_VERSION(2,6,0) + GtkTreeModel *model = gtk_combo_box_get_model (GTK_COMBO_BOX (fsel->size)); + GtkTreeIter iter; + char *sstr = NULL; + + if (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (fsel->size), &iter) && model) + gtk_tree_model_get (model, &iter, 0, &sstr, -1); +#endif // GTK_CHECK_VERSION(2,6,0) gfloat old_size = fsel->fontsize; fsel->fontsize = MAX(atof(sstr), 0.1); if ( fabs(fsel->fontsize-old_size) > 0.001) |
