aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-12-19 05:51:48 +0800
committerChristian Persch <chpe@src.gnome.org>2004-12-19 05:51:48 +0800
commitfb964a82fd2244d91b6303853d3a49ec338b94cc (patch)
tree529320e1e933bc2a41945c51f6374818158a4898 /lib
parent419bf3af0979b9d9c0bc04e0e8c02ad68bcd4dd6 (diff)
downloadgsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.tar
gsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.tar.gz
gsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.tar.bz2
gsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.tar.lz
gsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.tar.xz
gsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.tar.zst
gsoc2013-epiphany-fb964a82fd2244d91b6303853d3a49ec338b94cc.zip
Make sure we don't have any app-modal dialogues. Fixes bug #110479.
2004-12-18 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/ContentHandler.cpp: * embed/mozilla/FilePicker.cpp: * embed/mozilla/GtkNSSClientAuthDialogs.cpp: * embed/mozilla/GtkNSSDialogs.cpp: * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * lib/ephy-file-chooser.c: (ephy_file_chooser_new): * lib/ephy-gui.c: (ephy_gui_ensure_window_group), (ephy_gui_confirm_overwrite_file): * lib/ephy-gui.h: * src/bookmarks/ephy-bookmarks-editor.c: (delete_topic_dialog_construct), (ephy_bookmarks_editor_construct): * src/ephy-window.c: (ephy_window_init): * src/pdm-dialog.c: (show_cookies_properties): Make sure we don't have any app-modal dialogues. Fixes bug #110479.
Diffstat (limited to 'lib')
-rw-r--r--lib/ephy-file-chooser.c4
-rw-r--r--lib/ephy-gui.c27
-rw-r--r--lib/ephy-gui.h2
3 files changed, 30 insertions, 3 deletions
diff --git a/lib/ephy-file-chooser.c b/lib/ephy-file-chooser.c
index d759416aa..1f3c80f63 100644
--- a/lib/ephy-file-chooser.c
+++ b/lib/ephy-file-chooser.c
@@ -25,6 +25,7 @@
#include "ephy-file-helpers.h"
#include "eel-gconf-extensions.h"
#include "ephy-state.h"
+#include "ephy-gui.h"
#include "ephy-debug.h"
#include <gtk/gtkstock.h>
@@ -377,7 +378,8 @@ ephy_file_chooser_new (const char *title,
{
gtk_window_set_transient_for (GTK_WINDOW (dialog),
GTK_WINDOW (parent));
-
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (parent)),
+ GTK_WINDOW (dialog));
gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
}
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c
index cd8f09e02..622c145c2 100644
--- a/lib/ephy-gui.c
+++ b/lib/ephy-gui.c
@@ -168,8 +168,25 @@ ephy_gui_menu_position_on_panel (GtkMenu *menu,
ephy_gui_sanitise_popup_position (menu, widget, x, y);
}
+GtkWindowGroup *
+ephy_gui_ensure_window_group (GtkWindow *window)
+{
+ GtkWindowGroup *group;
+
+ group = window->group;
+ if (group == NULL)
+ {
+ group = gtk_window_group_new ();
+ gtk_window_group_add_window (group, window);
+ g_object_unref (group);
+ }
+
+ return group;
+}
+
gboolean
-ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename)
+ephy_gui_confirm_overwrite_file (GtkWidget *parent,
+ const char *filename)
{
GtkWidget *dialog;
char *display_name;
@@ -186,7 +203,7 @@ ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename)
dialog = gtk_message_dialog_new
(parent ? GTK_WINDOW (parent) : NULL,
- GTK_DIALOG_MODAL,
+ GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_WARNING,
GTK_BUTTONS_CANCEL,
_("A file %s already exists."), display_name);
@@ -204,6 +221,12 @@ ephy_gui_confirm_overwrite_file (GtkWidget *parent, const char *filename)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
+ if (parent != NULL)
+ {
+ gtk_window_group_add_window (ephy_gui_ensure_window_group (GTK_WINDOW (parent)),
+ GTK_WINDOW (dialog));
+ }
+
retval = (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT);
gtk_widget_destroy (dialog);
diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h
index 73f2e5bce..aa40c0de2 100644
--- a/lib/ephy-gui.h
+++ b/lib/ephy-gui.h
@@ -53,6 +53,8 @@ void ephy_gui_menu_position_on_panel (GtkMenu *menu,
gboolean *push_in,
gpointer user_data);
+GtkWindowGroup *ephy_gui_ensure_window_group (GtkWindow *window);
+
gboolean ephy_gui_is_middle_click (void);
gboolean ephy_gui_select_row_by_key (GtkTreeView *treeview,