From 765b93bad405ffee4f14acf9a44fe9fba1935e74 Mon Sep 17 00:00:00 2001 From: Ralf Stephan Date: Sun, 25 Jun 2006 07:49:33 +0000 Subject: glib-2.4 system fixes: some includes to get prototypes, some version checks (bzr r1280) --- src/widgets/font-selector.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/widgets/font-selector.cpp') 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) -- cgit v1.2.3