aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/ContentHandler.cpp
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2004-02-28 18:47:03 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2004-02-28 18:47:03 +0800
commit5af89a28e1d5302f351a714a711ddc4ead5320b0 (patch)
treedf2fccd503b13c3928834db0f8f1d8544e7c574b /embed/mozilla/ContentHandler.cpp
parentc5cb67fcff408482f964020079910dc3475fef25 (diff)
downloadgsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.tar
gsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.tar.gz
gsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.tar.bz2
gsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.tar.lz
gsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.tar.xz
gsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.tar.zst
gsoc2013-epiphany-5af89a28e1d5302f351a714a711ddc4ead5320b0.zip
Use getInterface to get the dom window from the docshell, not
2004-02-28 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/ContentHandler.cpp: Use getInterface to get the dom window from the docshell, not queryInterface. (Bug #121160) * embed/mozilla/MozillaPrivate.cpp: Do not fallback to the active window if the parent cannot be found. It just hides problems and cause more annoying behaviors (like dialogs parented on the wrong window).
Diffstat (limited to 'embed/mozilla/ContentHandler.cpp')
-rw-r--r--embed/mozilla/ContentHandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/embed/mozilla/ContentHandler.cpp b/embed/mozilla/ContentHandler.cpp
index 622c95ca7..a92965638 100644
--- a/embed/mozilla/ContentHandler.cpp
+++ b/embed/mozilla/ContentHandler.cpp
@@ -34,8 +34,7 @@
#include "nsIURL.h"
#include "nsILocalFile.h"
#include "nsIMIMEInfo.h"
-
-#include "nsIWebNavigation.h" // Needed to create the LoadType flag
+#include "nsIInterfaceRequestorUtils.h"
#include "ephy-prefs.h"
#include "eel-gconf-extensions.h"
@@ -129,7 +128,7 @@ NS_IMETHODIMP GContentHandler::PromptForSaveToFile(
_retval);
}
- nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_QueryInterface (aWindowContext);
+ nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_GetInterface (aWindowContext);
GtkWidget *parentWindow = GTK_WIDGET (MozillaFindGtkParent (parentDOMWindow));
dialog = ephy_file_chooser_new (_("Save"), parentWindow,
@@ -257,7 +256,7 @@ NS_METHOD GContentHandler::MIMEConfirmAction (PRBool autoDownload)
char *text;
int response;
- nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_QueryInterface (mContext);
+ nsCOMPtr<nsIDOMWindow> parentDOMWindow = do_GetInterface (mContext);
GtkWindow *parentWindow = GTK_WINDOW (MozillaFindGtkParent(parentDOMWindow));
dialog = gtk_dialog_new_with_buttons
@@ -278,8 +277,6 @@ NS_METHOD GContentHandler::MIMEConfirmAction (PRBool autoDownload)
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox,
TRUE, TRUE, 0);
- g_print ("AAA %d %p", mPermission, mHelperApp);
-
if (mPermission == EPHY_MIME_PERMISSION_UNSAFE && mHelperApp)
{
text = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",