aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-20 16:03:12 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-20 16:03:12 +0800
commit2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e (patch)
tree540f55fb52b740bde0571b39e6a10e043e6f1b57
parenta32f3bc82ae2cfc258d890c135bb109febb5f4b7 (diff)
downloadgsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar
gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.gz
gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.bz2
gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.lz
gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.xz
gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.tar.zst
gsoc2013-epiphany-2e4e7e1b752f261f9cd73f9d3d4b7ae346acde8e.zip
Implement GlobalHistory2::HidePage, fixes bug #142143.
2004-06-20 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GlobalHistory.cpp: Implement GlobalHistory2::HidePage, fixes bug #142143.
-rw-r--r--ChangeLog6
-rw-r--r--embed/mozilla/GlobalHistory.cpp24
2 files changed, 27 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 90cb59c10..bf7be5ffd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-06-20 Christian Persch <chpe@cvs.gnome.org>
+ * embed/mozilla/GlobalHistory.cpp:
+
+ Implement GlobalHistory2::HidePage, fixes bug #142143.
+
+2004-06-20 Christian Persch <chpe@cvs.gnome.org>
+
* src/ephy-notebook.c: (sync_label), (tab_label_style_set_cb),
(build_tab_label), (ephy_notebook_add_tab):
* src/ephy-window.c: (ephy_window_get_tabs):
diff --git a/embed/mozilla/GlobalHistory.cpp b/embed/mozilla/GlobalHistory.cpp
index d96417a69..352527dae 100644
--- a/embed/mozilla/GlobalHistory.cpp
+++ b/embed/mozilla/GlobalHistory.cpp
@@ -45,7 +45,8 @@ MozGlobalHistory::~MozGlobalHistory ()
NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aToplevel)
{
nsresult rv;
- NS_ENSURE_ARG_POINTER(aURI);
+
+ NS_ENSURE_ARG (aURI);
PRBool isJavascript;
rv = aURI->SchemeIs("javascript", &isJavascript);
@@ -98,6 +99,8 @@ NS_IMETHODIMP MozGlobalHistory::AddURI(nsIURI *aURI, PRBool aRedirect, PRBool aT
/* boolean isVisited (in nsIURI aURI); */
NS_IMETHODIMP MozGlobalHistory::IsVisited(nsIURI *aURI, PRBool *_retval)
{
+ NS_ENSURE_ARG (aURI);
+
nsEmbedCString spec;
aURI->GetSpec(spec);
@@ -109,6 +112,8 @@ NS_IMETHODIMP MozGlobalHistory::IsVisited(nsIURI *aURI, PRBool *_retval)
/* void setPageTitle (in nsIURI aURI, in AString aTitle); */
NS_IMETHODIMP MozGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString & aTitle)
{
+ NS_ENSURE_ARG (aURI);
+
nsEmbedCString title;
NS_UTF16ToCString (nsEmbedString (aTitle),
NS_CSTRING_ENCODING_UTF8, title);
@@ -122,9 +127,22 @@ NS_IMETHODIMP MozGlobalHistory::SetPageTitle(nsIURI *aURI, const nsAString & aTi
}
/* void hidePage (in nsIURI url); */
-NS_IMETHODIMP MozGlobalHistory::HidePage(nsIURI *url)
+NS_IMETHODIMP MozGlobalHistory::HidePage(nsIURI *aURI)
{
- return NS_ERROR_NOT_IMPLEMENTED;
+ NS_ENSURE_ARG (aURI);
+
+ nsEmbedCString spec;
+ aURI->GetSpec(spec);
+
+ EphyNode *page;
+ page = ephy_history_get_page (mGlobalHistory, spec.get());
+
+ if (page)
+ {
+ ephy_node_unref (page);
+ }
+
+ return NS_OK;
}
/* void removePage (in string aURL); */