svnno****@sourc*****
svnno****@sourc*****
Sun Oct 4 10:39:33 JST 2009
Revision: 3869 http://sourceforge.jp/projects/kazehakase/svn/view?view=rev&revision=3869 Author: ikezoe Date: 2009-10-04 10:39:33 +0900 (Sun, 04 Oct 2009) Log Message: ----------- * Use g_value_dup_object instead of g_object_ref and g_value_get_object. Modified Paths: -------------- kazehakase/trunk/ChangeLog kazehakase/trunk/src/actions/kz-location-entry-action.c kazehakase/trunk/src/actions/kz-navigation-action.c kazehakase/trunk/src/actions/kz-smart-bookmark-action.c kazehakase/trunk/src/actions/kz-smart-bookmark-button-action.c kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c kazehakase/trunk/src/actions/kz-stop-reload-action.c kazehakase/trunk/src/actions/kz-zoom-action.c kazehakase/trunk/src/bookmarks/kz-bookmark-bar.c kazehakase/trunk/src/bookmarks/kz-bookmark-base-menu-item.c kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c kazehakase/trunk/src/bookmarks/kz-bookmark-item.c kazehakase/trunk/src/bookmarks/kz-proxy-folder.c kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c kazehakase/trunk/src/dialogs/kz-copy-format-dialog.c kazehakase/trunk/src/dialogs/kz-links-dialog.c kazehakase/trunk/src/dialogs/kz-password-manager-dialog.c kazehakase/trunk/src/dialogs/kz-print-dialog.c kazehakase/trunk/src/dialogs/kz-prompt-dialog.c kazehakase/trunk/src/kz-download-box.c kazehakase/trunk/src/kz-feed-info.c kazehakase/trunk/src/kz-notebook.c kazehakase/trunk/src/kz-popup-tablist.c kazehakase/trunk/src/kz-sidebar.c kazehakase/trunk/src/kz-statusbar.c kazehakase/trunk/src/kz-tab-label.c kazehakase/trunk/src/sidebar/kz-bookmarks-sidebar.c kazehakase/trunk/src/sidebar/kz-downloader-sidebar.c kazehakase/trunk/src/sidebar/kz-tabtree.c kazehakase/trunk/src/sidebar/kz-thumbnails-sidebar.c Modified: kazehakase/trunk/ChangeLog =================================================================== --- kazehakase/trunk/ChangeLog 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/ChangeLog 2009-10-04 01:39:33 UTC (rev 3869) @@ -1,5 +1,9 @@ 2009-10-03 Hiroyuki Ikezoe <poinc****@ikezo*****> + * Use g_value_dup_object instead of g_object_ref and g_value_get_object. + +2009-10-03 Hiroyuki Ikezoe <poinc****@ikezo*****> + * src/kz-web.c: Implement missin kz_web_get_dest_anchors(). 2009-09-29 Hiroyuki Ikezoe <poinc****@ikezo*****> Modified: kazehakase/trunk/src/actions/kz-location-entry-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-location-entry-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-location-entry-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -177,12 +177,12 @@ switch (prop_id) { case PROP_KZ_WINDOW: - action->kz = g_object_ref(g_value_get_object(value)); + action->kz = g_value_dup_object(value); break; case PROP_KZ_BOOKMARK: if (action->bookmark) g_object_unref(action->bookmark); - action->bookmark = g_object_ref(g_value_get_object(value)); + action->bookmark = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/actions/kz-navigation-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-navigation-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-navigation-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -111,7 +111,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - action->kz = g_object_ref(g_value_get_object(value)); + action->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/actions/kz-smart-bookmark-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-smart-bookmark-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-smart-bookmark-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -196,10 +196,10 @@ switch (prop_id) { case PROP_KZ_WINDOW: - action->kz = g_object_ref(g_value_get_object(value)); + action->kz = g_value_dup_object(value); break; case PROP_KZ_BOOKMARK: - action->bookmark = g_object_ref(g_value_get_object(value)); + action->bookmark = g_value_dup_object(value); /* if bookmark is a folder, connect signals */ if (kz_bookmark_is_folder(action->bookmark)) { Modified: kazehakase/trunk/src/actions/kz-smart-bookmark-button-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-smart-bookmark-button-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-smart-bookmark-button-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -148,10 +148,10 @@ switch (prop_id) { case PROP_BOOKMARK: - action->bookmark = g_object_ref(g_value_get_object(value)); + action->bookmark = g_value_dup_object(value); break; case PROP_KZ_WINDOW: - action->kz = g_object_ref(g_value_get_object(value)); + action->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-smart-bookmark-folder-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -175,10 +175,10 @@ switch (prop_id) { case PROP_KZ_WINDOW: - action->kz = g_object_ref(g_value_get_object(value)); + action->kz = g_value_dup_object(value); break; case PROP_KZ_BOOKMARK: - action->bookmark = g_object_ref(g_value_get_object(value)); + action->bookmark = g_value_dup_object(value); break; case PROP_TEXT: g_free(action->text); Modified: kazehakase/trunk/src/actions/kz-stop-reload-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-stop-reload-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-stop-reload-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -137,7 +137,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - priv->kz = g_object_ref(g_value_get_object(value)); + priv->kz = g_value_dup_object(value); break; case PROP_STATE: priv->state = g_value_get_int(value); Modified: kazehakase/trunk/src/actions/kz-zoom-action.c =================================================================== --- kazehakase/trunk/src/actions/kz-zoom-action.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/actions/kz-zoom-action.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -119,7 +119,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - priv->kz = g_object_ref(g_value_get_object(value)); + priv->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-bar.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-bar.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-bar.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -252,10 +252,10 @@ switch (prop_id) { case PROP_KZ_WINDOW: - bar->kz = g_object_ref(g_value_get_object(value)); + bar->kz = g_value_dup_object(value); break; case PROP_BOOKMARK_LIST: - bar->folder = g_object_ref(g_value_get_object(value)); + bar->folder = g_value_dup_object(value); kz_bookmark_bar_connect_signal(bar); break; default: Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-base-menu-item.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-base-menu-item.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-base-menu-item.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -161,10 +161,10 @@ switch (prop_id) { case PROP_BOOKMARK: - menu->bookmark = g_object_ref(g_value_get_object(value)); + menu->bookmark = g_value_dup_object(value); break; case PROP_KZ_WINDOW: - menu->kz = g_object_ref(g_value_get_object(value)); + menu->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-editor.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -288,10 +288,8 @@ { case PROP_ROOT_FOLDER: if (editor->root_folder) - { g_object_unref(editor->root_folder); - } - editor->root_folder = g_object_ref(g_value_get_object(value)); + editor->root_folder = g_value_dup_object(value); kz_bookmark_editor_set_folder_tree(editor); kz_bookmark_editor_set_bookmark_tree(editor, editor->root_folder); Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-item.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-item.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-item.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -372,10 +372,10 @@ switch (prop_id) { case PROP_BOOKMARK: - menu->bookmark = g_object_ref(g_value_get_object(value)); + menu->bookmark = g_value_dup_object(value); break; case PROP_KZ_WINDOW: - menu->kz = g_object_ref(g_value_get_object(value)); + menu->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/bookmarks/kz-proxy-folder.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-proxy-folder.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/bookmarks/kz-proxy-folder.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -187,7 +187,7 @@ switch (prop_id) { case PROP_KZ_BOOKMARK_FOLDER: - priv->folder = g_object_ref(g_value_get_object(value)); + priv->folder = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/bookmarks/kz-smart-bookmark.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -164,7 +164,7 @@ g_value_get_pointer(value)); break; case PROP_SMART_HISTORY: - priv->history = g_object_ref(g_value_get_object(value)); + priv->history = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); Modified: kazehakase/trunk/src/dialogs/kz-copy-format-dialog.c =================================================================== --- kazehakase/trunk/src/dialogs/kz-copy-format-dialog.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/dialogs/kz-copy-format-dialog.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -290,7 +290,7 @@ switch (prop_id) { case PROP_PARENT_WINDOW: - copy_format->parent_window = g_object_ref(g_value_get_object(value)); + copy_format->parent_window = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/dialogs/kz-links-dialog.c =================================================================== --- kazehakase/trunk/src/dialogs/kz-links-dialog.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/dialogs/kz-links-dialog.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -317,10 +317,10 @@ switch (prop_id) { case PROP_PARENT_WINDOW: - kzlinks->parent_window = g_object_ref(g_value_get_object(value)); + kzlinks->parent_window = g_value_dup_object(value); break; case PROP_KZ_WEB: - kzlinks->kzweb = g_object_ref(g_value_get_object(value)); + kzlinks->kzweb = g_value_dup_object(value); break; case PROP_SELECTED_ONLY: kzlinks->selected_only = g_value_get_boolean(value); Modified: kazehakase/trunk/src/dialogs/kz-password-manager-dialog.c =================================================================== --- kazehakase/trunk/src/dialogs/kz-password-manager-dialog.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/dialogs/kz-password-manager-dialog.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -258,7 +258,7 @@ switch (prop_id) { case PROP_PARENT_WINDOW: - password_manager->parent_window = g_object_ref(g_value_get_object(value)); + password_manager->parent_window = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/dialogs/kz-print-dialog.c =================================================================== --- kazehakase/trunk/src/dialogs/kz-print-dialog.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/dialogs/kz-print-dialog.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -332,7 +332,7 @@ switch (prop_id) { case PROP_PARENT_WINDOW: - print->parent_window = g_object_ref(g_value_get_object(value)); + print->parent_window = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/dialogs/kz-prompt-dialog.c =================================================================== --- kazehakase/trunk/src/dialogs/kz-prompt-dialog.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/dialogs/kz-prompt-dialog.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -374,9 +374,7 @@ case PROP_PARENT_WINDOW: if (priv->parent_window) g_object_unref(priv->parent_window); - priv->parent_window = g_value_get_object(value); - if (priv->parent_window) - g_object_ref(priv->parent_window); + priv->parent_window = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-download-box.c =================================================================== --- kazehakase/trunk/src/kz-download-box.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-download-box.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -141,7 +141,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - dlbox->kz = g_object_ref(g_value_get_object(value)); + dlbox->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-feed-info.c =================================================================== --- kazehakase/trunk/src/kz-feed-info.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-feed-info.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -76,7 +76,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - info->kz = g_object_ref(g_value_get_object(value)); + info->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-notebook.c =================================================================== --- kazehakase/trunk/src/kz-notebook.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-notebook.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -159,7 +159,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - priv->kz = g_object_ref(g_value_get_object(value)); + priv->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-popup-tablist.c =================================================================== --- kazehakase/trunk/src/kz-popup-tablist.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-popup-tablist.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -160,7 +160,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - priv->kz = g_object_ref(g_value_get_object(value)); + priv->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-sidebar.c =================================================================== --- kazehakase/trunk/src/kz-sidebar.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-sidebar.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -182,7 +182,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - sidebar->kz = g_object_ref(g_value_get_object(value)); + sidebar->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-statusbar.c =================================================================== --- kazehakase/trunk/src/kz-statusbar.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-statusbar.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -238,7 +238,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - priv->kz = g_object_ref(g_value_get_object(value)); + priv->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec); Modified: kazehakase/trunk/src/kz-tab-label.c =================================================================== --- kazehakase/trunk/src/kz-tab-label.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/kz-tab-label.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -405,7 +405,7 @@ switch (prop_id) { case PROP_KZ_WINDOW: - tablabel->kz = g_object_ref(g_value_get_object(value)); + tablabel->kz = g_value_dup_object(value); break; case PROP_KZ_WEB: kz_tab_label_set_web(tablabel, g_value_get_object(value)); Modified: kazehakase/trunk/src/sidebar/kz-bookmarks-sidebar.c =================================================================== --- kazehakase/trunk/src/sidebar/kz-bookmarks-sidebar.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/sidebar/kz-bookmarks-sidebar.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -149,7 +149,7 @@ switch (prop_id) { case PROP_SIDEBAR: - sidebar->sidebar = g_object_ref(g_value_get_object(value)); + sidebar->sidebar = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/sidebar/kz-downloader-sidebar.c =================================================================== --- kazehakase/trunk/src/sidebar/kz-downloader-sidebar.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/sidebar/kz-downloader-sidebar.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -338,7 +338,7 @@ switch (prop_id) { case PROP_SIDEBAR: - sidebar->sidebar = g_object_ref(g_value_get_object(value)); + sidebar->sidebar = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); Modified: kazehakase/trunk/src/sidebar/kz-tabtree.c =================================================================== --- kazehakase/trunk/src/sidebar/kz-tabtree.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/sidebar/kz-tabtree.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -369,7 +369,7 @@ switch (prop_id) { case PROP_SIDEBAR: - tabtree->sidebar = g_object_ref(g_value_get_object(value)); + tabtree->sidebar = g_value_dup_object(value); break; case PROP_TREE: tabtree->tree = g_value_get_boolean(value); Modified: kazehakase/trunk/src/sidebar/kz-thumbnails-sidebar.c =================================================================== --- kazehakase/trunk/src/sidebar/kz-thumbnails-sidebar.c 2009-10-03 07:27:54 UTC (rev 3868) +++ kazehakase/trunk/src/sidebar/kz-thumbnails-sidebar.c 2009-10-04 01:39:33 UTC (rev 3869) @@ -191,7 +191,7 @@ switch (prop_id) { case PROP_SIDEBAR: - sidebar->sidebar = g_object_ref(g_value_get_object(value)); + sidebar->sidebar = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);