aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/GtkNSSDialogs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/GtkNSSDialogs.cpp')
-rw-r--r--embed/mozilla/GtkNSSDialogs.cpp67
1 files changed, 48 insertions, 19 deletions
diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp
index 52a2e351a..bf4707e25 100644
--- a/embed/mozilla/GtkNSSDialogs.cpp
+++ b/embed/mozilla/GtkNSSDialogs.cpp
@@ -207,16 +207,21 @@ display_cert_warning_box (nsIInterfaceRequestor *ctx,
int res;
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
- GtkWidget *gparent = EphyUtils::FindGtkParent (parent);
+ GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
g_return_val_if_fail (markup_text, GTK_RESPONSE_CANCEL);
g_return_val_if_fail (!checkbox_text || checkbox_value, GTK_RESPONSE_CANCEL);
- dialog = gtk_dialog_new_with_buttons ("",
- gparent ? GTK_WINDOW (gparent) : NULL,
+ dialog = gtk_dialog_new_with_buttons ("", gparent,
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL);
+ if (gparent)
+ {
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (gparent),
+ GTK_WINDOW (dialog));
+ }
+ gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
higgy_setup_dialog (GTK_DIALOG (dialog),
@@ -543,10 +548,9 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
char *ttCommonName, *msg, *tertiary;
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
- GtkWidget *gparent = EphyUtils::FindGtkParent (parent);
+ GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
- dialog = gtk_dialog_new_with_buttons ("",
- GTK_WINDOW (gparent),
+ dialog = gtk_dialog_new_with_buttons ("", gparent,
GTK_DIALOG_DESTROY_WITH_PARENT,
_("_View Certificate"),
NSSDIALOG_RESPONSE_VIEW_CERT,
@@ -554,6 +558,12 @@ GtkNSSDialogs::ConfirmDownloadCACert(nsIInterfaceRequestor *ctx,
_("_Trust CA"), GTK_RESPONSE_ACCEPT,
NULL);
+ if (gparent)
+ {
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (gparent),
+ GTK_WINDOW (dialog));
+ }
+
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
higgy_setup_dialog (GTK_DIALOG (dialog), GTK_STOCK_DIALOG_WARNING,
@@ -642,15 +652,20 @@ GtkNSSDialogs::NotifyCACertExists (nsIInterfaceRequestor *ctx)
char * msg;
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
- GtkWidget *gparent = EphyUtils::FindGtkParent (parent);
+ GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
- dialog = gtk_dialog_new_with_buttons ("",
- GTK_WINDOW (gparent),
+ dialog = gtk_dialog_new_with_buttons ("", gparent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_OK,
GTK_RESPONSE_OK,
NULL);
+ if (gparent)
+ {
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (gparent),
+ GTK_WINDOW (dialog));
+ }
+
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
higgy_setup_dialog (GTK_DIALOG (dialog), GTK_STOCK_DIALOG_ERROR,
@@ -764,16 +779,20 @@ GtkNSSDialogs::SetPKCS12FilePassword(nsIInterfaceRequestor *ctx,
char *msg;
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
- GtkWidget *gparent = EphyUtils::FindGtkParent (parent);
-
+ GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
- dialog = gtk_dialog_new_with_buttons ("",
- GTK_WINDOW (gparent),
+ dialog = gtk_dialog_new_with_buttons ("", gparent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL,
NULL);
+ if (gparent)
+ {
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (gparent),
+ GTK_WINDOW (dialog));
+ }
+
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
higgy_setup_dialog (GTK_DIALOG (dialog), GTK_STOCK_DIALOG_QUESTION,
@@ -877,15 +896,20 @@ GtkNSSDialogs::GetPKCS12FilePassword(nsIInterfaceRequestor *ctx,
char *msg;
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
- GtkWidget *gparent = EphyUtils::FindGtkParent (parent);
+ GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
- dialog = gtk_dialog_new_with_buttons ("",
- GTK_WINDOW (gparent),
+ dialog = gtk_dialog_new_with_buttons ("", gparent,
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
_("I_mport Certificate"), GTK_RESPONSE_OK,
NULL);
+ if (gparent)
+ {
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (gparent),
+ GTK_WINDOW (dialog));
+ }
+
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");
higgy_setup_dialog (GTK_DIALOG (dialog), GTK_STOCK_DIALOG_QUESTION,
@@ -1309,9 +1333,14 @@ GtkNSSDialogs::ViewCert(nsIInterfaceRequestor *ctx,
&dialog, NULL, NULL);
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
- GtkWidget *gparent = EphyUtils::FindGtkParent (parent);
- gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(gparent));
- gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
+ GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
+ if (gparent)
+ {
+ gtk_window_set_transient_for (GTK_WINDOW(dialog), GTK_WINDOW(gparent));
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (gparent)),
+ GTK_WINDOW (dialog));
+ gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
+ }
gtk_window_set_icon_name (GTK_WINDOW (dialog), "web-browser");