[devhelp] Port to GTK+ 3



commit 110cf4fc857571acf23e9147f66d4acd3c242118
Author: Frédéric Péters <fpeters 0d be>
Date:   Fri Jul 2 23:21:58 2010 +0200

    Port to GTK+ 3

 configure.ac                                       |   26 ++++++++++++-------
 .../{libdevhelp-1.0.pc.in => libdevhelp-3.0.pc.in} |    6 ++--
 src/Makefile.am                                    |   16 ++++++------
 src/dh-base.c                                      |    6 +++-
 4 files changed, 31 insertions(+), 23 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8b6c612..a22ad64 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,11 +1,11 @@
 AC_PREREQ(2.60)
-AC_INIT([Devhelp],[2.30.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=devhelp],[devhelp])
+AC_INIT([Devhelp],[2.90.2],[http://bugzilla.gnome.org/enter_bug.cgi?product=devhelp],[devhelp])
 
 # LT Version numbers, remember to change them just *before* a release.
 #   (Interfaces removed:    CURRENT++, AGE=0, REVISION=0)
 #   (Interfaces added:      CURRENT++, AGE++, REVISION=0)
 #   (No interfaces changed:                   REVISION++)
-LIBDEVHELP_CURRENT=1
+LIBDEVHELP_CURRENT=0
 LIBDEVHELP_AGE=0
 LIBDEVHELP_REVISION=0
 
@@ -41,11 +41,12 @@ dnl -----------------------------------------------------------
 IGE_PLATFORM_CHECK
 if test "x$IGE_PLATFORM" = xx11; then
    gconf_pkgconfig="gconf-2.0 >= 2.6.0"
-   libwnck_pkgconfig="libwnck-1.0 >= 2.10.0"
+   libwnck_pkgconfig=
    igemacintegration_pkgconfig=
-   REQUIRES_LIBWNCK=libwnck-1.0
+   REQUIRES_LIBWNCK=
    PLATFORM_CFLAGS=
    PLATFORM_LDFLAGS=
+   HAVE_WNCK=no
 else
    gconf_pkgconfig=
    libwnck_pkgconfig=
@@ -53,6 +54,7 @@ else
    REQUIRES_LIBWNCK=
    PLATFORM_CFLAGS=
    PLATFORM_LDFLAGS=
+   HAVE_WNCK=no
 fi
 AM_CONDITIONAL(GCONF_SCHEMAS_INSTALL, test "x$IGE_PLATFORM" = xx11)
 AC_SUBST(PLATFORM_CFLAGS)
@@ -61,19 +63,23 @@ AC_SUBST(REQUIRES_LIBWNCK)
 
 PKG_CHECK_MODULES(DEVHELP, [
   gthread-2.0 >= 2.10.0
-  gtk+-2.0 >= 2.10.0
-  webkit-1.0 >= 1.1.13
-  unique-1.0
+  gtk+-3.0
+  webkitgtk-3.0
+  unique-3.0
 ])
 
 PKG_CHECK_MODULES(LIBDEVHELP, [
-  gtk+-2.0 >= 2.10.0
+  gtk+-3.0
   $gconf_pkgconfig
   $libwnck_pkgconfig
   $igemacintegration_pkgconfig
-  webkit-1.0 >= 1.1.13
+  webkitgtk-3.0
 ])
 
+if test "x$HAVE_WNCK" = "xyes" ; then
+    AC_DEFINE(HAVE_WNCK, 1, [Defined if libwnck is available])
+fi
+
 AC_ARG_WITH(zlib, [  --with-zlib=DIR         use zlib in DIR], zlibdir=$with_zlib)
 have_zlib=no
 if test "x$zlibdir" != x; then
@@ -107,7 +113,7 @@ Makefile
 po/Makefile.in
 src/Makefile
 data/Makefile
-data/libdevhelp-1.0.pc
+data/libdevhelp-3.0.pc
 data/devhelp.desktop.in
 data/icons/Makefile
 data/ui/Makefile
diff --git a/data/libdevhelp-1.0.pc.in b/data/libdevhelp-3.0.pc.in
similarity index 64%
rename from data/libdevhelp-1.0.pc.in
rename to data/libdevhelp-3.0.pc.in
index 7ee339b..e63e80b 100644
--- a/data/libdevhelp-1.0.pc.in
+++ b/data/libdevhelp-3.0.pc.in
@@ -5,8 +5,8 @@ includedir= includedir@
 
 Name: devhelp
 Description: devhelp
-Requires: gtk+-2.0 webkit-1.0
+Requires: gtk+-3.0 webkit-3.0
 Requires.private: @REQUIRES_LIBWNCK@
 Version: @VERSION@
-Libs: -L${libdir} -ldevhelp-1
-Cflags: -I${includedir}/devhelp-1.0
+Libs: -L${libdir} -ldevhelp-3
+Cflags: -I${includedir}/devhelp-3.0
diff --git a/src/Makefile.am b/src/Makefile.am
index 89b6260..cdf69aa 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -44,9 +44,9 @@ devhelp_CFLAGS =					\
 
 devhelp_LDADD = 					\
         $(DEVHELP_LIBS)					\
-        libdevhelp-1.la
+        libdevhelp-3.la
 
-lib_LTLIBRARIES = libdevhelp-1.la
+lib_LTLIBRARIES = libdevhelp-3.la
 
 INST_H_FILES = 						\
 	dh-assistant.h					\
@@ -62,7 +62,7 @@ INST_H_FILES = 						\
 devhelpincludedir = $(includedir)/devhelp-1.0/devhelp
 devhelpinclude_HEADERS = $(INST_H_FILES)
 
-libdevhelp_1_la_SOURCES =				\
+libdevhelp_3_la_SOURCES =				\
 	dh-marshal.c					\
 	dh-marshal.h					\
 	dh-enum-types.c					\
@@ -89,18 +89,18 @@ libdevhelp_1_la_SOURCES =				\
 	ige-conf-private.h				\
 	$(conf_platform_sources)
 
-libdevhelp_1_la_CPPFLAGS =				\
+libdevhelp_3_la_CPPFLAGS =				\
 	$(AM_CPPFLAGS)					\
 	$(ZLIB_CPPFLAGS)
 
-libdevhelp_1_la_CFLAGS =				\
+libdevhelp_3_la_CFLAGS =				\
 	$(LIBDEVHELP_CFLAGS)
 
-libdevhelp_1_la_LIBADD =				\
+libdevhelp_3_la_LIBADD =				\
 	$(LIBDEVHELP_LIBS)				\
 	$(ZLIB_LIBS)
 
-libdevhelp_1_la_LDFLAGS =				\
+libdevhelp_3_la_LDFLAGS =				\
 	-no-undefined					\
 	-version-info ${LIBDEVHELP_CURRENT}:${LIBDEVHELP_REVISION}:${LIBDEVHELP_AGE} \
 	-export-symbols-regex ^dh_ \
@@ -114,7 +114,7 @@ dh-enum-types.c: dh-enum-types.c.template $(INST_H_FILES) $(GLIB_MKENUMS)
 
 if HAVE_PLATFORM_OSX
 conf_platform_sources = ige-conf-mac.c
-libdevhelp_1_la_CPPFLAGS += -xobjective-c
+libdevhelp_3_la_CPPFLAGS += -xobjective-c
 endif
 if HAVE_PLATFORM_X11
 conf_platform_sources = ige-conf-gconf.c
diff --git a/src/dh-base.c b/src/dh-base.c
index 9d10bd6..b89132c 100644
--- a/src/dh-base.c
+++ b/src/dh-base.c
@@ -27,9 +27,11 @@
 #ifdef GDK_WINDOWING_X11
 #include <unistd.h>
 #include <gdk/gdkx.h>
+#ifdef HAVE_WNCK
 #define WNCK_I_KNOW_THIS_IS_UNSTABLE
 #include <libwnck/libwnck.h>
 #endif
+#endif
 
 #include "dh-window.h"
 #include "dh-link.h"
@@ -122,7 +124,7 @@ dh_base_init (DhBase *base)
         priv->books = g_hash_table_new_full (g_str_hash, g_str_equal,
                                              g_free, g_free);
 
-#ifdef GDK_WINDOWING_X11
+#ifdef HAVE_WNCK
         {
                 gint n_screens, i;
 
@@ -525,7 +527,7 @@ dh_base_get_window_on_current_workspace (DhBase *base)
                 return NULL;
         }
 
-#ifdef GDK_WINDOWING_X11
+#ifdef HAVE_WNCK
         {
                 WnckWorkspace *workspace;
                 WnckScreen    *screen;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]