From 7423fae667b40119604f2376a0bc2cc14701bbe5 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 31 Jan 2003 19:26:37 +0000 Subject: Make favorites really work and avoid they crash when closing window, 0.5 2003-01-31 Marco Pesenti Gritti * lib/ephy-types.h: * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init): * src/ephy-favorites-menu.c: (ephy_favorites_menu_clean), (ephy_favorites_menu_rebuild): Make favorites really work and avoid they crash when closing window, 0.5 is nearer now :) --- ChangeLog | 10 ++++++++++ lib/ephy-types.h | 1 + src/bookmarks/ephy-bookmarks.c | 2 +- src/ephy-favorites-menu.c | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 853440e7f..505d0539f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2003-01-31 Marco Pesenti Gritti + + * lib/ephy-types.h: + * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_init): + * src/ephy-favorites-menu.c: (ephy_favorites_menu_clean), + (ephy_favorites_menu_rebuild): + + Make favorites really work and avoid they crash when + closing window, 0.5 is nearer now :) + 2003-01-31 Marco Pesenti Gritti * data/art/epiphany-bookmarks.png: better icon, diff --git a/lib/ephy-types.h b/lib/ephy-types.h index da27ceaaf..4b3652527 100644 --- a/lib/ephy-types.h +++ b/lib/ephy-types.h @@ -36,6 +36,7 @@ enum { BOOKMARKS_NODE_ID = 0, KEYWORDS_NODE_ID = 1, + FAVORITES_NODE_ID = 2, HOSTS_NODE_ID = 5, PAGES_NODE_ID = 6, ICONS_NODE_ID = 9, diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index 42be2aa12..87ae1ad03 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -552,7 +552,7 @@ ephy_bookmarks_init (EphyBookmarks *eb) G_OBJECT (eb), 0); - eb->priv->favorites = ephy_node_new (); + eb->priv->favorites = ephy_node_new_with_id (FAVORITES_NODE_ID); ephy_node_ref (eb->priv->favorites); g_signal_connect_object (G_OBJECT (eb->priv->favorites), "child_added", diff --git a/src/ephy-favorites-menu.c b/src/ephy-favorites-menu.c index c8be1e816..ae4cff59f 100644 --- a/src/ephy-favorites-menu.c +++ b/src/ephy-favorites-menu.c @@ -123,6 +123,7 @@ ephy_favorites_menu_clean (EphyFavoritesMenu *wrhm) if (p->ui_id >= 0) { egg_menu_merge_remove_ui (merge, p->ui_id); + egg_menu_merge_ensure_update (merge); } if (p->action_group != NULL) @@ -279,7 +280,7 @@ ephy_favorites_menu_rebuild (EphyFavoritesMenu *wrhm) if (children->len > 0) { GError *error = NULL; - + LOG ("Merging ui\n%s",xml->str); p->ui_id = egg_menu_merge_add_ui_from_string (merge, xml->str, -1, &error); } -- cgit v1.2.3