diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2005-02-15 04:57:08 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2005-02-15 04:57:08 +0800 |
commit | ef7614362de89dbf7ebcfbe18bc1284754f17164 (patch) | |
tree | 141cefc47787ba88f82d871d0eaf3dc2fb0631f1 /embed/mozilla/EphySidebar.cpp | |
parent | 8393fcfb76309e11471481c922b9fc4ce666fdc9 (diff) | |
download | gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.tar gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.tar.gz gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.tar.bz2 gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.tar.lz gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.tar.xz gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.tar.zst gsoc2013-epiphany-ef7614362de89dbf7ebcfbe18bc1284754f17164.zip |
Emit a signal in EphySidebar::AddSearchEngine.
2005-02-14 Christian Persch <chpe@cvs.gnome.org>
* embed/ephy-embed-single.c: (ephy_embed_single_iface_init):
* embed/ephy-embed-single.h:
* embed/mozilla/EphySidebar.cpp:
* lib/ephy-marshal.list:
Emit a signal in EphySidebar::AddSearchEngine.
Diffstat (limited to 'embed/mozilla/EphySidebar.cpp')
-rw-r--r-- | embed/mozilla/EphySidebar.cpp | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/embed/mozilla/EphySidebar.cpp b/embed/mozilla/EphySidebar.cpp index ff98e29e6..953f8561c 100644 --- a/embed/mozilla/EphySidebar.cpp +++ b/embed/mozilla/EphySidebar.cpp @@ -47,12 +47,11 @@ EphySidebar::~EphySidebar() { } - /* void addPanel (in wstring aTitle, in string aContentURL, in string aCustomizeURL); */ NS_IMETHODIMP EphySidebar::AddPanel (const PRUnichar *aTitle, - const char *aContentURL, - const char *aCustomizeURL) + const char *aContentURL, + const char *aCustomizeURL) { nsEmbedCString title; EphyEmbedSingle *single; @@ -74,24 +73,36 @@ EphySidebar::AddPanel (const PRUnichar *aTitle, /* void addPersistentPanel (in wstring aTitle, in string aContentURL, in string aCustomizeURL); */ NS_IMETHODIMP EphySidebar::AddPersistentPanel (const PRUnichar *aTitle, - const char *aContentURL, - const char *aCustomizeURL) + const char *aContentURL, + const char *aCustomizeURL) { - return NS_ERROR_NOT_IMPLEMENTED; + return AddPanel (aTitle, aContentURL, aCustomizeURL); } /* void addSearchEngine (in string engineURL, in string iconURL, in wstring suggestedTitle, in wst ring suggestedCategory); */ NS_IMETHODIMP -EphySidebar::AddSearchEngine (const char *engineURL, - const char *iconURL, - const PRUnichar *suggestedTitle, - const PRUnichar *suggestedCategory) +EphySidebar::AddSearchEngine (const char *aEngineURL, + const char *aIconURL, + const PRUnichar *aSuggestedTitle, + const PRUnichar *aSuggestedCategory) { - return NS_ERROR_NOT_IMPLEMENTED; -} + nsEmbedCString title; + EphyEmbedSingle *single; + + NS_UTF16ToCString (nsEmbedString(aSuggestedTitle), + NS_CSTRING_ENCODING_UTF8, title); + LOG ("Adding search engine, engineurl=%s iconurl=%s title=%s", aEngineURL, aIconURL, title.get()); + single = EPHY_EMBED_SINGLE (ephy_embed_shell_get_embed_single (embed_shell)); + + gboolean result = FALSE; + g_signal_emit_by_name (single, "add-search-engine", + aEngineURL, aIconURL, title.get(), &result); + + return NS_OK; +} //------------------------------------------------------------------------------ //nsIClassInfo Impl. |