diff options
Diffstat (limited to 'embed/mozilla')
-rw-r--r-- | embed/mozilla/MozillaPrivate.cpp | 15 | ||||
-rw-r--r-- | embed/mozilla/MozillaPrivate.h | 2 | ||||
-rw-r--r-- | embed/mozilla/PrintingPromptService.cpp | 7 |
3 files changed, 20 insertions, 4 deletions
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); |