[nautilus-actions] Setup parent window when displaying a dialog box
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Setup parent window when displaying a dialog box
- Date: Sun, 9 Jan 2011 20:26:27 +0000 (UTC)
commit 01c543c45f4a8ad0287e4f8c63d0dcc7ef7bbd25
Author: Pierre Wieser <pwieser trychlos org>
Date: Sun Jan 9 21:26:05 2011 +0100
Setup parent window when displaying a dialog box
ChangeLog | 2 ++
src/nact/base-application.c | 8 +++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 7372c0e..33c26d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2011-01-09 Pierre Wieser <pwieser trychlos org>
+ * src/nact/base-application.c (display_dlg): Setup parent window.
+
* src/api/na-iimporter.h:
* src/core/na-io-provider.c:
* src/core/na-object-id.c:
diff --git a/src/nact/base-application.c b/src/nact/base-application.c
index 2e22949..93c62be 100644
--- a/src/nact/base-application.c
+++ b/src/nact/base-application.c
@@ -1219,10 +1219,16 @@ display_dlg( BaseApplication *application, GtkMessageType type_message, GtkButto
GtkWidget *dialog;
const gchar *name;
gint result;
+ GtkWindow *parent;
g_assert( BASE_IS_APPLICATION( application ));
- dialog = gtk_message_dialog_new( NULL, GTK_DIALOG_MODAL, type_message, type_buttons, "%s", first );
+ parent = NULL;
+ if( application->private->main_window ){
+ parent = base_window_get_toplevel( application->private->main_window );
+ }
+
+ dialog = gtk_message_dialog_new( parent, GTK_DIALOG_MODAL, type_message, type_buttons, "%s", first );
if( second && g_utf8_strlen( second, -1 )){
gtk_message_dialog_format_secondary_text( GTK_MESSAGE_DIALOG( dialog ), "%s", second );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]