summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 754e313)
raw | patch | inline | side by side (parent: 754e313)
author | rwst <rwst@users.sourceforge.net> | |
Sun, 25 Jun 2006 07:49:33 +0000 (07:49 +0000) | ||
committer | rwst <rwst@users.sourceforge.net> | |
Sun, 25 Jun 2006 07:49:33 +0000 (07:49 +0000) |
index 10cde0774e51e4666a9c55abf76bfb44595dda99..e50ba3e589ba27b6c9cf1db82a4cde99dd125117 100644 (file)
-
+#include <cstdio>
#include "InkscapeBinding.h"
#include "help.h"
diff --git a/src/io/sys.h b/src/io/sys.h
index 29c0ad96adccf0978b7c005a02d4fe619be99162..fd39c630b9ea7df2b2a22d3da32e3e85a8180080 100644 (file)
--- a/src/io/sys.h
+++ b/src/io/sys.h
*/
#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#include <glib/gtypes.h>
#include <glib/gdir.h>
#include <glib/gfileutils.h>
index c8dc41e953234d8a5e13d44856e7d02af593edce..49fc03607f530c2874ab9f669860dde591512430 100755 (executable)
@@ -229,7 +229,11 @@ static const Layout::EnumConversionItem enum_convert_spstyle_weight_to_pango_wei
{SP_CSS_FONT_WEIGHT_200, PANGO_WEIGHT_ULTRALIGHT},
{SP_CSS_FONT_WEIGHT_300, PANGO_WEIGHT_LIGHT},
{SP_CSS_FONT_WEIGHT_400, PANGO_WEIGHT_NORMAL},
+#ifdef PANGO_WEIGHT_SEMIBOLD
{SP_CSS_FONT_WEIGHT_500, PANGO_WEIGHT_SEMIBOLD},
+#else
+ {SP_CSS_FONT_WEIGHT_500, PANGO_WEIGHT_NORMAL},
+#endif
{SP_CSS_FONT_WEIGHT_600, PANGO_WEIGHT_BOLD},
{SP_CSS_FONT_WEIGHT_BOLD,PANGO_WEIGHT_BOLD},
{SP_CSS_FONT_WEIGHT_700, PANGO_WEIGHT_BOLD},
index 40bd71027f5f8b870b485facf0f010e2f8379a36..ca25a24ff740e22f8bd9d3bef601e41d1a880400 100755 (executable)
switch (w) {
case PANGO_WEIGHT_ULTRALIGHT: return "ultralight";
case PANGO_WEIGHT_LIGHT : return "light";
+#ifdef PANGO_WEIGHT_SEMIBOLD
case PANGO_WEIGHT_SEMIBOLD : return "semibold";
+#endif
case PANGO_WEIGHT_NORMAL : return "normalweight";
case PANGO_WEIGHT_BOLD : return "bold";
case PANGO_WEIGHT_ULTRABOLD : return "ultrabold";
index 13a0d9b66194aa231acab763d4ba79db7453889b..2dace61ce44d007108c4f6dce93b394c0da44bf0 100644 (file)
--- a/src/trace/filterset.cpp
+++ b/src/trace/filterset.cpp
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <cstdio>
#include <stdlib.h>
#include "imagemap-gdk.h"
index 51f706d4b03e8ca750d3b33589ffaa1b6353daa3..6144840736a5451cf106823610fb20f67abe47a3 100644 (file)
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)
diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp
index 5eb752377851cbc8dba1438a281774fdbbfc9c67..c4ff1746c03a1db39c535871d5a7e6440fc6d329 100644 (file)
--- a/src/widgets/ruler.cpp
+++ b/src/widgets/ruler.cpp
*/
#include <cmath>
+#include <cstdio>
#include <string.h>
#include "widget-sizes.h"
#include "ruler.h"
index ab480ebeccb9ed838914fabd8ccf94b9a21c48b0..c8e484e3b75fff912897430a90a21efd4e061b22 100644 (file)
--- a/src/widgets/toolbox.cpp
+++ b/src/widgets/toolbox.cpp
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);
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);