[gnome-packagekit] Never set a window title if the dialog has no parent



commit 52efb3506f6cc3d00d198a0323b2cb2134e4f669
Author: Richard Hughes <richard hughsie com>
Date:   Thu Aug 25 13:33:15 2011 +0100

    Never set a window title if the dialog has no parent

 src/gpk-modal-dialog.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gpk-modal-dialog.c b/src/gpk-modal-dialog.c
index bcdec54..237433f 100644
--- a/src/gpk-modal-dialog.c
+++ b/src/gpk-modal-dialog.c
@@ -288,14 +288,18 @@ gboolean
 gpk_modal_dialog_set_title (GpkModalDialog *dialog, const gchar *title)
 {
 	GtkLabel *label;
+	GtkWidget *widget;
 	gchar *title_bold;
 
 	g_return_val_if_fail (GPK_IS_CLIENT_DIALOG (dialog), FALSE);
 	g_return_val_if_fail (title != NULL, FALSE);
 
 	/* only set the window title if we are non-modal */
-	if (!dialog->priv->has_parent)
-		gpk_modal_dialog_set_window_title (dialog, title);
+	if (!dialog->priv->has_parent) {
+		widget = GTK_WIDGET (gtk_builder_get_object (dialog->priv->builder,
+							     "dialog_client"));
+		gtk_window_set_modal (GTK_WINDOW (widget), FALSE);
+	}
 
 	/* we save this in case we are non-modal and have to use a title */
 	g_free (dialog->priv->title);



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