From d0b50fcf5b4ff6bca141722cd313960045ea0a53 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 5 Feb 2008 10:13:25 +0000 Subject: [PATCH] 2008-02-05 Benny Malengier * src/GrampsWidgets.py: remove conditional test on pygtk 2.6, 3.0 requires 2.10+, so 2.6 code should never be used. svn: r9995 --- ChangeLog | 4 ++++ src/GrampsWidgets.py | 24 +++++------------------- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/ChangeLog b/ChangeLog index 139dfdf9d..49da5bce8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-05 Benny Malengier + * src/GrampsWidgets.py: remove conditional test on pygtk 2.6, 3.0 + requires 2.10+, so 2.6 code should never be used. + 2008-02-02 Raphael Ackermann * src/DataViews/GrampletView.py * src/ReportBase/_ReportUtils.py diff --git a/src/GrampsWidgets.py b/src/GrampsWidgets.py index a9c32dfad..083c5abe7 100644 --- a/src/GrampsWidgets.py +++ b/src/GrampsWidgets.py @@ -1750,8 +1750,6 @@ class IconEntry(object): self._locked = False -HAVE_2_6 = gtk.pygtk_version[:2] == (2, 6) - (DIRECTION_LEFT, DIRECTION_RIGHT) = (1, -1) (INPUT_ASCII_LETTER, @@ -1830,24 +1828,12 @@ class MaskedEntry(gtk.Entry): self._block_insert = False self._block_delete = False - # Virtual methods - # PyGTK 2.6 does not support the virtual method do_size_allocate so - # we have to use the signal instead - # PyGTK 2.9.0 and later (bug #327715) does not work using the old code, - # so we have to make this conditionally - if HAVE_2_6: - gsignal('size-allocate', 'override') - def do_size_allocate(self, allocation): - self.chain(allocation) + # Virtual methods, note do_size_alloc needs gtk 2.9 + + def do_size_allocate(self, allocation): + gtk.Entry.do_size_allocate(self, allocation) - if self.flags() & gtk.REALIZED: - self._icon.resize_windows() - else: - def do_size_allocate(self, allocation): - gtk.Entry.do_size_allocate(self, allocation) - - if self.flags() & gtk.REALIZED: - self._icon.resize_windows() + if self.flags() & gtk.REALIZED: + self._icon.resize_windows() def do_expose_event(self, event): gtk.Entry.do_expose_event(self, event)