svnno****@sourc*****
svnno****@sourc*****
Mon Dec 29 10:51:41 JST 2008
Revision: 3521 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3521 Author: ikezoe Date: 2008-12-29 10:51:41 +0900 (Mon, 29 Dec 2008) Log Message: ----------- 2008-12-29 Hiroyuki Ikezoe <poinc****@ikezo*****> * module/embed/webkit-gtk/kz-webkit-gtk.c: Fix critical warnings. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2008-12-29 01:47:48 UTC (rev 3520) +++ kazehakase/trunk/ChangeLog 2008-12-29 01:51:41 UTC (rev 3521) @@ -1,3 +1,7 @@ +2008-12-29 Hiroyuki Ikezoe <poinc****@ikezo*****> + + * module/embed/webkit-gtk/kz-webkit-gtk.c: Fix critical warnings. + 2008-12-26 Hiroyuki Ikezoe <poinc****@ikezo*****> * src/kz-embed.c (kz_embed_get_last_modified): Suppress g_warning. Modified: kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c =================================================================== --- kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c 2008-12-29 01:47:48 UTC (rev 3520) +++ kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c 2008-12-29 01:51:41 UTC (rev 3521) @@ -49,6 +49,10 @@ static void kz_webkit_gtk_init (KzWebKitGtk *webkit_gtk); static void kz_webkit_gtk_dispose (GObject *object); +static GObject *constructor (GType type, + guint n_props, + GObjectConstructParam *props); + static void load_url (KzEmbed *kzembed, const gchar *url); static void stop_load (KzEmbed *kzembed); @@ -197,11 +201,11 @@ widget_class = GTK_WIDGET_CLASS(klass); object_class->dispose = kz_webkit_gtk_dispose; + object_class->constructor = constructor; g_type_class_add_private(object_class, sizeof(KzWebKitGtkPrivate)); } - static void kz_webkit_gtk_iface_init (KzEmbedIFace *iface) { @@ -298,19 +302,10 @@ } static void -kz_webkit_gtk_init (KzWebKitGtk *webkit) +setup_webkit_web_view (KzWebKitGtk *webkit) { KzWebKitGtkPrivate *priv = KZ_WEBKIT_GTK_GET_PRIVATE(webkit); - priv->location = NULL; - priv->title = NULL; - priv->link_message = NULL; - - priv->progress = 0; - - priv->lock = FALSE; - priv->is_loading = FALSE; - priv->web_view = WEBKIT_WEB_VIEW(webkit_web_view_new()); gtk_container_add(GTK_CONTAINER(webkit), GTK_WIDGET(priv->web_view)); @@ -337,7 +332,36 @@ set_default_preferences(webkit); } +static GObject* +constructor (GType type, + guint n_props, + GObjectConstructParam *props) +{ + GObject *object; + GObjectClass *klass = G_OBJECT_CLASS(kz_webkit_gtk_parent_class); + + object = klass->constructor(type, n_props, props); + setup_webkit_web_view(KZ_WEBKIT_GTK(object)); + + return object; +} + static void +kz_webkit_gtk_init (KzWebKitGtk *webkit) +{ + KzWebKitGtkPrivate *priv = KZ_WEBKIT_GTK_GET_PRIVATE(webkit); + + priv->location = NULL; + priv->title = NULL; + priv->link_message = NULL; + + priv->progress = 0; + + priv->lock = FALSE; + priv->is_loading = FALSE; +} + +static void kz_webkit_gtk_dispose (GObject *object) { KzWebKitGtkPrivate *priv = KZ_WEBKIT_GTK_GET_PRIVATE(object);