diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-02-03 22:55:07 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-02-03 22:55:07 +0800 |
commit | 0f4a008b75c01ca857bd1bf29a4ce6428b70b6c0 (patch) | |
tree | f07b3e43233584e730965c97d3b4e5f37585d281 | |
parent | a1c576b83ce096538574b16a968c867d0cabc566 (diff) | |
download | gsoc2013-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!
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | embed/mozilla/EphyPromptService.cpp | 26 |
2 files changed, 16 insertions, 16 deletions
@@ -1,3 +1,9 @@ +2006-02-03 Christian Persch <chpe@cvs.gnome.org> + + * embed/mozilla/EphyPromptService.cpp: + + Don't make the nonblocking alert modal! + 2006-02-03 Jean-François Rameau <jframeau@cvs.gnome.org> * embed/mozilla/EphyPromptService.h: 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; } |