[gnome-flashback] always center end session dialog



commit 7fb6dd21df0fa8fe80a8df37231f33522083505b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Aug 14 21:50:17 2014 +0300

    always center end session dialog

 gnome-flashback/flashback-inhibit-dialog.c |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/gnome-flashback/flashback-inhibit-dialog.c b/gnome-flashback/flashback-inhibit-dialog.c
index 4bd6b4a..73f1e51 100644
--- a/gnome-flashback/flashback-inhibit-dialog.c
+++ b/gnome-flashback/flashback-inhibit-dialog.c
@@ -716,6 +716,7 @@ flashback_inhibit_dialog_class_init (FlashbackInhibitDialogClass *klass)
 static void
 flashback_inhibit_dialog_init (FlashbackInhibitDialog *dialog)
 {
+       GtkWindow *window;
        GtkWidget *content_area;
        GtkWidget *widget;
        GError    *error;
@@ -741,10 +742,13 @@ flashback_inhibit_dialog_init (FlashbackInhibitDialog *dialog)
        widget = GTK_WIDGET (gtk_builder_get_object (dialog->priv->xml, "main-box"));
        gtk_container_add (GTK_CONTAINER (content_area), widget);
 
+       window = GTK_WINDOW (dialog);
+
        gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
-       gtk_window_set_icon_name (GTK_WINDOW (dialog), "system-log-out");
-       gtk_window_set_title (GTK_WINDOW (dialog), "");
-       g_object_set (dialog, "resizable", FALSE, NULL);
+       gtk_window_set_icon_name (window, "system-log-out");
+       gtk_window_set_title (window, "");
+       gtk_window_set_position (window, GTK_WIN_POS_CENTER_ALWAYS);
+       gtk_window_set_resizable (window, FALSE);
 }
 
 static void


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