[Kazehakase-cvs] CVS update: kazehakase/src/mozilla

Back to archive index

Hiroyuki Ikezoe ikezo****@users*****
Sat Dec 2 21:47:09 JST 2006


Index: kazehakase/src/mozilla/kz-mozembed.cpp
diff -u kazehakase/src/mozilla/kz-mozembed.cpp:1.207 kazehakase/src/mozilla/kz-mozembed.cpp:1.208
--- kazehakase/src/mozilla/kz-mozembed.cpp:1.207	Tue Oct 17 23:28:48 2006
+++ kazehakase/src/mozilla/kz-mozembed.cpp	Sat Dec  2 21:47:08 2006
@@ -37,7 +37,6 @@
 #include "kz-mozprogresslistener.h"
 #include "kz-mozthumbnailcreator.h"
 #include "kz-mozutils.h"
-#include "gobject-utils.h"
 #include "mozilla.h"
 #include "mozilla-prefs.h"
 #include "bookmarks/kz-bookmark.h"
@@ -118,8 +117,6 @@
 };
 #define KZ_MOZ_EMBED_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), KZ_TYPE_MOZ_EMBED, KzMozEmbedPrivate))
 
-static void kz_moz_embed_class_init    (KzMozEmbedClass *klass);
-static void kz_moz_embed_init          (KzMozEmbed  *kzembed);
 static void kz_moz_embed_destroy       (GtkObject   *object);
 static void kz_moz_embed_realize       (GtkWidget   *widget);
 static void kz_moz_embed_unrealize     (GtkWidget   *widget);
@@ -324,8 +321,6 @@
     							 gboolean      allow);
 static void          kz_moz_embed_show_page_certificate (KzEmbed       *kzembed);
 
-static GtkMozEmbedClass *parent_class = NULL;
-
 static void
 kz_moz_embed_iface_init (KzEmbedIFace *iface)
 {
@@ -431,12 +426,10 @@
 	iface->status_change       = NULL;
 }
 
-KZ_OBJECT_GET_TYPE_IFACE(kz_moz_embed, "KzMozEmbed", KzMozEmbed,
-			 kz_moz_embed_class_init, kz_moz_embed_init,
-			 GTK_TYPE_MOZ_EMBED,
-			 kz_moz_embed_iface_init, KZ_TYPE_EMBED)
-
-
+G_DEFINE_TYPE_WITH_CODE(KzMozEmbed, kz_moz_embed, GTK_TYPE_MOZ_EMBED,
+                        G_IMPLEMENT_INTERFACE (KZ_TYPE_EMBED,
+					       kz_moz_embed_iface_init))
+			
 static void
 kz_moz_embed_class_init (KzMozEmbedClass *klass)
 {
@@ -445,8 +438,6 @@
 	GtkWidgetClass *widget_class;
 	GtkMozEmbedClass *moz_embed_class;
 
-	parent_class    = (GtkMozEmbedClass *) g_type_class_peek_parent (klass);
-
 	gobject_class   = (GObjectClass *) klass;
 	object_class    = (GtkObjectClass *) klass;
 	widget_class    = (GtkWidgetClass *) klass;
@@ -581,8 +572,8 @@
 		g_free(priv->first_url);
 	priv->first_url = NULL;
 
-	if (GTK_OBJECT_CLASS(parent_class)->destroy)
-		GTK_OBJECT_CLASS(parent_class)->destroy(object);
+	if (GTK_OBJECT_CLASS(kz_moz_embed_parent_class)->destroy)
+		GTK_OBJECT_CLASS(kz_moz_embed_parent_class)->destroy(object);
 }
 
 
@@ -590,8 +581,8 @@
 kz_moz_embed_realize (GtkWidget *widget)
 {
 	gboolean java = TRUE;
-	if (GTK_WIDGET_CLASS(parent_class)->realize)
-		GTK_WIDGET_CLASS(parent_class)->realize(widget);
+	if (GTK_WIDGET_CLASS(kz_moz_embed_parent_class)->realize)
+		GTK_WIDGET_CLASS(kz_moz_embed_parent_class)->realize(widget);
 
 	KzMozEmbed *kzembed = KZ_MOZ_EMBED(widget);
 	KzMozEmbedPrivate *priv = KZ_MOZ_EMBED_GET_PRIVATE (kzembed);
@@ -630,8 +621,8 @@
 	
 	kz_moz_embed_navigation_link_free(kzembed);
 	
-	if (GTK_WIDGET_CLASS(parent_class)->unrealize)
-		GTK_WIDGET_CLASS(parent_class)->unrealize(widget);
+	if (GTK_WIDGET_CLASS(kz_moz_embed_parent_class)->unrealize)
+		GTK_WIDGET_CLASS(kz_moz_embed_parent_class)->unrealize(widget);
 }
 
 static void
@@ -690,8 +681,8 @@
 	if (!GTK_WIDGET_MAPPED(widget))
 		return;
 	
-	if (GTK_WIDGET_CLASS(parent_class)->size_allocate)
-		GTK_WIDGET_CLASS(parent_class)->size_allocate(widget, allocation);
+	if (GTK_WIDGET_CLASS(kz_moz_embed_parent_class)->size_allocate)
+		GTK_WIDGET_CLASS(kz_moz_embed_parent_class)->size_allocate(widget, allocation);
 
 	priv->size_inited = TRUE;
 }
@@ -890,8 +881,8 @@
 
 	g_signal_emit_by_name(embed, "kz-link-message");
 
-	if (parent_class->link_message)
-		parent_class->link_message(embed);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->link_message)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->link_message(embed);
 }
 
 static void
@@ -901,8 +892,8 @@
 
 	g_signal_emit_by_name(embed, "kz-js-status");
 
-	if (parent_class->js_status)
-		parent_class->js_status(embed);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->js_status)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->js_status(embed);
 }
 
 static void
@@ -918,8 +909,8 @@
 
 	g_signal_emit_by_name(embed, "kz-title");
 
-	if (parent_class->title)
-		parent_class->title(embed);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->title)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->title(embed);
 }
 
 static void
@@ -949,8 +940,8 @@
 
 	g_signal_emit_by_name(embed, "kz-location");
 
-	if (parent_class->location)
-		parent_class->location(embed);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->location)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->location(embed);
 }
 
 
@@ -972,8 +963,8 @@
 
 	g_signal_emit_by_name(embed, "kz-net-start");
 
-	if (parent_class->net_start)
-		parent_class->net_start(embed);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->net_start)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->net_start(embed);
 }
 
 static void
@@ -1080,8 +1071,8 @@
 
 	kzembed->is_loading = FALSE;
 
-	if (parent_class->net_stop)
-		parent_class->net_stop(embed);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->net_stop)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->net_stop(embed);
 
 	net_stop_proccess(kzembed);
 
@@ -1122,8 +1113,8 @@
 
 	g_signal_emit_by_name(embed, "kz-progress");
 
-	if (parent_class->net_state_all)
-		parent_class->net_state_all(embed, aURI, state, status);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->net_state_all)
+		((GtkMozEmbedClass*)kz_moz_embed_parent_class)->net_state_all(embed, aURI, state, status);
 }
 
 static void 
@@ -1163,8 +1154,8 @@
 
 	g_signal_emit_by_name(embed, "kz-open-uri", uri, &ret);
 
-	if (parent_class->open_uri)
-		ret = parent_class->open_uri(embed, uri);
+	if (((GtkMozEmbedClass*)kz_moz_embed_parent_class)->open_uri)
+		ret = ((GtkMozEmbedClass*)kz_moz_embed_parent_class)->open_uri(embed, uri);
 
 #if 0
 	if (!strncmp(uri, "mailto:", 7))
@@ -1324,8 +1315,8 @@
 			      gpointer request,
 			      guint state)
 {
-	if (parent_class->security_change)
-		parent_class->security_change(embed, request, state);
+	if (kz_moz_embed_parent_class->security_change)
+		kz_moz_embed_parent_class->security_change(embed, request, state);
 }
 #endif
 


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