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/toolbox.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/toolbox.cpp')
| -rw-r--r-- | src/widgets/toolbox.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index ab480ebec..c8e484e3b 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -3252,7 +3252,16 @@ sp_text_toolbox_size_changed (GtkComboBox *cbox, if (g_object_get_data (tbl, "size-block")) return; +#if GTK_CHECK_VERSION(2,6,0) char *text = gtk_combo_box_get_active_text (cbox); +#else // GTK_CHECK_VERSION(2,6,0) + GtkTreeModel *model = gtk_combo_box_get_model (cbox); + GtkTreeIter iter; + char *text = NULL; + + if (gtk_combo_box_get_active_iter (cbox, &iter) && model) + gtk_tree_model_get (model, &iter, 0, &text, -1); +#endif // GTK_CHECK_VERSION(2,6,0) SPCSSAttr *css = sp_repr_css_attr_new (); sp_repr_css_set_property (css, "font-size", text); @@ -3406,7 +3415,9 @@ sp_text_toolbox_new (SPDesktop *desktop) gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), GTK_TREE_MODEL (Glib::unwrap(store))); gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (treeview), FALSE); +#if GTK_CHECK_VERSION(2,6,0) gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (treeview), TRUE); +#endif // GTK_CHECK_VERSION(2,6,0) //gtk_tree_view_set_enable_search (GTK_TREE_VIEW (treeview), TRUE); |
