[gnome-color-manager] trivial: ensure that calling gcm_calibrate_dialog_set_move_window() after the window is shown moves



commit 98b15265ad8a68b70c094bec8f068c78a700713f
Author: Richard Hughes <richard hughsie com>
Date:   Thu Aug 5 12:44:13 2010 +0100

    trivial: ensure that calling gcm_calibrate_dialog_set_move_window() after the window is shown moves the window

 src/gcm-calibrate-dialog.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-calibrate-dialog.c b/src/gcm-calibrate-dialog.c
index 1281b2f..8da343c 100644
--- a/src/gcm-calibrate-dialog.c
+++ b/src/gcm-calibrate-dialog.c
@@ -505,7 +505,18 @@ gcm_calibrate_dialog_set_show_expander (GcmCalibrateDialog *calibrate_dialog, gb
 void
 gcm_calibrate_dialog_set_move_window (GcmCalibrateDialog *calibrate_dialog, gboolean move_window)
 {
+	gint x, y;
+	GtkWidget *widget;
+	GcmCalibrateDialogPrivate *priv = calibrate_dialog->priv;
+
 	calibrate_dialog->priv->move_window = move_window;
+
+	/* move the dialog out of the way, so the grey square doesn't cover it */
+	widget = GTK_WIDGET (gtk_builder_get_object (priv->builder, "dialog_calibrate"));
+	if (move_window) {
+		gtk_window_get_position (GTK_WINDOW (widget), &x, &y);
+		gtk_window_move (GTK_WINDOW (widget), 10, y);
+	}
 }
 
 /**



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