aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed.cpp
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@mail.utexas.edu>2005-10-13 11:14:12 +0800
committerPhilip Langdale <philipl@src.gnome.org>2005-10-13 11:14:12 +0800
commit54d95188256bc3a6504e949d8a6d85190401330e (patch)
tree6f8aba9ea3d03952e8232669c744fdf54e840374 /embed/mozilla/mozilla-embed.cpp
parent85939a287cbb2b9c789581ddc6d529dd24d2c870 (diff)
downloadgsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.tar
gsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.tar.gz
gsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.tar.bz2
gsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.tar.lz
gsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.tar.xz
gsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.tar.zst
gsoc2013-epiphany-54d95188256bc3a6504e949d8a6d85190401330e.zip
embed/ephy-embed.c . Add a method to copy the back/forward history from
2005-10-12 Philip Langdale <philipl@mail.utexas.edu> * embed/ephy-embed.c * embed/ephy-embed.h: (ephy_embed_shistory_copy). Add a method to copy the back/forward history from one embed to another. * embed/mozilla/EphyBrowser.cpp: * embed/mozilla/EphyBrowser.h: (EphyBrowser::CopySHistory) Implementation of history copying. * embed/mozilla/mozilla-embed.cpp: Implement ephy_embed_shistory_copy by calling into EphyBrowser. * src/ephy-navigation-action.c: (activate_back_or_forward_menu_item_cb). If a history menu item is middle-clicked on, open a new tab, copy the history over and then go to the relevant page in the history. * src/ephy-toolbar.c: (ephy_toolbar_set_window) Attach handler for "open-link" to back/forward actions.
Diffstat (limited to 'embed/mozilla/mozilla-embed.cpp')
-rw-r--r--embed/mozilla/mozilla-embed.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 5116f12e3..5a684a54e 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -42,6 +42,7 @@
#include <nsMemory.h>
#include <nsIURI.h>
#include <nsIRequest.h>
+#include <nsIWebNavigation.h>
#include <nsIWebProgressListener.h>
#include <nsGfxCIID.h>
@@ -721,6 +722,20 @@ impl_shistory_go_nth (EphyEmbed *embed,
}
static void
+impl_shistory_copy (EphyEmbed *source,
+ EphyEmbed *dest,
+ gboolean copy_back,
+ gboolean copy_forward,
+ gboolean copy_current)
+{
+ MozillaEmbedPrivate *spriv = MOZILLA_EMBED(source)->priv;
+ MozillaEmbedPrivate *dpriv = MOZILLA_EMBED(dest)->priv;
+
+ spriv->browser->CopySHistory(dpriv->browser, copy_back,
+ copy_forward, copy_current);
+}
+
+static void
impl_get_security_level (EphyEmbed *embed,
EphyEmbedSecurityLevel *level,
char **description)
@@ -1169,6 +1184,7 @@ ephy_embed_iface_init (EphyEmbedIface *iface)
iface->shistory_get_nth = impl_shistory_get_nth;
iface->shistory_get_pos = impl_shistory_get_pos;
iface->shistory_go_nth = impl_shistory_go_nth;
+ iface->shistory_copy = impl_shistory_copy;
iface->get_security_level = impl_get_security_level;
iface->show_page_certificate = impl_show_page_certificate;
iface->close = impl_close;