[gnome-builder] app: maximize the workbench by default.



commit f9c4175beb23a28a8aec1ec7ae4aead06483fede
Author: Christian Hergert <christian hergert me>
Date:   Sat Sep 20 16:04:15 2014 -0700

    app: maximize the workbench by default.

 src/app/gb-application.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 021bd0d..fb7075a 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -160,6 +160,10 @@ gb_application_activate (GApplication *application)
 
   ENTRY;
 
+  /*
+   * Determine 3/4's the screen width for the default size. We will maximize
+   * the window anyway, but handy when unmaximizing.
+   */
   screen = gdk_screen_get_default ();
   primary = gdk_screen_get_primary_monitor (screen);
   gdk_screen_get_monitor_geometry (screen, primary, &geom);
@@ -173,10 +177,11 @@ gb_application_activate (GApplication *application)
                          "window-position", GTK_WIN_POS_CENTER,
                          NULL);
 
-  gtk_application_add_window (GTK_APPLICATION (application), window);
-
+  gtk_window_maximize (window);
   gtk_window_present (window);
 
+  gtk_application_add_window (GTK_APPLICATION (application), window);
+
   EXIT;
 }
 


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