summaryrefslogtreecommitdiff
path: root/geneticone/gui/windows.py
diff options
context:
space:
mode:
authornecoro <>2006-10-14 20:40:35 +0000
committernecoro <>2006-10-14 20:40:35 +0000
commita6d2a347e69f02c283a33dad6d5f6d90388a6af5 (patch)
tree67e4d2f09cd4d9a5651a1c43ea2f3f0b4742b231 /geneticone/gui/windows.py
parentc025c838753f264e8f802a4f5f47908feefebea6 (diff)
downloadportato-a6d2a347e69f02c283a33dad6d5f6d90388a6af5.tar.gz
portato-a6d2a347e69f02c283a33dad6d5f6d90388a6af5.tar.bz2
portato-a6d2a347e69f02c283a33dad6d5f6d90388a6af5.zip
Set min height to 600 if maxHeight is smaller then 800
Diffstat (limited to 'geneticone/gui/windows.py')
-rw-r--r--geneticone/gui/windows.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/geneticone/gui/windows.py b/geneticone/gui/windows.py
index a08fe16..4861b89 100644
--- a/geneticone/gui/windows.py
+++ b/geneticone/gui/windows.py
@@ -158,7 +158,7 @@ class SearchWindow (AbstractDialog):
"""Emulates a ok-button-click."""
keyname = gtk.gdk.keyval_name(event.keyval)
if keyname == "Return": # take it as an "OK" if Enter is pressed
- self.cb_ok_btn_clicked(self,widget)
+ self.cb_ok_btn_clicked(widget)
return True
else:
return False
@@ -575,8 +575,11 @@ class MainWindow:
self.window.set_title(("Genetic/One (%s)" % VERSION))
self.window.connect("destroy", self.cb_destroy)
self.window.set_border_width(2)
- self.window.set_geometry_hints (self.window, min_width = 600, min_height = 800, max_height = gtk.gdk.screen_height(), max_width = gtk.gdk.screen_width())
self.window.set_resizable(True)
+
+ mHeight = 800
+ if gtk.gdk.screen_height() <= 800: mHeight = 600
+ self.window.set_geometry_hints (self.window, min_width = 600, min_height = mHeight, max_height = gtk.gdk.screen_height(), max_width = gtk.gdk.screen_width())
# package db
self.db = Database()
@@ -614,7 +617,7 @@ class MainWindow:
# VPaned holding the lists and the Terminal
vpaned = gtk.VPaned()
- vpaned.set_position(400)
+ vpaned.set_position(mHeight/2)
vb.pack_start(vpaned, True, True)
# a HB holding the lists