[kazehakase-svn] [3825] * src/kz-embed.[ch]: Remove get_progress interface .

Back to archive index

svnno****@sourc***** svnno****@sourc*****
Fri Sep 4 09:47:04 JST 2009


Revision: 3825
          http://sourceforge.jp/projects/kazehakase/svn/view?view=rev&revision=3825
Author:   ikezoe
Date:     2009-09-04 09:47:04 +0900 (Fri, 04 Sep 2009)

Log Message:
-----------
	* src/kz-embed.[ch]: Remove get_progress interface.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/dbus/kz-dbus-embed-agent.c
    kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp
    kazehakase/trunk/module/embed/ie/kz-ie.c
    kazehakase/trunk/module/embed/moz-web-view/kz-moz-web-view.c
    kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c
    kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c
    kazehakase/trunk/src/kz-embed.c
    kazehakase/trunk/src/kz-embed.h

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/ChangeLog	2009-09-04 00:47:04 UTC (rev 3825)
@@ -13,6 +13,7 @@
 	KzEmbed -> KzWeb.
 	* src/kz-embed.[ch]: Remove get_title interface.
 	* src/kz-embed.[ch]: Remove get_location interface.
+	* src/kz-embed.[ch]: Remove get_progress interface.
 
 2009-09-02  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/dbus/kz-dbus-embed-agent.c
===================================================================
--- kazehakase/trunk/dbus/kz-dbus-embed-agent.c	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/dbus/kz-dbus-embed-agent.c	2009-09-04 00:47:04 UTC (rev 3825)
@@ -395,7 +395,6 @@
     iface->view_current_page_source_in_new 
                                   = NULL;
     iface->is_loading             = NULL;
-    iface->get_progress           = NULL;
     iface->can_cut_selection      = NULL; 
     iface->can_copy_selection     = NULL; 
     iface->can_paste              = NULL; 

Modified: kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp
===================================================================
--- kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/module/embed/gecko/kz-gecko-embed.cpp	2009-09-04 00:47:04 UTC (rev 3825)
@@ -390,7 +390,6 @@
 	iface->view_current_page_source_in_new
 				      = view_current_page_source_in_new;
 	iface->is_loading             = is_loading;
-	iface->get_progress           = get_progress;
 	iface->can_cut_selection      = can_cut_selection;
 	iface->can_copy_selection     = can_copy_selection;
 	iface->can_paste              = can_paste;

Modified: kazehakase/trunk/module/embed/ie/kz-ie.c
===================================================================
--- kazehakase/trunk/module/embed/ie/kz-ie.c	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/module/embed/ie/kz-ie.c	2009-09-04 00:47:04 UTC (rev 3825)
@@ -38,7 +38,6 @@
 {
 	glong current_progress;
 	glong max_progress;
-	gchar *location;
 };
 #define KZ_IE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), KZ_TYPE_IE, KzIEPrivate))
 
@@ -49,7 +48,6 @@
 static void kz_ie_class_init   (KzIEClass *klass);
 static void kz_ie_iface_init   (KzEmbedIFace *iface);
 static void kz_ie_init         (KzIE *ie);
-static void kz_ie_dispose      (GObject      *object);
 
 /* GtkIEEmbed signals */
 static void	    kz_ie_embed_location	 (GtkIEEmbed   *ieembed,
@@ -75,7 +73,6 @@
 /* embed iface */
 static void         kz_ie_load_uri         (KzEmbed      *kzembed,
 					    const gchar  *uri);
-static const gchar *kz_ie_get_location     (KzEmbed      *kzembed);
 static gdouble	    kz_ie_get_progress	   (KzEmbed	 *kzembed);
 static void         kz_ie_reload           (KzEmbed      *kzembed,
 					    KzEmbedReloadFlag flags);
@@ -197,8 +194,6 @@
 	widget_class = GTK_WIDGET_CLASS(klass);
 	ie_class = GTK_IE_EMBED_CLASS(klass);
 
-	object_class->dispose = kz_ie_dispose;
-
 	ie_class->location          = kz_ie_embed_location;
 	ie_class->title             = kz_ie_embed_title;
 	ie_class->net_start         = kz_ie_embed_net_start;
@@ -224,8 +219,6 @@
 	iface->view_current_page_source_in_new
 				      = NULL;
 	iface->is_loading             = kz_ie_is_loading;
-	iface->get_location           = kz_ie_get_location;
-	iface->get_progress           = kz_ie_get_progress;
 	iface->can_cut_selection      = kz_ie_can_cut_selection;
 	iface->can_copy_selection     = kz_ie_can_copy_selection;
 	iface->can_paste              = kz_ie_can_paste;
@@ -298,26 +291,12 @@
 {
 	KzIEPrivate *priv = KZ_IE_GET_PRIVATE (ie);
 
-	priv->location = NULL;
-
 	priv->current_progress = 0;
 	priv->max_progress =0;
 
 	gtk_ie_embed_set_use_context_menu (GTK_IE_EMBED (ie), FALSE);
 }
 
-static void
-kz_ie_dispose (GObject *object)
-{
-	KzIEPrivate *priv = KZ_IE_GET_PRIVATE(object);
-
-	g_free(priv->location);
-	priv->location = NULL;
-
-	if (G_OBJECT_CLASS(kz_ie_parent_class)->dispose)
-		G_OBJECT_CLASS(kz_ie_parent_class)->dispose(object);
-}
-
 GtkWidget *
 kz_ie_new (void)
 {
@@ -329,10 +308,6 @@
 static void
 kz_ie_embed_location (GtkIEEmbed *ieembed, const gchar  *location)
 {
-	KzIEPrivate *priv = KZ_IE_GET_PRIVATE(ieembed);
-
-	g_free(priv->location);
-	priv->location = g_strdup(location);
 	g_signal_emit_by_name(ieembed, "kz-location", location);
 }
 
@@ -481,36 +456,6 @@
 	gtk_ie_embed_load_url(GTK_IE_EMBED(kzembed), url);
 }
 
-static const gchar *
-kz_ie_get_location (KzEmbed *kzembed)
-{
-	g_return_val_if_fail(KZ_IS_IE(kzembed), NULL);
-
-	return KZ_IE_GET_PRIVATE(kzembed)->location;
-}
-
-static gdouble
-kz_ie_get_progress (KzEmbed *kzembed)
-{
-	gdouble progress;
-	KzIEPrivate *priv;
-
-	g_return_val_if_fail(KZ_IS_IE(kzembed), 0.0);
-
-	priv = KZ_IE_GET_PRIVATE(kzembed);
-
-	if (priv->max_progress <= 0 ||
-	    priv->current_progress <= 0)
-	{
-		return 0.0;
-	}
-
-	progress = (gdouble) priv->current_progress
-		/ (gdouble) priv->max_progress;
-
-	return (progress < 1.0) ? progress : 1.0;
-}
-
 static void
 kz_ie_reload (KzEmbed *kzembed, KzEmbedReloadFlag flags)
 {
@@ -812,9 +757,10 @@
 							          &bookmark_node, 
 								  history);
 
-	uri = KZ_IE_GET_PRIVATE(kzembed)->location;
+	uri = gtk_ie_embed_get_location(GTK_IE_EMBED(kzembed));
 	title = gtk_ie_embed_get_title(GTK_IE_EMBED(kzembed));
 	merge_to_bookmark_list(uri, title, &bookmark_node, history);
+	g_free(uri);
 	g_free(title);
 
 	merge_ie_history_list_to_bookmark_list(forward_history,

Modified: kazehakase/trunk/module/embed/moz-web-view/kz-moz-web-view.c
===================================================================
--- kazehakase/trunk/module/embed/moz-web-view/kz-moz-web-view.c	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/module/embed/moz-web-view/kz-moz-web-view.c	2009-09-04 00:47:04 UTC (rev 3825)
@@ -30,8 +30,6 @@
 typedef struct _KzMozWebViewPrivate	KzMozWebViewPrivate;
 struct _KzMozWebViewPrivate
 {
-	gint progress;
-	gchar *location;
 	gchar *link_message;
 	gboolean is_loading;
 };
@@ -78,8 +76,6 @@
 static void	    copy_selection         (KzEmbed      *kzembed);
 static void	    paste                  (KzEmbed      *kzembed);
 static void	    select_all             (KzEmbed      *kzembed);
-static gdouble	    get_progress	   (KzEmbed      *kzembed);
-static const gchar *get_location           (KzEmbed      *kzembed);
 static gboolean     selection_is_collapsed (KzEmbed      *kzembed);
 static gboolean     is_loading             (KzEmbed      *kzembed);
 static void         zoom_set               (KzEmbed      *kzembed, 
@@ -163,8 +159,6 @@
 	iface->view_current_page_source_in_new
 				      = NULL;
 	iface->is_loading             = is_loading;
-	iface->get_location           = get_location;
-	iface->get_progress           = get_progress;
 	iface->can_cut_selection      = can_cut_selection;
 	iface->can_copy_selection     = can_copy_selection;
 	iface->can_paste              = can_paste;
@@ -240,11 +234,8 @@
 {
 	KzMozWebViewPrivate *priv = KZ_MOZ_WEB_VIEW_GET_PRIVATE(webkit);
 
-	priv->location = NULL;
 	priv->link_message = NULL;
 
-	priv->progress = 0;
-
 	priv->is_loading = FALSE;
 }
 
@@ -252,9 +243,7 @@
 kz_moz_web_view_dispose (GObject *object)
 {
 	KzMozWebViewPrivate *priv = KZ_MOZ_WEB_VIEW_GET_PRIVATE(object);
-	g_free(priv->location);
 	g_free(priv->link_message);
-	priv->location = NULL;
 	priv->link_message = NULL;
 
 	if (G_OBJECT_CLASS(kz_moz_web_view_parent_class)->dispose)
@@ -387,20 +376,6 @@
 	g_return_if_fail(KZ_IS_MOZ_WEB_VIEW(kzembed));
 }
 
-static const gchar *
-get_location (KzEmbed *kzembed)
-{
-	g_return_val_if_fail(KZ_IS_MOZ_WEB_VIEW(kzembed), NULL);
-
-	return moz_web_view_get_location(MOZ_WEB_VIEW(kzembed));
-}
-
-static gdouble
-get_progress (KzEmbed *kzembed)
-{
-	return 0.0f;
-}
-
 static gboolean
 selection_is_collapsed (KzEmbed *kzembed)
 {

Modified: kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c
===================================================================
--- kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/module/embed/per-process/kz-dbus-embed-delegate.c	2009-09-04 00:47:04 UTC (rev 3825)
@@ -58,7 +58,6 @@
     guint watch_id;
     gchar *location;
     gchar *link_message;
-    gdouble progress;
     gboolean ready;
     gchar **titles;
     gchar **uris;
@@ -104,7 +103,6 @@
                                       gboolean      backward);
 static void         zoom             (KzEmbed      *embed,
                                       gdouble       zoom);
-static gdouble      get_progress     (KzEmbed      *embed);
 static void         set_history      (KzEmbed      *embed,
                                       const GList  *history,
                                       guint         current_position);
@@ -288,9 +286,6 @@
 static void
 cb_progress (DBusGProxy *proxy, gdouble ratio, KzDBusEmbedDelegate *object)
 {
-    KzDBusEmbedDelegatePrivate *priv = KZ_DBUS_EMBED_DELEGATE_GET_PRIVATE(object);
-    priv->progress = ratio;
-
     g_signal_emit_by_name(object, "kz-progress", ratio);
 }
 
@@ -391,7 +386,6 @@
     iface->view_current_page_source_in_new 
                                   = NULL;
     iface->is_loading             = NULL;
-    iface->get_progress           = get_progress;
     iface->can_cut_selection      = can_cut_selection; 
     iface->can_copy_selection     = can_copy_selection; 
     iface->can_paste              = can_paste; 
@@ -601,7 +595,6 @@
     priv->proxy = NULL;
     priv->process_id = -1;
     priv->location = NULL;
-    priv->progress = 0.0;
     priv->link_message = NULL;
     priv->ready = FALSE;
 }
@@ -786,12 +779,6 @@
     return kz_type_dbus_embed_delegate;
 }
 
-static gdouble
-get_progress (KzEmbed *embed)
-{
-	return KZ_DBUS_EMBED_DELEGATE_GET_PRIVATE(embed)->progress;
-}
-
 static void
 get_history (KzEmbed *embed, GList **history, guint *current_position)
 {

Modified: kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c
===================================================================
--- kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/module/embed/webkit-gtk/kz-webkit-gtk.c	2009-09-04 00:47:04 UTC (rev 3825)
@@ -31,7 +31,6 @@
 struct _KzWebKitGtkPrivate
 {
 	WebKitWebView *web_view;
-	gint progress;
 	gchar *link_message;
 	gboolean is_loading;
 };
@@ -73,7 +72,6 @@
 static void	    copy_selection         (KzEmbed      *kzembed);
 static void	    paste                  (KzEmbed      *kzembed);
 static void	    select_all             (KzEmbed      *kzembed);
-static gdouble	    get_progress	   (KzEmbed      *kzembed);
 static gboolean     selection_is_collapsed (KzEmbed      *kzembed);
 static gboolean     is_loading             (KzEmbed      *kzembed);
 static void         zoom                   (KzEmbed      *kzembed, 
@@ -210,7 +208,6 @@
 	iface->view_current_page_source_in_new
 				      = NULL;
 	iface->is_loading             = is_loading;
-	iface->get_progress           = get_progress;
 	iface->can_cut_selection      = can_cut_selection;
 	iface->can_copy_selection     = can_copy_selection;
 	iface->can_paste              = can_paste;
@@ -320,8 +317,6 @@
 
 	priv->link_message = NULL;
 
-	priv->progress = 0;
-
 	priv->is_loading = FALSE;
 }
 
@@ -459,12 +454,6 @@
 	webkit_web_view_select_all(KZ_WEBKIT_GTK_GET_PRIVATE(kzembed)->web_view);
 }
 
-static gdouble
-get_progress (KzEmbed *kzembed)
-{
-	return (gdouble) KZ_WEBKIT_GTK_GET_PRIVATE(kzembed)->progress / 100;
-}
-
 static gboolean
 selection_is_collapsed (KzEmbed *kzembed)
 {
@@ -755,9 +744,6 @@
 		     gint progress,
 		     gpointer data)
 {
-	KzWebKitGtkPrivate *priv = KZ_WEBKIT_GTK_GET_PRIVATE(data);
-	priv->progress = progress;
-
 	g_signal_emit_by_name(data, "kz-progress", progress / 100);
 }
 

Modified: kazehakase/trunk/src/kz-embed.c
===================================================================
--- kazehakase/trunk/src/kz-embed.c	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/src/kz-embed.c	2009-09-04 00:47:04 UTC (rev 3825)
@@ -433,17 +433,6 @@
 }
 
 
-gdouble
-kz_embed_get_progress (KzEmbed *kzembed)
-{
-	g_return_val_if_fail(KZ_IS_EMBED(kzembed), 0.0);
-	if (!KZ_EMBED_GET_IFACE(kzembed)->get_progress)
-		return 0.0;
-
-	return KZ_EMBED_GET_IFACE(kzembed)->get_progress(kzembed);
-}
-
-
 gboolean
 kz_embed_can_cut_selection (KzEmbed *kzembed)
 {

Modified: kazehakase/trunk/src/kz-embed.h
===================================================================
--- kazehakase/trunk/src/kz-embed.h	2009-09-04 00:39:03 UTC (rev 3824)
+++ kazehakase/trunk/src/kz-embed.h	2009-09-04 00:47:04 UTC (rev 3825)
@@ -88,8 +88,6 @@
 
 	gboolean	(*is_loading)		(KzEmbed       *kzembed);
 
-	gdouble		(*get_progress)		(KzEmbed       *kzembed);
-
 	gboolean	(*can_cut_selection)	(KzEmbed       *kzembed);
 	gboolean	(*can_copy_selection)	(KzEmbed       *kzembed);
 	gboolean	(*can_paste)		(KzEmbed       *kzembed);
@@ -289,8 +287,6 @@
 
 gboolean	kz_embed_is_loading		(KzEmbed       *kzembed);
 
-gdouble		kz_embed_get_progress		(KzEmbed       *kzembed);
-
 gboolean	kz_embed_can_cut_selection	(KzEmbed       *kzembed);
 gboolean	kz_embed_can_copy_selection	(KzEmbed       *kzembed);
 gboolean	kz_embed_can_paste		(KzEmbed       *kzembed);




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