summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2013-07-17 11:42:40 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2013-07-17 11:42:40 +0000
commitf5023f704fb05b25d5fa6c78e0faefd93ef044ae (patch)
tree59cac853d826a993d2369a3846f4c3982284fb64
parentShape calculations. re-introduce grid of a smaller size. (http://article.gman... (diff)
downloadinkscape-f5023f704fb05b25d5fa6c78e0faefd93ef044ae.tar.gz
inkscape-f5023f704fb05b25d5fa6c78e0faefd93ef044ae.zip
Fix remaining g_type_init deprecation issues
(bzr r12421)
-rw-r--r--configure.ac15
-rw-r--r--src/main.cpp3
-rw-r--r--src/test-helpers.h3
3 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b2b794617..dca7e4cc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -796,10 +796,25 @@ if test "x$enable_strict_build" != "xno"; then
pango_uses_deprecated_glib_symbols=yes,
pango_uses_deprecated_glib_symbols=no)
+ dnl Gtkmm 2.24.3 uses a deprecated Glib symbol:
+ dnl https://bugzilla.gnome.org/show_bug.cgi?id=697835
+ dnl
+ dnl TODO: Get rid of this check once we are sure that all targeted
+ dnl platforms have got rid of this Gtkmm version. Apply the
+ dnl G_DISABLE_DEPRECATED flag to all builds.
+ gtkmm_uses_deprecated_glib_symbols=no
+
+ PKG_CHECK_MODULES(GTKMM_USES_DEPRECATED_GLIB_SYMBOLS,
+ gtkmm-2.4 = 2.24.3,
+ gtkmm_uses_deprecated_glib_symbols=yes,
+ gtkmm_uses_deprecated_glib_symbols=no)
+
# Don't disable deprecated Glib symbols if it will break stuff in an
# external library header that we use
if test "x$pango_uses_deprecated_glib_symbols" = "xyes"; then
AC_MSG_WARN([The available version of Pango uses deprecated Glib symbols. Deprecated Glib symbol usage will be allowed])
+ elif test "x$gtkmm_uses_deprecated_glib_symbols" = "xyes" && test "x$with_gtkmm_3_0" = "xno"; then
+ AC_MSG_WARN([The available version of Gtkmm uses deprecated Glib symbols. Deprecated Glib symbol usage will be allowed])
else
CPPFLAGS="-DG_DISABLE_DEPRECATED $CPPFLAGS"
fi
diff --git a/src/main.cpp b/src/main.cpp
index 4e2f2fd2b..d425b88bb 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1283,12 +1283,15 @@ int sp_main_console(int argc, char const **argv)
{
/* We are started in text mode */
+#if !GLIB_CHECK_VERSION(2,36,0)
/* Do this g_type_init(), so that we can use Xft/Freetype2 (Pango)
* in a non-Gtk environment. Used in libnrtype's
* FontInstance.cpp and FontFactory.cpp.
* http://mail.gnome.org/archives/gtk-list/2003-December/msg00063.html
*/
g_type_init();
+#endif
+
char **argv2 = const_cast<char **>(argv);
gtk_init_check( &argc, &argv2 );
//setlocale(LC_ALL, "");
diff --git a/src/test-helpers.h b/src/test-helpers.h
index bda48599e..001356e65 100644
--- a/src/test-helpers.h
+++ b/src/test-helpers.h
@@ -23,7 +23,10 @@ T* createSuiteAndDocument( void (*fun)(T*&) )
{
T* suite = 0;
+#if !GLIB_CHECK_VERSION(2,36,0)
g_type_init();
+#endif
+
Inkscape::GC::init();
if ( !inkscape_get_instance() )
{