diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-10-18 19:29:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-10-18 19:29:17 +0800 |
commit | 8e878e61d90213c812163e1cf5a56381ff8cb641 (patch) | |
tree | 9da1ee081db5ec170f6b55e2c911f64a639c8182 /src/bookmarks | |
parent | ed1beb51d5c674250dcb31db142c6cb27f996fcf (diff) | |
download | gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.tar gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.tar.gz gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.tar.bz2 gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.tar.lz gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.tar.xz gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.tar.zst gsoc2013-epiphany-8e878e61d90213c812163e1cf5a56381ff8cb641.zip |
Get rid of the last vestige of ephy_window_update_control(), and make the
2003-10-18 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmarks.c: (add_to_favorites),
(history_site_visited_cb):
* src/ephy-favorites-menu.c: (ephy_favorites_menu_get_type),
(ephy_favorites_menu_clean), (ephy_favorites_menu_rebuild),
(ephy_favorites_menu_set_property),
(ephy_favorites_menu_get_property),
(ephy_favorites_menu_class_init), (do_updates), (fav_removed_cb),
(fav_added_cb), (ephy_favorites_menu_init),
(ephy_favorites_menu_finalize), (ephy_favorites_menu_new):
* src/ephy-favorites-menu.h:
* src/ephy-window.c:
* src/ephy-window.h:
Get rid of the last vestige of ephy_window_update_control(), and make
the favourites menu self-updating.
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index 9dc4e977e..be3ebe1f9 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -397,7 +397,7 @@ add_to_favorites (EphyBookmarks *eb, EphyNode *node, EphyHistory *eh) url = ephy_node_get_property_string (node, EPHY_NODE_BMK_PROP_LOCATION); score = get_history_item_score (eh, url); full_menu = ephy_node_get_n_children (eb->priv->favorites) - > MAX_FAVORITES_NUM; + >= MAX_FAVORITES_NUM; if (full_menu && score < eb->priv->lower_score) return FALSE; if (eb->priv->lower_fav && full_menu) @@ -413,23 +413,6 @@ add_to_favorites (EphyBookmarks *eb, EphyNode *node, EphyHistory *eh) } static void -update_favorites_menus () -{ - Session *session; - const GList *l; - - session = EPHY_SESSION (ephy_shell_get_session (ephy_shell)); - l = session_get_windows (session); - - for (; l != NULL; l = l->next) - { - EphyWindow *window = EPHY_WINDOW (l->data); - - ephy_window_update_control (window, FavoritesControl); - } -} - -static void history_site_visited_cb (EphyHistory *gh, const char *url, EphyBookmarks *eb) { EphyNode *node; @@ -437,10 +420,7 @@ history_site_visited_cb (EphyHistory *gh, const char *url, EphyBookmarks *eb) node = ephy_bookmarks_find_bookmark (eb, url); if (node == NULL) return; - if (add_to_favorites (eb, node, gh)) - { - update_favorites_menus (); - } + add_to_favorites (eb, node, gh); } static void |