svnno****@sourc*****
svnno****@sourc*****
Wed Jan 21 13:32:06 JST 2009
Revision: 3531 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3531 Author: ikezoe Date: 2009-01-21 13:32:05 +0900 (Wed, 21 Jan 2009) Log Message: ----------- G_OBJECT cast cleanup. Modified Paths: -------------- kazehakase/trunk/src/actions/kz-actions.c kazehakase/trunk/src/actions/kz-entry-action.c kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c kazehakase/trunk/src/actions/kz-stop-reload-action.c kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c kazehakase/trunk/src/bookmarks/kz-bookmark-file.c kazehakase/trunk/src/bookmarks/kz-bookmark.c kazehakase/trunk/src/bookmarks/kz-nsbookmark.c kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c kazehakase/trunk/src/bookmarks/kz-w3mbookmark.c kazehakase/trunk/src/bookmarks/kz-xbel.c kazehakase/trunk/src/kz-downloader-group.c kazehakase/trunk/src/kz-favicon.c kazehakase/trunk/src/kz-proxy-item.c kazehakase/trunk/src/net/kz-http.c kazehakase/trunk/src/prefs_ui/prefs_gesture.c kazehakase/trunk/src/prefs_ui/prefs_key_accel.c kazehakase/trunk/src/prefs_ui/prefs_proxy.c Modified: kazehakase/trunk/src/actions/kz-actions.c =================================================================== --- kazehakase/trunk/src/actions/kz-actions.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/actions/kz-actions.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -2020,7 +2020,7 @@ favicon = kz_favicon_get_pixbuf(kzfav, uri, GTK_ICON_SIZE_MENU); image = gtk_image_menu_item_get_image(GTK_IMAGE_MENU_ITEM(widget)); - g_object_get(G_OBJECT(action), + g_object_get(action, "stock_id", &stock_id, NULL); gtkutil_superpose_pixbuf(image, favicon, @@ -2037,7 +2037,7 @@ gtk_tool_button_set_icon_widget(GTK_TOOL_BUTTON(widget), image); gtk_widget_show(image); - g_object_get(G_OBJECT(action), + g_object_get(action, "stock_id", &stock_id, NULL); gtkutil_superpose_pixbuf(image, favicon, Modified: kazehakase/trunk/src/actions/kz-entry-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-entry-action.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/actions/kz-entry-action.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -220,7 +220,7 @@ entry = GTK_ENTRY(editable); text = gtk_entry_get_text(entry); - g_object_set(G_OBJECT(action), "text", text, NULL); + g_object_set(action, "text", text, NULL); } Modified: kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -326,7 +326,7 @@ entry = GTK_ENTRY(editable); text = gtk_entry_get_text(entry); - g_object_set(G_OBJECT(action), "text", text, NULL); + g_object_set(action, "text", text, NULL); } Modified: kazehakase/trunk/src/actions/kz-stop-reload-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-stop-reload-action.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/actions/kz-stop-reload-action.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -261,7 +261,7 @@ switch(priv->state) { case KZ_STOP_RELOAD_ACTION_STATE_STOP: - g_object_set(G_OBJECT(action), + g_object_set(action, "label", _("_Stop"), "tooltip", _("Stop current data transfer"), "stock_id", GTK_STOCK_STOP, @@ -269,7 +269,7 @@ break; case KZ_STOP_RELOAD_ACTION_STATE_RELOAD: default: - g_object_set(G_OBJECT(action), + g_object_set(action, "label", _("_Reload"), "tooltip", _("Display the latest content of the current page"), "stock_id", GTK_STOCK_REFRESH, @@ -282,7 +282,7 @@ * when the stock_id changes * so we redraw wproxy widget explicitly. */ - g_object_get(G_OBJECT(action), + g_object_get(action, "stock_id", &stock_id, NULL); @@ -311,7 +311,7 @@ { g_return_if_fail(KZ_IS_STOP_RELOAD_ACTION(action)); - g_object_set(G_OBJECT(action), + g_object_set(action, "state", state, NULL); } Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -125,7 +125,7 @@ GError *err = NULL; gchar *ui_file_name; - g_object_set(G_OBJECT(editor), "allow-shrink", TRUE, NULL); + g_object_set(editor, "allow-shrink", TRUE, NULL); gtk_window_set_title(GTK_WINDOW(editor), _("- Kazehakase Bookmark Editor -")); Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-file.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-file.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-file.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -633,7 +633,7 @@ const gchar *location) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "location", location, NULL); + g_object_set(bookmark_file, "location", location, NULL); } @@ -642,7 +642,7 @@ const gchar *file_type) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "file-type", file_type, NULL); + g_object_set(bookmark_file, "file-type", file_type, NULL); } @@ -650,7 +650,7 @@ kz_bookmark_file_set_interval (KzBookmarkFile *bookmark_file, guint interval) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "interval", interval, NULL); + g_object_set(bookmark_file, "interval", interval, NULL); } void @@ -658,7 +658,7 @@ const gchar *xmlrpc) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "xmlrpc", xmlrpc, NULL); + g_object_set(bookmark_file, "xmlrpc", xmlrpc, NULL); } void @@ -666,7 +666,7 @@ const gchar *user) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "xmlrpc-user", user, NULL); + g_object_set(bookmark_file, "xmlrpc-user", user, NULL); } void @@ -674,7 +674,7 @@ const gchar *pass) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "xmlrpc-pass", pass, NULL); + g_object_set(bookmark_file, "xmlrpc-pass", pass, NULL); } @@ -682,7 +682,7 @@ kz_bookmark_file_set_editable (KzBookmarkFile *bookmark_file, gboolean editable) { g_return_if_fail(KZ_IS_BOOKMARK_FILE(bookmark_file)); - g_object_set(G_OBJECT(bookmark_file), "editable", editable, NULL); + g_object_set(bookmark_file, "editable", editable, NULL); } Modified: kazehakase/trunk/src/bookmarks/kz-bookmark.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-bookmark.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -656,7 +656,7 @@ const gchar *id) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "id", id, NULL); + g_object_set(bookmark, "id", id, NULL); } @@ -665,7 +665,7 @@ const gchar *title) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "title", title, NULL); + g_object_set(bookmark, "title", title, NULL); } @@ -674,7 +674,7 @@ const gchar *doc_title) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "document-title", doc_title, NULL); + g_object_set(bookmark, "document-title", doc_title, NULL); } @@ -683,7 +683,7 @@ const gchar *uri) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "link", uri, NULL); + g_object_set(bookmark, "link", uri, NULL); } @@ -692,7 +692,7 @@ const gchar *description) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "description", description, NULL); + g_object_set(bookmark, "description", description, NULL); } @@ -701,7 +701,7 @@ guint time) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "last-modified", time, NULL); + g_object_set(bookmark, "last-modified", time, NULL); } void @@ -709,7 +709,7 @@ guint time) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "last-visited", time, NULL); + g_object_set(bookmark, "last-visited", time, NULL); } void @@ -717,7 +717,7 @@ guint time) { g_return_if_fail(KZ_IS_BOOKMARK(bookmark)); - g_object_set(G_OBJECT(bookmark), "added-time", time, NULL); + g_object_set(bookmark, "added-time", time, NULL); } gboolean @@ -1028,7 +1028,7 @@ { if (!kz_bookmark_is_folder(bookmark)) return; - g_object_set(G_OBJECT(bookmark), "current", pos, NULL); + g_object_set(bookmark, "current", pos, NULL); } gboolean @@ -1046,7 +1046,7 @@ { if (!kz_bookmark_is_folder(bookmark)) return; - g_object_set(G_OBJECT(bookmark), "lock", lock, NULL); + g_object_set(bookmark, "lock", lock, NULL); } gboolean @@ -1064,7 +1064,7 @@ { if (!kz_bookmark_is_folder(bookmark)) return; - g_object_set(G_OBJECT(bookmark), "auto-refresh", auto_refresh, NULL); + g_object_set(bookmark, "auto-refresh", auto_refresh, NULL); } gboolean @@ -1082,7 +1082,7 @@ { if (!kz_bookmark_is_folder(bookmark)) return; - g_object_set(G_OBJECT(bookmark), "javascript", javascript, NULL); + g_object_set(bookmark, "javascript", javascript, NULL); } static gint Modified: kazehakase/trunk/src/bookmarks/kz-nsbookmark.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-nsbookmark.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-nsbookmark.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -72,7 +72,7 @@ kz_nsbookmark_init (KzBookmark *bookmark) { bookmark->flags |= KZ_BOOKMARK_FILE_FLAG; - g_object_set(G_OBJECT(bookmark), + g_object_set(bookmark, "type", KZ_BOOKMARK_PURE_FOLDER, NULL); g_signal_connect(bookmark, "notify", Modified: kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -233,7 +233,7 @@ smart_list_quark); smart_list = g_list_append(smart_list, prop); - g_object_set(G_OBJECT(bookmark), "smart-list", smart_list, NULL); + g_object_set(bookmark, "smart-list", smart_list, NULL); } void @@ -375,7 +375,7 @@ smart_list_quark); free_smart_list(old_list); - g_object_set(G_OBJECT(bookmark), "smart-list", list, NULL); + g_object_set(bookmark, "smart-list", list, NULL); } @@ -411,6 +411,6 @@ g_return_if_fail(KZ_IS_SMART_BOOKMARK(bookmark)); g_return_if_fail(KZ_IS_BOOKMARK(history)); - g_object_set(G_OBJECT(bookmark), "smart-history", history, NULL); + g_object_set(bookmark, "smart-history", history, NULL); } Modified: kazehakase/trunk/src/bookmarks/kz-w3mbookmark.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-w3mbookmark.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-w3mbookmark.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -78,7 +78,7 @@ kz_w3mbookmark_init (KzBookmark *bookmark) { bookmark->flags |= KZ_BOOKMARK_FILE_FLAG; - g_object_set(G_OBJECT(bookmark), + g_object_set(bookmark, "type", KZ_BOOKMARK_PURE_FOLDER, NULL); g_signal_connect(bookmark, "notify", Modified: kazehakase/trunk/src/bookmarks/kz-xbel.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-xbel.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/bookmarks/kz-xbel.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -142,7 +142,7 @@ g_object_set_qdata_full(G_OBJECT(bookmark), xml_quark, xml, (GDestroyNotify) g_object_unref); - g_object_set(G_OBJECT(bookmark), + g_object_set(bookmark, "type", KZ_BOOKMARK_PURE_FOLDER, NULL); Modified: kazehakase/trunk/src/kz-downloader-group.c =================================================================== --- kazehakase/trunk/src/kz-downloader-group.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/kz-downloader-group.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -298,7 +298,7 @@ return; list = g_slist_append(dlgrp->items, dl); - g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); + g_object_set(dlgrp, "kz-downloader-items", list, NULL); connect_signals(dlgrp, dl); kz_downloader_to_file(dl); @@ -323,7 +323,7 @@ return; list = g_slist_append(dlgrp->items, dl); - g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); + g_object_set(dlgrp, "kz-downloader-items", list, NULL); connect_signals(dlgrp, dl); kz_downloader_to_file(dl); @@ -340,7 +340,7 @@ g_object_ref(dl); list = g_slist_append(dlgrp->items, KZ_DOWNLOADER(dl)); - g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); + g_object_set(dlgrp, "kz-downloader-items", list, NULL); connect_signals(dlgrp, KZ_DOWNLOADER(dl)); } @@ -365,6 +365,6 @@ kz_downloader_group_signals[REMOVE_SIGNAL], 0, dl); list = g_slist_remove(dlgrp->items, dl); - g_object_set(G_OBJECT(dlgrp), "kz-downloader-items", list, NULL); + g_object_set(dlgrp, "kz-downloader-items", list, NULL); g_idle_add(idle_remove_item, dl); } Modified: kazehakase/trunk/src/kz-favicon.c =================================================================== --- kazehakase/trunk/src/kz-favicon.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/kz-favicon.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -48,7 +48,7 @@ LAST_SIGNAL }; -#define MAX_FAVICONS 2000 +#define MAX_FAVICONS 20000 typedef struct downloader_info { Modified: kazehakase/trunk/src/kz-proxy-item.c =================================================================== --- kazehakase/trunk/src/kz-proxy-item.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/kz-proxy-item.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -304,7 +304,7 @@ KZ_CONF_PROXY_GET(proxy_name, "http_host", http_host, STRING); KZ_CONF_PROXY_GET(proxy_name, "http_port", http_port, INT); KZ_CONF_PROXY_GET(proxy_name, "no_proxies_on", no_proxies_on, STRING); - g_object_set(G_OBJECT(item), + g_object_set(item, "use_same_proxy", use_same_proxy, "http_host", http_host, "http_port", http_port, @@ -312,7 +312,7 @@ NULL); if (use_same_proxy) { - g_object_set(G_OBJECT(item), + g_object_set(item, "https_host", http_host, "https_port", http_port, "ftp_host", http_host, @@ -324,7 +324,7 @@ if (KZ_CONF_PROXY_GET(proxy_name, "https_host", https_host, STRING)) { KZ_CONF_PROXY_GET(proxy_name, "https_port", https_port, INT); - g_object_set(G_OBJECT(item), + g_object_set(item, "https_host", https_host, "https_port", https_port, NULL); @@ -333,7 +333,7 @@ if (KZ_CONF_PROXY_GET(proxy_name, "ftp_host", ftp_host, STRING)) { KZ_CONF_PROXY_GET(proxy_name, "ftp_port", ftp_port, INT); - g_object_set(G_OBJECT(item), + g_object_set(item, "ftp_host", ftp_host, "ftp_port", ftp_port, NULL); Modified: kazehakase/trunk/src/net/kz-http.c =================================================================== --- kazehakase/trunk/src/net/kz-http.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/net/kz-http.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -471,7 +471,7 @@ KzHTTP *http = kz_http_new(uri); KzHTTPPrivate *priv = KZ_HTTP_GET_PRIVATE (http); - g_object_set(G_OBJECT(http), "method", KZ_HTTP_METHOD_POST, NULL); + g_object_set(http, "method", KZ_HTTP_METHOD_POST, NULL); priv->post_data = g_strdup(post_data); return http; @@ -822,7 +822,7 @@ else if (g_ascii_strncasecmp(buffer, "Content-Length:", 15) == 0) { guint size = (guint)strtol(buffer + 15, NULL, 10); - g_object_set(G_OBJECT(http), + g_object_set(http, "file_size", size, NULL); } else if (g_ascii_strncasecmp(buffer, "Transfer-Encoding:", 18) == 0) @@ -859,7 +859,7 @@ struct tm t; strptime(buffer + 15, " %a, %d %b %Y %H:%M:%S %z", &t); - g_object_set(G_OBJECT(http), + g_object_set(http, "last_modified", (guint)mktime(&t), NULL); } else if (g_ascii_strncasecmp(buffer, "WWW-Authenticate:", 17) == 0) @@ -1004,7 +1004,7 @@ { if (kz_http_is_redirection(http)) { - g_object_set(G_OBJECT(http), + g_object_set(http, "uri", priv->location, NULL); /* iostatus = G_IO_STATUS_AGAIN; */ Modified: kazehakase/trunk/src/prefs_ui/prefs_gesture.c =================================================================== --- kazehakase/trunk/src/prefs_ui/prefs_gesture.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/prefs_ui/prefs_gesture.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -726,7 +726,7 @@ G_CALLBACK(cb_selection_changed), self); renderer = gtk_cell_renderer_text_new(); - g_object_set(G_OBJECT(renderer), "xalign", 0.0, NULL); + g_object_set(renderer, "xalign", 0.0, NULL); gtk_tree_view_insert_column_with_attributes(treeview, -1, _("Action"), renderer, "text", COLUMN_ACTION, @@ -738,7 +738,7 @@ gtk_tree_view_column_set_resizable(col, TRUE); renderer = gtk_cell_renderer_text_new(); - g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); + g_object_set(renderer, "xalign", 0.0, NULL); gtk_tree_view_insert_column_with_attributes(treeview, -1, _("Gesture"), renderer, "text", COLUMN_GESTURE, Modified: kazehakase/trunk/src/prefs_ui/prefs_key_accel.c =================================================================== --- kazehakase/trunk/src/prefs_ui/prefs_key_accel.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/prefs_ui/prefs_key_accel.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -490,7 +490,7 @@ G_CALLBACK(accel_path_selection_changed), self); renderer = gtk_cell_renderer_text_new(); - g_object_set(G_OBJECT(renderer), "xalign", 0.0, NULL); + g_object_set(renderer, "xalign", 0.0, NULL); gtk_tree_view_insert_column_with_attributes(treeview, -1, _("Path"), renderer, "text", COLUMN_LABEL, @@ -502,7 +502,7 @@ gtk_tree_view_column_set_resizable(col, TRUE); renderer = gtk_cell_renderer_text_new(); - g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL); + g_object_set(renderer, "xalign", 0.0, NULL); gtk_tree_view_insert_column_with_attributes(treeview, -1, _("Accel"), renderer, "text", COLUMN_ACCEL, Modified: kazehakase/trunk/src/prefs_ui/prefs_proxy.c =================================================================== --- kazehakase/trunk/src/prefs_ui/prefs_proxy.c 2009-01-20 23:18:43 UTC (rev 3530) +++ kazehakase/trunk/src/prefs_ui/prefs_proxy.c 2009-01-21 04:32:05 UTC (rev 3531) @@ -566,7 +566,7 @@ gboolean use_same_proxy; gboolean sel; - g_object_get(G_OBJECT(item), + g_object_get(item, "name", &name, "http_host", &http_host, "http_port", &http_port,