seahorse/seahorse-ephy-2.22.patch

77 lines
2.6 KiB
Diff

--- plugins/epiphany/seahorse-extension.c 2008/03/16 22:26:26 1.1
+++ plugins/epiphany/seahorse-extension.c 2008/03/16 22:53:30
@@ -25,6 +25,7 @@
#include <epiphany/ephy-extension.h>
#include <epiphany/ephy-embed.h>
+#include <epiphany/ephy-embed-container.h>
#include "eel-gconf-extensions.h"
#include "ephy-debug.h"
@@ -239,7 +240,7 @@ encrypt_seahorse_cb (GtkAction *action,
init_crypt();
- embed = ephy_window_get_active_embed (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
/* ask gecko for the input */
@@ -285,7 +286,7 @@ sign_seahorse_cb (GtkAction *action, Eph
init_crypt();
- embed = ephy_window_get_active_embed (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
/* ask gecko for the input */
@@ -419,7 +420,7 @@ dvi_seahorse_cb (GtkAction *action, Ephy
init_crypt();
- embed = ephy_window_get_active_embed (window);
+ embed = ephy_embed_container_get_active_child (EPHY_EMBED_CONTAINER (window));
g_return_if_fail (EPHY_IS_EMBED (embed));
/* ask gecko for the input */
--- plugins/epiphany/mozilla/mozilla-helper.cpp 2008/03/16 22:22:38 1.1
+++ plugins/epiphany/mozilla/mozilla-helper.cpp 2008/03/16 22:24:17
@@ -78,8 +78,10 @@ extern "C" gboolean
mozilla_is_input (EphyEmbed *embed)
{
nsCOMPtr<nsIWebBrowser> browser;
- gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (embed),
+ gtk_moz_embed_get_nsIWebBrowser (
+ GTK_MOZ_EMBED (gtk_bin_get_child (GTK_BIN (embed))),
getter_AddRefs (browser));
+ NS_ENSURE_TRUE (browser, FALSE);
nsCOMPtr<nsIWebBrowserFocus> focus (do_QueryInterface(browser));
if (!focus) return FALSE;
@@ -100,9 +102,11 @@ extern "C" const char*
mozilla_get_text (EphyEmbed *embed)
{
nsCOMPtr<nsIWebBrowser> browser;
- gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (embed),
+ gtk_moz_embed_get_nsIWebBrowser (
+ GTK_MOZ_EMBED (gtk_bin_get_child (GTK_BIN (embed))),
getter_AddRefs (browser));
nsCOMPtr<nsIWebBrowserFocus> focus (do_QueryInterface(browser));
+ NS_ENSURE_TRUE (browser, NULL);
if (!focus)
return NULL;
@@ -139,8 +143,10 @@ extern "C" void
mozilla_set_text (EphyEmbed *embed, char *new_text)
{
nsCOMPtr<nsIWebBrowser> browser;
- gtk_moz_embed_get_nsIWebBrowser (GTK_MOZ_EMBED (embed),
+ gtk_moz_embed_get_nsIWebBrowser (
+ GTK_MOZ_EMBED (gtk_bin_get_child (GTK_BIN (embed))),
getter_AddRefs (browser));
+ NS_ENSURE_TRUE (browser, );
nsCOMPtr<nsIWebBrowserFocus> focus (do_QueryInterface(browser));
if (!focus) return;