diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-12-02 23:16:41 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-12-02 23:16:41 +0800 |
commit | 37cc7f0bb5f9e4e7257ff9b7106dd92467590d43 (patch) | |
tree | d2c21062ffb30b383187311a657c26148c5ddf28 /src/bookmarks/ephy-bookmarks.c | |
parent | 2f0a4969602af118edfcb2959d422b7c03e022b0 (diff) | |
download | gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.tar gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.tar.gz gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.tar.bz2 gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.tar.lz gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.tar.xz gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.tar.zst gsoc2013-epiphany-37cc7f0bb5f9e4e7257ff9b7106dd92467590d43.zip |
Update bookmarks from HTTP 301. Fixes bug #126312.
2004-12-02 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-history.c: (ephy_history_class_init):
* embed/ephy-history.h:
* embed/mozilla/EphyHistoryListener.cpp:
* embed/mozilla/EphyHistoryListener.h:
* embed/mozilla/EphyUtils.cpp:
* embed/mozilla/EphyUtils.h:
* embed/mozilla/GlobalHistory.cpp:
* embed/mozilla/GlobalHistory.h:
* embed/mozilla/Makefile.am:
* src/bookmarks/ephy-bookmarks.c: (redirect_cb),
(ephy_setup_history_notifiers):
* src/ephy-window.c: (confirm_close_with_modified_forms),
(ensure_window_group), (ephy_window_init):
Update bookmarks from HTTP 301. Fixes bug #126312.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index e12eec366..0d520f2ac 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -476,6 +476,29 @@ history_cleared_cb (EphyHistory *history, EphyBookmarks *bookmarks) clear_favorites (bookmarks); } +#include <gtk/gtkmessagedialog.h> +#include <gtk/gtkdialog.h> + +static void +redirect_cb (EphyHistory *history, + const char *from_uri, + const char *to_uri, + EphyBookmarks *eb) +{ + EphyNode *bookmark; + GValue value = { 0, }; + + bookmark = ephy_bookmarks_find_bookmark (eb, from_uri); + if (bookmark != NULL) + { + g_value_init (&value, G_TYPE_STRING); + g_value_set_string (&value, to_uri); + ephy_node_set_property (bookmark, EPHY_NODE_BMK_PROP_LOCATION, + &value); + g_value_unset (&value); + } +} + static void ephy_setup_history_notifiers (EphyBookmarks *eb) { @@ -492,6 +515,8 @@ ephy_setup_history_notifiers (EphyBookmarks *eb) G_CALLBACK (history_site_visited_cb), eb); g_signal_connect (history, "cleared", G_CALLBACK (history_cleared_cb), eb); + g_signal_connect (history, "redirect", + G_CALLBACK (redirect_cb), eb); } static void |