[file-roller] make the progresss dialog modal when not in batch mode



commit 35ad1e2f8b9e2f8609fd663dd3138d482930d116
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Sun Jun 17 10:48:44 2012 +0200

    make the progresss dialog modal when not in batch mode

 src/fr-window.c |   33 +++++++++++++++++++--------------
 1 files changed, 19 insertions(+), 14 deletions(-)
---
diff --git a/src/fr-window.c b/src/fr-window.c
index c28482b..edccebd 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -2472,31 +2472,36 @@ fr_window_message_cb (FrCommand  *command,
 static void
 create_the_progress_dialog (FrWindow *window)
 {
-	GtkWindow     *parent;
-	GtkDialog     *d;
-	GtkWidget     *hbox;
-	GtkWidget     *vbox;
-	GtkWidget     *align;
-	GtkWidget     *progress_vbox;
-	GtkWidget     *lbl;
-	const char    *title;
-	char          *markup;
-	PangoAttrList *attr_list;
-	GdkPixbuf     *icon;
+	GtkWindow      *parent;
+	GtkDialogFlags flags;
+	GtkDialog      *d;
+	GtkWidget      *hbox;
+	GtkWidget      *vbox;
+	GtkWidget      *align;
+	GtkWidget      *progress_vbox;
+	GtkWidget      *lbl;
+	const char     *title;
+	char           *markup;
+	PangoAttrList  *attr_list;
+	GdkPixbuf      *icon;
 
 	if (window->priv->progress_dialog != NULL)
 		return;
 
-	if (window->priv->batch_mode)
+	flags = GTK_DIALOG_DESTROY_WITH_PARENT;
+	if (window->priv->batch_mode) {
 		parent = NULL;
-	else
+	}
+	else {
 		parent = GTK_WINDOW (window);
+		flags |= GTK_DIALOG_MODAL;
+	}
 
 	window->priv->pd_last_action = window->priv->action;
 	title = get_message_from_action (window->priv->pd_last_action);
 	window->priv->progress_dialog = gtk_dialog_new_with_buttons (title,
 								     parent,
-								     GTK_DIALOG_DESTROY_WITH_PARENT,
+								     flags,
 								     NULL);
 
 	window->priv->pd_quit_button = gtk_dialog_add_button (GTK_DIALOG (window->priv->progress_dialog), GTK_STOCK_QUIT, DIALOG_RESPONSE_QUIT);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]