FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-18-2012, 09:36 AM
Martin Gracik
 
Default Get the dimensions of the actual monitor (#800662)

---
firstboot/interface.py | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/firstboot/interface.py b/firstboot/interface.py
index ce0ff50..d5eff3c 100644
--- a/firstboot/interface.py
+++ b/firstboot/interface.py
@@ -188,6 +188,16 @@ class Interface(object):
dlg.destroy()
os.system("/sbin/reboot")

+ def fit_window_to_screen(self):
+ # need this to get the monitor
+ self.win.show()
+
+ screen = self.win.get_screen()
+ monitor = screen.get_monitor_at_window(self.win.get_window() )
+ geometry = screen.get_monitor_geometry(monitor)
+ self._x_size = geometry.width
+ self._y_size = geometry.height
+
def createMainWindow(self):
"""Create and initialize the main window. This includes switching to
fullscreen mode if necessary, adding buttons, displaying artwork,
@@ -201,6 +211,8 @@ class Interface(object):
# we don't set border width here so that the sidebar will meet
# the edge of the screen

+ self.fit_window_to_screen()
+
# Create a box that will hold all other widgets.
self.mainHBox = gtk.HBox(False, 10)

--
1.7.5.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:29 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org