aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-09-15 20:29:03 +0800
committerChristian Persch <chpe@src.gnome.org>2005-09-15 20:29:03 +0800
commitba377bb0e16c6773dd13632bc4793dae58a59e06 (patch)
treebc58bbd824648e65bad15716fb6149e58f56a70e /embed
parent67661fefc75a5a76269b51b7281a272aae438060 (diff)
downloadgsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.tar
gsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.tar.gz
gsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.tar.bz2
gsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.tar.lz
gsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.tar.xz
gsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.tar.zst
gsoc2013-epiphany-ba377bb0e16c6773dd13632bc4793dae58a59e06.zip
Don't focus the checkbox initially. Fixes bug #163371.
2005-09-15 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GtkNSSDialog.cpp: Don't focus the checkbox initially. Fixes bug #163371.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/GtkNSSDialogs.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/embed/mozilla/GtkNSSDialogs.cpp b/embed/mozilla/GtkNSSDialogs.cpp
index b8a47a402..44b6897e2 100644
--- a/embed/mozilla/GtkNSSDialogs.cpp
+++ b/embed/mozilla/GtkNSSDialogs.cpp
@@ -204,9 +204,12 @@ display_cert_warning_box (nsIInterfaceRequestor *ctx,
gboolean *checkbox_value,
const char *affirmative_text)
{
- GtkWidget *dialog, *label, *checkbox, *vbox;
+ GtkWidget *dialog, *label, *checkbox, *vbox, *button;
int res;
+ /* NOTE: Due to a mozilla bug [https://bugzilla.mozilla.org/show_bug.cgi?id=306288],
+ * we will always end up without a parent!
+ */
nsCOMPtr<nsIDOMWindow> parent = do_GetInterface (ctx);
GtkWindow *gparent = GTK_WINDOW (EphyUtils::FindGtkParent (parent));
@@ -240,9 +243,9 @@ display_cert_warning_box (nsIInterfaceRequestor *ctx,
affirmative_text = _("_Accept");
}
- gtk_dialog_add_button (GTK_DIALOG (dialog),
- affirmative_text,
- GTK_RESPONSE_ACCEPT);
+ button = gtk_dialog_add_button (GTK_DIALOG (dialog),
+ affirmative_text,
+ GTK_RESPONSE_ACCEPT);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
if (checkbox_text)
@@ -258,6 +261,9 @@ display_cert_warning_box (nsIInterfaceRequestor *ctx,
checkbox = 0;
}
+ /* We don't want focus on the checkbox */
+ gtk_widget_grab_focus (button);
+
gtk_label_set_markup (GTK_LABEL (label), markup_text);
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
gtk_widget_show_all (dialog);