svnno****@sourc*****
svnno****@sourc*****
Tue Mar 17 07:57:11 JST 2009
Revision: 3769 http://svn.sourceforge.jp/view?root=kazehakase&view=rev&rev=3769 Author: ikezoe Date: 2009-03-17 07:57:11 +0900 (Tue, 17 Mar 2009) Log Message: ----------- Emit "remove-child" signal before removal it from children list. Modified Paths: -------------- kazehakase/trunk/src/actions/kz-actions.c kazehakase/trunk/src/bookmarks/kz-bookmark-folder.c kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.c kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.h Modified: kazehakase/trunk/src/actions/kz-actions.c =================================================================== --- kazehakase/trunk/src/actions/kz-actions.c 2009-03-16 03:08:30 UTC (rev 3768) +++ kazehakase/trunk/src/actions/kz-actions.c 2009-03-16 22:57:11 UTC (rev 3769) @@ -2470,7 +2470,7 @@ g_signal_connect(popup_menu, "hide", G_CALLBACK(cb_popup_menu_hide), NULL); - set_popup_menu_sensitive (kz, bookmark); + set_popup_menu_sensitive(kz, bookmark); gtk_menu_popup(GTK_MENU(popup_menu), NULL, NULL, NULL, NULL, button, time); gtk_main(); @@ -2478,9 +2478,9 @@ G_CALLBACK(cb_popup_menu_hide), NULL); - kz_actions_set_bookmark_for_action (kz, NULL); + kz_actions_set_bookmark_for_action(kz, NULL); - set_popup_menu_sensitive (kz, KZ_GET_MENU_BOOKMARK); + set_popup_menu_sensitive(kz, KZ_GET_MENU_BOOKMARK); } Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-folder.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-folder.c 2009-03-16 03:08:30 UTC (rev 3768) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-folder.c 2009-03-16 22:57:11 UTC (rev 3769) @@ -349,8 +349,8 @@ if (!g_list_find(priv->children, child)) return; + g_signal_emit(folder, signals[REMOVE_CHILD_SIGNAL], 0, child); priv->children = g_list_remove(priv->children, child); - g_signal_emit(folder, signals[REMOVE_CHILD_SIGNAL], 0, child); g_object_unref(child); } Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.c =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.c 2009-03-16 03:08:30 UTC (rev 3768) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.c 2009-03-16 22:57:11 UTC (rev 3769) @@ -37,7 +37,7 @@ enum { PROP_0, PROP_MENU_SHELL, - PROP_BOOKMARK, + PROP_BOOKMARK_FOLDER, PROP_KZ_WINDOW }; @@ -92,11 +92,11 @@ G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (gobject_class, - PROP_BOOKMARK, + PROP_BOOKMARK_FOLDER, g_param_spec_object ("bookmark", _("Bookmark"), _("The boomark to show"), - KZ_TYPE_BOOKMARK, + KZ_TYPE_BOOKMARK_FOLDER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property @@ -170,12 +170,12 @@ g_list_free(children); g_object_weak_ref(G_OBJECT(list->menu_shell), (GWeakNotify)menu_shell_weak_notify, list); break; - case PROP_BOOKMARK: - list->folder = g_object_ref(g_value_get_object(value)); + case PROP_BOOKMARK_FOLDER: + list->folder = g_value_dup_object(value); kz_bookmark_menu_item_list_connect_signal(list); break; case PROP_KZ_WINDOW: - list->kz = g_object_ref(g_value_get_object(value)); + list->kz = g_value_dup_object(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -197,7 +197,7 @@ case PROP_MENU_SHELL: g_value_set_object(value, list->menu_shell); break; - case PROP_BOOKMARK: + case PROP_BOOKMARK_FOLDER: g_value_set_object(value, list->folder); break; case PROP_KZ_WINDOW: @@ -317,7 +317,6 @@ if (index < 0) return; children = list->menu_shell->children; - widget = g_list_nth_data(children, list->initial_children + index); if (GTK_IS_WIDGET(widget)) Modified: kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.h =================================================================== --- kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.h 2009-03-16 03:08:30 UTC (rev 3768) +++ kazehakase/trunk/src/bookmarks/kz-bookmark-menu-item-list.h 2009-03-16 22:57:11 UTC (rev 3769) @@ -45,7 +45,7 @@ GtkMenuShell *menu_shell; - KzBookmark *folder; + KzBookmarkFolder *folder; KzWindow *kz; guint initial_children;