[kazehakase-svn] [3162] * configure.ac: detected whether WebiClass has mouse_down.

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Wed Apr 11 15:35:12 JST 2007


Revision: 3162
          http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=kazehakase&view=rev&rev=3162
Author:   kous
Date:     2007-04-11 15:35:11 +0900 (Wed, 11 Apr 2007)

Log Message:
-----------
* configure.ac: detected whether WebiClass has mouse_down.
* module/embed/gtk-webcore/kz-gtk-webcore.cpp: used
  HAVE_GTK_WEBCORE_MOUSE_DOWN instead of GTK_WEBCORE_HAS_MOUSE_DOWN.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/configure.ac
    kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2007-04-11 00:05:49 UTC (rev 3161)
+++ kazehakase/trunk/ChangeLog	2007-04-11 06:35:11 UTC (rev 3162)
@@ -1,3 +1,10 @@
+2007-04-11  Kouhei Sutou  <kou****@cozmi*****>
+
+	* configure.ac: detected whether WebiClass has mouse_down.
+
+	* module/embed/gtk-webcore/kz-gtk-webcore.cpp: used
+	HAVE_GTK_WEBCORE_MOUSE_DOWN instead of GTK_WEBCORE_HAS_MOUSE_DOWN.
+
 2007-04-11  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 
 	* module/embed/gtk-webcore/kz-gtk-webcore.cpp: Follow GTK+ WebCore API

Modified: kazehakase/trunk/configure.ac
===================================================================
--- kazehakase/trunk/configure.ac	2007-04-11 00:05:49 UTC (rev 3161)
+++ kazehakase/trunk/configure.ac	2007-04-11 06:35:11 UTC (rev 3162)
@@ -77,8 +77,26 @@
 AC_SUBST([NRCIT_LIBS])
 NRCIT_VERSION="`$PKG_CONFIG --modversion osb-nrcit`"
 AC_SUBST([NRCIT_VERSION])
-AM_CONDITIONAL([WITH_GTK_WEBCORE], [test x"$gtk_webcore_exists" = "xyes"])
 
+if test x"$gtk_webcore_exists" = "xyes"; then
+  gtk_webcore_available=yes
+else
+  gtk_webcore_available=no
+fi
+
+if test $gtk_webcore_available = "yes"; then
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS $NRCIT_CFLAGS"
+  AC_CHECK_MEMBER(WebiClass.mouse_down, , , [#include <webi.h>])
+  if test x"$ac_cv_member_WebiClass_mouse_down" = "xyes"; then
+    AC_DEFINE([HAVE_GTK_WEBCORE_MOUSE_DOWN], 1,
+              [Define to 1 if `WebiClass' has a `mouse_down' member])
+  fi
+  CFLAGS="$SAVE_CFLAGS"
+fi
+
+AM_CONDITIONAL([WITH_GTK_WEBCORE], [test $gtk_webcore_available = "yes"])
+
 dnl **************************************************************
 dnl Check for IE
 dnl **************************************************************

Modified: kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp
===================================================================
--- kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp	2007-04-11 00:05:49 UTC (rev 3161)
+++ kazehakase/trunk/module/embed/gtk-webcore/kz-gtk-webcore.cpp	2007-04-11 06:35:11 UTC (rev 3162)
@@ -20,6 +20,10 @@
  *  $Id$
  */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif /* HAVE_CONFIG_H */
+
 #include <glib/gi18n.h>
 #include <math.h>
 #include <osb.h>
@@ -33,8 +37,6 @@
 #include "gtk-utils.h"
 #include "utils.h"
 
-#define GTK_WEBCORE_HAS_MOUSE_DOWN 0
-
 typedef struct _KzGtkWebcorePrivate	KzGtkWebcorePrivate;
 struct _KzGtkWebcorePrivate
 {
@@ -76,7 +78,7 @@
 						     const gchar *link_label,
 						     const gchar *link_url,
 						     const gchar *link_target);
-#if GTK_WEBCORE_HAS_MOUSE_DOWN
+#if HAVE_GTK_WEBCORE_MOUSE_DOWN
 static gboolean     kz_gtk_webcore_mouse_down       (Webi        *webi,
 						     const gchar *link_url,
 						     guint        button);
@@ -243,18 +245,18 @@
 	gtk_webcore_class->load_stop  = kz_gtk_webcore_load_stop;
 	gtk_webcore_class->location   = kz_gtk_webcore_location;
 	gtk_webcore_class->title      = kz_gtk_webcore_title;
-#if 0	
+#if 0
 	gtk_webcore_class->progress   = kz_gtk_webcore_progress;
-#endif	
+#endif
 	gtk_webcore_class->req_js_prompt   = kz_gtk_webcore_req_js_prompt;
 	gtk_webcore_class->req_auth_prompt = kz_gtk_webcore_req_auth_prompt;
 	gtk_webcore_class->req_new_window  = kz_gtk_webcore_req_new_window;
 	gtk_webcore_class->close_window    = kz_gtk_webcore_close_window;
 	gtk_webcore_class->mouse_over      = kz_gtk_webcore_mouse_over;
-#if GTK_WEBCORE_HAS_MOUSE_DOWN
+#if HAVE_GTK_WEBCORE_MOUSE_DOWN
 	gtk_webcore_class->mouse_down      = kz_gtk_webcore_mouse_down;
 	gtk_webcore_class->mouse_up        = kz_gtk_webcore_mouse_up;
-#endif	
+#endif
 	gtk_webcore_class->set_cookie      = kz_gtk_webcore_set_cookie;
 
 	g_type_class_add_private (object_class, sizeof(KzGtkWebcorePrivate));
@@ -873,7 +875,7 @@
 	kz_embed_event_free((KzEmbedEvent *) kzevent);
 }
 
-#if GTK_WEBCORE_HAS_MOUSE_DOWN
+#if HAVE_GTK_WEBCORE_MOUSE_DOWN
 gboolean
 kz_gtk_webcore_mouse_down (Webi *webi,
 		     const gchar *link_url,




More information about the Kazehakase-cvs mailing list
Back to archive index