[Python-apps-commits] r5022 - in packages/terminator/trunk/debian (3 files)
nxvl-guest at users.alioth.debian.org
nxvl-guest at users.alioth.debian.org
Thu Mar 25 01:42:06 UTC 2010
Date: Thursday, March 25, 2010 @ 01:42:06
Author: nxvl-guest
Revision: 5022
Make the match functions more resistant to tracebacks
Added:
packages/terminator/trunk/debian/patches/
packages/terminator/trunk/debian/patches/10_798.patch
Modified:
packages/terminator/trunk/debian/changelog
Modified: packages/terminator/trunk/debian/changelog
===================================================================
--- packages/terminator/trunk/debian/changelog 2010-03-25 01:28:13 UTC (rev 5021)
+++ packages/terminator/trunk/debian/changelog 2010-03-25 01:42:06 UTC (rev 5022)
@@ -3,9 +3,10 @@
* Add DM-Upload-Allowed field
* Remove python-xdg from Recommends. (Closes: #567967)
* Backported revision 798 from termintor trunk
- (LP: #503802, #420007, #432994)
+ - Make the match functions more resistant to tracebacks
+ (LP: #503802, #420007, #432994)
- -- Nicolas Valcárcel Scerpella (Canonical) <nvalcarcel at canonical.com> Wed, 24 Mar 2010 20:27:24 -0500
+ -- Nicolas Valcárcel Scerpella (Canonical) <nvalcarcel at canonical.com> Wed, 24 Mar 2010 20:40:22 -0500
terminator (0.14-1) unstable; urgency=low
Added: packages/terminator/trunk/debian/patches/10_798.patch
===================================================================
--- packages/terminator/trunk/debian/patches/10_798.patch (rev 0)
+++ packages/terminator/trunk/debian/patches/10_798.patch 2010-03-25 01:42:06 UTC (rev 5022)
@@ -0,0 +1,121 @@
+diff -Nur -x '*.orig' -x '*~' terminator/terminatorlib/terminator.py terminator.new/terminatorlib/terminator.py
+--- terminator/terminatorlib/terminator.py 2010-03-24 20:32:22.944710000 -0500
++++ terminator.new/terminatorlib/terminator.py 2010-03-24 20:33:59.518473717 -0500
+@@ -1046,6 +1046,10 @@
+ '''We want to find terminals that are fully above the top
+ border, but closest in the y direction, breaking ties via
+ the closest cursor x position.'''
++ if len(possible_geo.keys()) == 0:
++ dbg('_match_right: no possible geo, bailing')
++ return False
++
+ #print "matching up..."
+ # top edge of the current terminal
+ edge = current_geo['origin_y']
+@@ -1053,7 +1057,10 @@
+ new_edge = possible_geo['origin_y']+possible_geo['span_y']
+
+ # Width of the horizontal bar that splits terminals
+- horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ try:
++ horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ except TypeError:
++ horizontalBar = 0
+ # Vertical distance between two terminals
+ distance = current_geo['offset_y'] - (possible_geo['offset_y'] + possible_geo['span_y'])
+ if new_edge < edge:
+@@ -1085,6 +1092,10 @@
+ '''We want to find terminals that are fully below the bottom
+ border, but closest in the y direction, breaking ties via
+ the closest cursor x position.'''
++ if len(possible_geo.keys()) == 0:
++ dbg('_match_right: no possible geo, bailing')
++ return False
++
+ #print "matching down..."
+ # bottom edge of the current terminal
+ edge = current_geo['origin_y']+current_geo['span_y']
+@@ -1093,7 +1104,10 @@
+ #print "edge: %d new_edge: %d" % (edge, new_edge)
+
+ # Width of the horizontal bar that splits terminals
+- horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ try:
++ horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ except TypeError:
++ horizontalBar = 0
+ # Vertical distance between two terminals
+ distance = possible_geo['offset_y'] - (current_geo['offset_y'] + current_geo['span_y'])
+ if new_edge > edge:
+@@ -1126,6 +1140,10 @@
+ '''We want to find terminals that are fully to the left of
+ the left-side border, but closest in the x direction, breaking
+ ties via the closest cursor y position.'''
++ if len(possible_geo.keys()) == 0:
++ dbg('_match_right: no possible geo, bailing')
++ return False
++
+ #print "matching left..."
+ # left-side edge of the current terminal
+ edge = current_geo['origin_x']
+@@ -1133,12 +1151,21 @@
+ new_edge = possible_geo['origin_x']+possible_geo['span_x']
+
+ # Width of the horizontal bar that splits terminals
+- horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ try:
++ horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ except TypeError:
++ horizontalBar = 0
+ # Width of the vertical bar that splits terminals
+ if self.term_list[0].is_scrollbar_present():
+- verticalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0].get_parent().style_get_property('scroll-arrow-vlength')
++ try:
++ verticalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0].get_parent().style_get_property('scroll-arrow-vlength')
++ except TypeError:
++ horizontalBar = 0
+ else:
+- verticalBar = self.term_list[0].get_parent().style_get_property('handle-size')
++ try:
++ verticalBar = self.term_list[0].get_parent().style_get_property('handle-size')
++ except TypeError:
++ horizontalBar = 0
+ # Horizontal distance between two terminals
+ distance = current_geo['offset_x'] - (possible_geo['offset_x'] + possible_geo['span_x'])
+ if new_edge <= edge:
+@@ -1167,6 +1194,10 @@
+ '''We want to find terminals that are fully to the right of
+ the right-side border, but closest in the x direction, breaking
+ ties via the closest cursor y position.'''
++ if len(possible_geo.keys()) == 0:
++ dbg('_match_right: no possible geo, bailing')
++ return False
++
+ #print "matching right..."
+ # right-side edge of the current terminal
+ edge = current_geo['origin_x']+current_geo['span_x']
+@@ -1175,12 +1206,21 @@
+ #print "edge: %d new_edge: %d" % (edge, new_edge)
+
+ # Width of the horizontal bar that splits terminals
+- horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ try:
++ horizontalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0]._titlebox.get_allocation().height
++ except TypeError:
++ horizontalBar = 0
+ # Width of the vertical bar that splits terminals
+ if self.term_list[0].is_scrollbar_present():
+- verticalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0].get_parent().style_get_property('scroll-arrow-vlength')
++ try:
++ verticalBar = self.term_list[0].get_parent().style_get_property('handle-size') + self.term_list[0].get_parent().style_get_property('scroll-arrow-vlength')
++ except TypeError:
++ verticalBar = 0
+ else:
+- verticalBar = self.term_list[0].get_parent().style_get_property('handle-size')
++ try:
++ verticalBar = self.term_list[0].get_parent().style_get_property('handle-size')
++ except TypeError:
++ verticalBar = 0
+ # Horizontal distance between two terminals
+ distance = possible_geo['offset_x'] - (current_geo['offset_x'] + current_geo['span_x'])
+ if new_edge >= edge:
More information about the Python-apps-commits
mailing list