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

[PATCH] Set default resolution of anaconda.glade to 800x600



The default resolution of mainWindow is used for sessions that run
anaconda over ssh X forwarding.  For normal graphical installs and VNC
sessions, we take the default resolution offered by the server.

Related: rhbz#663411
---
 gui.py            |   13 ++++---------
 ui/anaconda.glade |    4 +++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/gui.py b/gui.py
index a08adf4..cb33663 100755
--- a/gui.py
+++ b/gui.py
@@ -973,11 +973,6 @@ class InstallInterface(InstallInterfaceBase):
         InstallInterfaceBase.__init__(self)
         self.icw = None
 
-        # figure out if we want to run interface at 800x600 or 640x480
-        if gtk.gdk.screen_width() >= 800:
-            self.runres = "800x600"
-        else:
-            self.runres = "640x480"
         root = gtk.gdk.get_default_root_window()
         cursor = gtk.gdk.Cursor(gtk.gdk.LEFT_PTR)
         root.set_cursor(cursor)
@@ -1329,7 +1324,7 @@ class InstallInterface(InstallInterfaceBase):
             anaconda.id.keyboard.activate()
 
         self.icw = InstallControlWindow (self.anaconda)
-        self.icw.run (self.runres)
+        self.icw.run ()
 
     def setSteps(self, anaconda):
         pass
@@ -1583,7 +1578,7 @@ class InstallControlWindow:
         self.mainxml = gtk.glade.XML(findGladeFile("anaconda.glade"),
                                      domain="anaconda")
 
-    def setup_window (self, runres):
+    def setup_window (self):
         self.setLtR()
 
         self.loadGlade()
@@ -1604,8 +1599,8 @@ class InstallControlWindow:
     def busyCursorPop(self):
         rootPopBusyCursor()
         
-    def run (self, runres):
-        self.setup_window(runres)
+    def run (self):
+        self.setup_window()
         gtk.main()
             
 class InstallControlState:
diff --git a/ui/anaconda.glade b/ui/anaconda.glade
index f70915f..f6c3fd6 100644
--- a/ui/anaconda.glade
+++ b/ui/anaconda.glade
@@ -1,10 +1,12 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?xml version="1.0"?>
 <glade-interface>
   <!-- interface-requires gtk+ 2.6 -->
   <!-- interface-naming-policy toplevel-contextual -->
   <widget class="GtkWindow" id="mainWindow">
     <property name="resizable">False</property>
     <property name="window_position">center</property>
+    <property name="default_width">800</property>
+    <property name="default_height">600</property>
     <property name="gravity">center</property>
     <signal name="key_release_event" handler="on_mainWindow_key_release_event"/>
     <signal name="delete_event" handler="on_mainWindow_delete_event"/>
-- 
1.7.3.5


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