aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-10-31 21:13:06 +0800
committerChristian Persch <chpe@src.gnome.org>2003-10-31 21:13:06 +0800
commit67430590bb00c7265876fc25e6339c3fa33ca1de (patch)
tree2a347decf0e3df9a52c520e2ead1daf2f42ddac0
parent5909ee59ade218fcaab27cc4446e5ab384d90679 (diff)
downloadgsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.tar
gsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.tar.gz
gsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.tar.bz2
gsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.tar.lz
gsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.tar.xz
gsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.tar.zst
gsoc2013-epiphany-67430590bb00c7265876fc25e6339c3fa33ca1de.zip
Correctly set the embed for the print dialogue.
2003-10-31 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/MozillaPrivate.cpp: * embed/mozilla/MozillaPrivate.h: * embed/mozilla/PrintingPromptService.cpp: Correctly set the embed for the print dialogue.
-rw-r--r--ChangeLog8
-rw-r--r--embed/mozilla/MozillaPrivate.cpp15
-rw-r--r--embed/mozilla/MozillaPrivate.h2
-rw-r--r--embed/mozilla/PrintingPromptService.cpp7
4 files changed, 28 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index ba303787e..e2463ed22 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2003-10-31 Christian Persch <chpe@cvs.gnome.org>
+
+ * embed/mozilla/MozillaPrivate.cpp:
+ * embed/mozilla/MozillaPrivate.h:
+ * embed/mozilla/PrintingPromptService.cpp:
+
+ Correctly set the embed for the print dialogue.
+
2003-10-31 Marco Pesenti Gritti <marco@gnome.org>
* embed/mozilla/ContentHandler.cpp:
diff --git a/embed/mozilla/MozillaPrivate.cpp b/embed/mozilla/MozillaPrivate.cpp
index 48d29fc10..1950f0e6c 100644
--- a/embed/mozilla/MozillaPrivate.cpp
+++ b/embed/mozilla/MozillaPrivate.cpp
@@ -6,7 +6,10 @@
#include <nsIWebBrowserChrome.h>
#include <gtkmozembed.h>
-GtkWidget *MozillaFindGtkParent (nsIDOMWindow *aDOMWindow)
+#include "ephy-embed.h"
+#include "mozilla-embed.h"
+
+GtkWidget *MozillaFindEmbed (nsIDOMWindow *aDOMWindow)
{
nsresult result;
@@ -34,7 +37,15 @@ GtkWidget *MozillaFindGtkParent (nsIDOMWindow *aDOMWindow)
result = window->GetSiteWindow ((void **)&mozembed);
if (NS_FAILED(result)) return nsnull;
- return gtk_widget_get_toplevel (GTK_WIDGET(mozembed));
+ return mozembed;
+}
+
+GtkWidget *MozillaFindGtkParent (nsIDOMWindow *aDOMWindow)
+{
+ GtkWidget *embed = MozillaFindEmbed (aDOMWindow);
+ if (!embed) return nsnull;
+
+ return gtk_widget_get_toplevel (GTK_WIDGET (embed));
}
#define MM_TO_INCH(x) (((double) x) / 25.4)
diff --git a/embed/mozilla/MozillaPrivate.h b/embed/mozilla/MozillaPrivate.h
index be9ab4905..c2f9a4b42 100644
--- a/embed/mozilla/MozillaPrivate.h
+++ b/embed/mozilla/MozillaPrivate.h
@@ -3,6 +3,8 @@
#include "ephy-embed.h"
+GtkWidget *MozillaFindEmbed (nsIDOMWindow *aDOMWindow);
+
GtkWidget *MozillaFindGtkParent (nsIDOMWindow *aDOMWindow);
NS_METHOD MozillaCollatePrintSettings (const EmbedPrintInfo *info,
diff --git a/embed/mozilla/PrintingPromptService.cpp b/embed/mozilla/PrintingPromptService.cpp
index a66cb5379..1288e2cc8 100644
--- a/embed/mozilla/PrintingPromptService.cpp
+++ b/embed/mozilla/PrintingPromptService.cpp
@@ -14,10 +14,12 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Id$
*/
#ifdef HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <gtk/gtkdialog.h>
@@ -53,8 +55,9 @@ NS_IMETHODIMP GPrintingPromptService::ShowPrintDialog(nsIDOMWindow *parent, nsIW
EmbedPrintInfo *info;
GtkWidget *gtkParent = MozillaFindGtkParent(parent);
+ EphyEmbed *embed = EPHY_EMBED (MozillaFindEmbed (parent));
- dialog = print_dialog_new_with_parent (gtkParent, NULL, &info);
+ dialog = print_dialog_new_with_parent (gtkParent, embed, &info);
ephy_dialog_set_modal (dialog, TRUE);
gint ret = ephy_dialog_run (dialog);