From a6d2a347e69f02c283a33dad6d5f6d90388a6af5 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Sat, 14 Oct 2006 20:40:35 +0000 Subject: Set min height to 600 if maxHeight is smaller then 800 --- geneticone/gui/gui_helper.py | 2 +- geneticone/gui/windows.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'geneticone/gui') diff --git a/geneticone/gui/gui_helper.py b/geneticone/gui/gui_helper.py index 449fa9c..c6bcf53 100644 --- a/geneticone/gui/gui_helper.py +++ b/geneticone/gui/gui_helper.py @@ -260,7 +260,7 @@ class EmergeQueue: # for the beginning: let us create a package object - but it is not guaranteed, that it actually exists in portage pkg = backend.Package(cpv) - masked = not (pkg.is_masked() or pkg.is_testing(allowed=True)) # <-- why am I doing this? FIXME + masked = not (pkg.is_masked() or pkg.is_testing(allowed=True)) # we are setting this to True in case we have unmasked it already, but portage does not know this # and now try to find it in portage pkg = backend.find_packages("="+cpv, masked = masked) 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 -- cgit v1.2.3-70-g09d2