aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyPromptService.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyPromptService.cpp')
-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;
}