diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-01-09 03:12:33 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-01-09 03:12:33 +0800 |
commit | 74f30634c4d7187f9c04b0b4e7dfad1253c5616c (patch) | |
tree | bb5e9c11ecc10e6af05addc7b519e69f9386aa86 /embed/mozilla | |
parent | 5df83cc343c496873f84e939a6367b69ad9286bb (diff) | |
download | gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.gz gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.bz2 gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.lz gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.xz gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.zst gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.zip |
More start here page work, importing bookmarks from mozilla now should
2003-01-08 Marco Pesenti Gritti <marco@it.gnome.org>
* TODO:
* data/starthere/Makefile.am:
* data/starthere/index.xml.in:
* data/starthere/section.xsl:
* data/starthere/smartbookmarks.xml.in:
* embed/ephy-embed-shell.c: (ephy_embed_shell_class_init):
* embed/ephy-embed-shell.h:
* embed/mozilla/StartHereProtocolHandler.cpp:
* po/POTFILES.in:
* src/ephy-shell.c: (ephy_shell_command_cb), (ephy_shell_init):
More start here page work, importing bookmarks from mozilla
now should work.
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/StartHereProtocolHandler.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/embed/mozilla/StartHereProtocolHandler.cpp b/embed/mozilla/StartHereProtocolHandler.cpp index 2d2bb3c35..a4548378d 100644 --- a/embed/mozilla/StartHereProtocolHandler.cpp +++ b/embed/mozilla/StartHereProtocolHandler.cpp @@ -18,6 +18,9 @@ #include "ephy-file-helpers.h" #include "ephy-start-here.h" +#include "ephy-embed-shell.h" + +#include <string.h> #include "nsCOMPtr.h" #include "nsIFactory.h" @@ -121,6 +124,19 @@ NS_IMETHODIMP GStartHereProtocolHandler::NewChannel(nsIURI *aURI, rv = aURI->GetPath(path); if (NS_FAILED(rv)) return rv; + if (g_str_has_prefix (path.get(), "import-bookmarks")) + { + g_signal_emit_by_name (embed_shell, "command", "import-bookmarks", + path.get() + strlen ("import-bookmarks?")); + return NS_ERROR_FAILURE; + } + else if (g_str_has_prefix (path.get(), "configure-network")) + { + g_signal_emit_by_name (embed_shell, "command", "configure-network", + NULL); + return NS_ERROR_FAILURE; + } + nsCOMPtr<nsIStorageStream> sStream; nsCOMPtr<nsIOutputStream> stream; @@ -131,7 +147,8 @@ NS_IMETHODIMP GStartHereProtocolHandler::NewChannel(nsIURI *aURI, if (NS_FAILED(rv)) return rv; sh = ephy_start_here_new (); - buf = ephy_start_here_get_page (sh, "index"); + buf = ephy_start_here_get_page + (sh, path.IsEmpty() ? "index" : path.get ()); aBaseURI = ephy_start_here_get_base_uri (sh); rv = stream->Write (buf, strlen (buf), &bytesWritten); |