aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-02-03 22:55:07 +0800
committerChristian Persch <chpe@src.gnome.org>2006-02-03 22:55:07 +0800
commit0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0 (patch)
treef07b3e43233584e730965c97d3b4e5f37585d281 /embed
parenta1c576b83ce096538574b16a968c867d0cabc566 (diff)
downloadgsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.tar
gsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.tar.gz
gsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.tar.bz2
gsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.tar.lz
gsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.tar.xz
gsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.tar.zst
gsoc2013-epiphany-0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0.zip
Don't make the nonblocking alert modal!
2006-02-03 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/EphyPromptService.cpp: Don't make the nonblocking alert modal!
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyPromptService.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/embed/mozilla/EphyPromptService.cpp b/embed/mozilla/EphyPromptService.cpp
index 32a158b09..64bc0bc06 100644
--- a/embed/mozilla/EphyPromptService.cpp
+++ b/embed/mozilla/EphyPromptService.cpp
@@ -87,7 +87,7 @@ public:
void GetSelected (PRInt32*);
PRInt32 Run (PRBool * = nsnull);
- static void ShowAndForget (Prompter*);
+ void Show ();
PRBool IsCalledFromScript ();
void PerformScriptAbortion ();
@@ -531,24 +531,18 @@ DeletePrompter (gpointer aPromptPtr,
delete prompt;
}
-static void
-DestroyOnResonse (GtkWidget *aDialog,
- int aResponse,
- gpointer aUserData)
+void
+Prompter::Show ()
{
- gtk_widget_destroy (aDialog);
-}
+ gtk_window_set_modal (GTK_WINDOW (mDialog), FALSE);
-/* static */ void
-Prompter::ShowAndForget (Prompter *aPrompt)
-{
- g_signal_connect (aPrompt->mDialog, "response",
- G_CALLBACK (DestroyOnResonse), NULL);
- g_object_weak_ref (G_OBJECT (aPrompt->mDialog),
+ g_signal_connect (mDialog, "response",
+ G_CALLBACK (gtk_widget_destroy), NULL);
+ g_object_weak_ref (G_OBJECT (mDialog),
(GWeakNotify) DeletePrompter,
- NS_STATIC_CAST (gpointer, aPrompt));
+ NS_STATIC_CAST (gpointer, this));
- gtk_widget_show (GTK_WIDGET (aPrompt->mDialog));
+ gtk_widget_show (GTK_WIDGET (mDialog));
}
PRBool
@@ -878,7 +872,7 @@ EphyPromptService::ShowNonBlockingAlert (nsIDOMWindow *aParent,
if (!prompt) return NS_ERROR_OUT_OF_MEMORY;
prompt->AddStockButton (GTK_STOCK_OK, GTK_RESPONSE_ACCEPT);
- Prompter::ShowAndForget (prompt);
+ prompt->Show ();
return NS_OK;
}