[kazehakase-svn] [3529] * src/*: Remove needless G_OBJECT cast.

Zurück zum Archiv-Index

svnno****@sourc***** svnno****@sourc*****
Tue Jan 20 14:53:23 JST 2009


Revision: 3529
          http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3529
Author:   ikezoe
Date:     2009-01-20 14:53:23 +0900 (Tue, 20 Jan 2009)

Log Message:
-----------
	* src/*: Remove needless G_OBJECT cast.

Modified Paths:
--------------
    kazehakase/trunk/ChangeLog
    kazehakase/trunk/src/actions/kz-actions-popup.c
    kazehakase/trunk/src/actions/kz-actions.c
    kazehakase/trunk/src/bookmarks/kz-actions-bookmark.c
    kazehakase/trunk/src/bookmarks/kz-bookmark-file.c
    kazehakase/trunk/src/bookmarks/kz-bookmarks-view.c
    kazehakase/trunk/src/bookmarks/kz-google.c
    kazehakase/trunk/src/bookmarks/kz-hinadi.c
    kazehakase/trunk/src/bookmarks/kz-lirs.c
    kazehakase/trunk/src/bookmarks/kz-root-bookmark.c
    kazehakase/trunk/src/bookmarks/kz-rss.c
    kazehakase/trunk/src/kz-app.c
    kazehakase/trunk/src/kz-downloader-group.c
    kazehakase/trunk/src/kz-favicon.c
    kazehakase/trunk/src/kz-icons.c
    kazehakase/trunk/src/kz-navi.c
    kazehakase/trunk/src/kz-popup-preview.c
    kazehakase/trunk/src/net/kz-http.c
    kazehakase/trunk/src/net/kz-xmlrpc.c

Modified: kazehakase/trunk/ChangeLog
===================================================================
--- kazehakase/trunk/ChangeLog	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/ChangeLog	2009-01-20 05:53:23 UTC (rev 3529)
@@ -6,6 +6,7 @@
 	src/actions/kz-smart-bookmark-folder-action.c, src/kz-download-box.c,
 	src/prefs_ui/prefs_session.c, src/bookmarks/kz-xbel.c: G_OBJECT cast
 	does not needed for g_signal_connect().
+	* src/*: Remove needless G_OBJECT cast.
 
 2009-01-06  Hiroyuki Ikezoe  <poinc****@ikezo*****>
 

Modified: kazehakase/trunk/src/actions/kz-actions-popup.c
===================================================================
--- kazehakase/trunk/src/actions/kz-actions-popup.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/actions/kz-actions-popup.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -678,7 +678,7 @@
 			gtk_widget_show(menuitem);
 		}
 	}
-	g_object_unref(G_OBJECT(xml));
+	g_object_unref(xml);
 
 	gtk_menu_item_set_submenu(GTK_MENU_ITEM(encoding_menu),
 				  encoding_submenu);

Modified: kazehakase/trunk/src/actions/kz-actions.c
===================================================================
--- kazehakase/trunk/src/actions/kz-actions.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/actions/kz-actions.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -1103,7 +1103,7 @@
 	if (desc)
 		g_free(desc);
 
-	g_object_unref(G_OBJECT(bookmark));
+	g_object_unref(bookmark);
 }
 
 static void

Modified: kazehakase/trunk/src/bookmarks/kz-actions-bookmark.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-actions-bookmark.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-actions-bookmark.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -129,7 +129,7 @@
 
 	bookmark = kz_bookmark_new_with_attrs(_("New bookmark"), NULL, NULL);
 	insert_bookmark_item(editor, bookmark);
-	g_object_unref(G_OBJECT(bookmark));
+	g_object_unref(bookmark);
 }
 
 
@@ -144,7 +144,7 @@
 	folder = kz_bookmark_pure_folder_new();
 	kz_bookmark_set_title(folder, _("New folder"));
 	insert_bookmark_item(editor, folder);
-	g_object_unref(G_OBJECT(folder));
+	g_object_unref(folder);
 }
 
 
@@ -159,7 +159,7 @@
 	file = KZ_BOOKMARK(kz_bookmark_file_new(NULL, NULL, NULL));
 	kz_bookmark_set_title(file, _("New Remote Bookmark"));
 	insert_bookmark_item(editor, file);
-	g_object_unref(G_OBJECT(file));
+	g_object_unref(file);
 }
 
 
@@ -177,7 +177,7 @@
 					  "(.*)", "%s",
 					  NULL, FALSE);
 	insert_bookmark_item(editor, smart);
-	g_object_unref(G_OBJECT(smart));
+	g_object_unref(smart);
 }
 
 typedef enum {
@@ -229,7 +229,7 @@
 									 other_browsers_bookmark_map[type].description,
 									 NULL));
 				insert_bookmark_item(editor, bookmark);
-				g_object_unref(G_OBJECT(bookmark));
+				g_object_unref(bookmark);
 
 				kz_bookmark_file_load_start(KZ_BOOKMARK_FILE(bookmark));
 			}
@@ -297,7 +297,7 @@
 
 	sep = kz_bookmark_separator_new();
 	insert_bookmark_item(editor, sep);
-	g_object_unref(G_OBJECT(sep));
+	g_object_unref(sep);
 }
 
 

Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-file.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-bookmark-file.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-bookmark-file.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -819,10 +819,8 @@
 static gboolean
 idle_load_complete (gpointer data)
 {
-	KzIO *io = data;
+	g_object_unref(data);
 
-	g_object_unref(G_OBJECT(io));
-
 	return FALSE;
 }
 

Modified: kazehakase/trunk/src/bookmarks/kz-bookmarks-view.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-bookmarks-view.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-bookmarks-view.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -505,12 +505,12 @@
 			? KZ_STOCK_REMOTE_BOOKMARK : KZ_STOCK_FOLDER;
 		image = gtk_image_new_from_stock(icon,
 						 GTK_ICON_SIZE_MENU);
-		g_object_ref(G_OBJECT(image));
-		g_object_ref_sink(G_OBJECT(image));
+		g_object_ref(image);
+		g_object_ref_sink(image);
 		favicon = gtk_widget_render_icon(image, icon,
 						 GTK_ICON_SIZE_MENU,
 						 NULL);
-		g_object_unref(G_OBJECT(image));
+		g_object_unref(image);
 	}
 	else if (KZ_IS_SMART_BOOKMARK(bookmark))
 	{
@@ -518,8 +518,8 @@
 
 		image = gtk_image_new_from_stock(KZ_STOCK_SMART_BOOKMARK,
 						 GTK_ICON_SIZE_MENU);
-		g_object_ref(G_OBJECT(image));
-		g_object_ref_sink(G_OBJECT(image));
+		g_object_ref(image);
+		g_object_ref_sink(image);
 		favicon = gtk_widget_render_icon(image, KZ_STOCK_SMART_BOOKMARK,
 						 GTK_ICON_SIZE_MENU,
 						 NULL);
@@ -541,8 +541,8 @@
 			GtkWidget *image;
 			image = gtk_image_new_from_stock(KZ_STOCK_BOOKMARK,
 							 GTK_ICON_SIZE_MENU);
-			g_object_ref(G_OBJECT(image));
-			g_object_ref_sink(G_OBJECT(image));
+			g_object_ref(image);
+			g_object_ref_sink(image);
 			favicon = gtk_widget_render_icon(image, KZ_STOCK_BOOKMARK,
 							 GTK_ICON_SIZE_MENU,
 							 NULL);

Modified: kazehakase/trunk/src/bookmarks/kz-google.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-google.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-google.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -104,7 +104,7 @@
 			kz_bookmark_set_description(item, desc);
 		}
 		kz_bookmark_append(KZ_BOOKMARK(bookmark), item);
-		g_object_unref(G_OBJECT(item));
+		g_object_unref(item);
 		
 		line_number++;
 	}

Modified: kazehakase/trunk/src/bookmarks/kz-hinadi.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-hinadi.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-hinadi.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -173,7 +173,7 @@
 		}
 		g_strfreev(elements);
 		kz_bookmark_append(KZ_BOOKMARK(bookmark), item);
-		g_object_unref(G_OBJECT(item));
+		g_object_unref(item);
 		line_number++;
 	}
 

Modified: kazehakase/trunk/src/bookmarks/kz-lirs.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-lirs.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-lirs.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -182,7 +182,7 @@
 		
 		g_strfreev(elements);
 		kz_bookmark_append(KZ_BOOKMARK(bookmark), item);
-		g_object_unref(G_OBJECT(item));
+		g_object_unref(item);
 
 		line_number++;
 	}

Modified: kazehakase/trunk/src/bookmarks/kz-root-bookmark.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-root-bookmark.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-root-bookmark.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -68,37 +68,37 @@
 
 	if (root->menu)
 	{
-		g_object_unref(G_OBJECT(root->menu));
+		g_object_unref(root->menu);
 		root->menu = NULL;
 	}
 	if (root->clip)
 	{
-		g_object_unref(G_OBJECT(root->clip));
+		g_object_unref(root->clip);
 		root->clip = NULL;
 	}
 	if (root->bookmark_bars)
 	{
-		g_object_unref(G_OBJECT(root->bookmark_bars));
+		g_object_unref(root->bookmark_bars);
 		root->bookmark_bars = NULL;
 	}
 	if (root->history)
 	{
-		g_object_unref(G_OBJECT(root->history));
+		g_object_unref(root->history);
 		root->history = NULL;
 	}
 	if (root->current_session)
 	{
-		g_object_unref(G_OBJECT(root->current_session));
+		g_object_unref(root->current_session);
 		root->current_session = NULL;
 	}
 	if (root->tab_groups)
 	{
-		g_object_unref(G_OBJECT(root->tab_groups));
+		g_object_unref(root->tab_groups);
 		root->tab_groups = NULL;
 	}
 	if (root->smarts)
 	{
-		g_object_unref(G_OBJECT(root->smarts));
+		g_object_unref(root->smarts);
 		root->smarts = NULL;
 	}
 
@@ -184,7 +184,7 @@
 	if (root->menu)
 	{
 		kz_bookmark_remove(KZ_BOOKMARK(root), root->menu);
-		g_object_unref(G_OBJECT(root->menu));
+		g_object_unref(root->menu);
 		root->menu = NULL;
 	}
 
@@ -212,7 +212,7 @@
 	if (root->clip)
 	{
 		kz_bookmark_remove(KZ_BOOKMARK(root), root->clip);
-		g_object_unref(G_OBJECT(root->clip));
+		g_object_unref(root->clip);
 		root->clip = NULL;
 	}
 
@@ -242,7 +242,7 @@
 	if (root->smarts)
 	{
 		kz_bookmark_remove(KZ_BOOKMARK(root), root->smarts);
-		g_object_unref(G_OBJECT(root->smarts));
+		g_object_unref(root->smarts);
 		root->smarts = NULL;
 	}
 
@@ -304,7 +304,7 @@
 
 	if (root->current_session)
 	{
-		g_object_unref(G_OBJECT(root->current_session));
+		g_object_unref(root->current_session);
 		root->current_session = NULL;
 	}
 

Modified: kazehakase/trunk/src/bookmarks/kz-rss.c
===================================================================
--- kazehakase/trunk/src/bookmarks/kz-rss.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/bookmarks/kz-rss.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -179,7 +179,7 @@
 	}
 
 	kz_bookmark_append(bookmark, child);
-	g_object_unref(G_OBJECT(child));
+	g_object_unref(child);
 }
 
 

Modified: kazehakase/trunk/src/kz-app.c
===================================================================
--- kazehakase/trunk/src/kz-app.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/kz-app.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -215,7 +215,7 @@
 	}
 	else
 	{
-		object = g_object_ref(G_OBJECT(the_kz_app));
+		object = g_object_ref(the_kz_app);
 	}
 	return object;
 }
@@ -578,7 +578,7 @@
 	g_free(accel_prefs_file);
 
 	kz_root_bookmark_save_all(priv->bookmarks);
-	g_object_unref(G_OBJECT(priv->bookmarks));
+	g_object_unref(priv->bookmarks);
 
 	kz_profile_close(priv->profile);
 	kz_profile_close(priv->proxy);

Modified: kazehakase/trunk/src/kz-downloader-group.c
===================================================================
--- kazehakase/trunk/src/kz-downloader-group.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/kz-downloader-group.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -338,7 +338,7 @@
 	g_return_if_fail(KZ_IS_DOWNLOADER_GROUP(dlgrp));
 	g_return_if_fail(KZ_IS_DOWNLOADER(dl));
 
-	g_object_ref(G_OBJECT(dl));
+	g_object_ref(dl);
 	list = g_slist_append(dlgrp->items, KZ_DOWNLOADER(dl));
 	g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL);
 
@@ -349,10 +349,8 @@
 static gboolean
 idle_remove_item(gpointer data)
 {
-	KzDownloader *dl = data;
+	g_object_unref(data);
 
-	g_object_unref(G_OBJECT(dl));
-
 	return FALSE;
 }
 

Modified: kazehakase/trunk/src/kz-favicon.c
===================================================================
--- kazehakase/trunk/src/kz-favicon.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/kz-favicon.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -227,10 +227,8 @@
 static gboolean
 idle_unref_dl(gpointer data)
 {
-	KzDownloader *dl = data;
+	g_object_unref(data);
 
-	g_object_unref(G_OBJECT(dl));
-
 	return FALSE;
 }
 

Modified: kazehakase/trunk/src/kz-icons.c
===================================================================
--- kazehakase/trunk/src/kz-icons.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/kz-icons.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -117,5 +117,5 @@
 		g_object_unref(kz_icon);
 	}
 
-	g_object_unref(G_OBJECT (factory));
+	g_object_unref(factory);
 }

Modified: kazehakase/trunk/src/kz-navi.c
===================================================================
--- kazehakase/trunk/src/kz-navi.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/kz-navi.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -156,5 +156,5 @@
 			  G_CALLBACK (cb_navi_load_error), NULL);
 	kz_bookmark_file_load_start(KZ_BOOKMARK_FILE(bookmark));
 
-	g_object_unref(G_OBJECT(bookmark));
+	g_object_unref(bookmark);
 }

Modified: kazehakase/trunk/src/kz-popup-preview.c
===================================================================
--- kazehakase/trunk/src/kz-popup-preview.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/kz-popup-preview.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -602,10 +602,8 @@
 static gboolean
 idle_unref_dl(gpointer data)
 {
-	KzDownloader *dl = data;
+	g_object_unref(data);
 
-	g_object_unref(G_OBJECT(dl));
-
 	return FALSE;
 }
 

Modified: kazehakase/trunk/src/net/kz-http.c
===================================================================
--- kazehakase/trunk/src/net/kz-http.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/net/kz-http.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -1281,7 +1281,7 @@
 	gnet_tcp_socket_connect_async(item->http_host, item->http_port,
 	 			      cb_http_connect, io);
 
-	g_object_unref(G_OBJECT(item));
+	g_object_unref(item);
 	return;
 	
 NO_PROXY:

Modified: kazehakase/trunk/src/net/kz-xmlrpc.c
===================================================================
--- kazehakase/trunk/src/net/kz-xmlrpc.c	2009-01-20 05:27:55 UTC (rev 3528)
+++ kazehakase/trunk/src/net/kz-xmlrpc.c	2009-01-20 05:53:23 UTC (rev 3529)
@@ -268,10 +268,8 @@
 static gboolean
 idle_load_complete(gpointer data)
 {
-	KzHTTP *http = data;
+	g_object_unref(data);
 
-	g_object_unref(G_OBJECT(http));
-
 	return FALSE;
 }
 



More information about the Kazehakase-cvs mailing list
Zurück zum Archiv-Index