Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Jourdan <b.vehikel@googlemail.com>2010-03-31 19:24:44 (GMT)
committer Thomas Jourdan <b.vehikel@googlemail.com>2010-03-31 19:24:44 (GMT)
commite3cd0ff11df8565be4c042d765f51db186fd6431 (patch)
tree4f40f21ba56cd5a49ae3f1a21a9fbecd165d2c6e
parent69724a05bd07d447ea27c0f640bbd3046313646e (diff)
Bug fixing ancestor page and history
-rw-r--r--ep_page_ancestors.py14
-rw-r--r--ka_history.py2
-rw-r--r--po/Kandid.pot8
-rw-r--r--test_history.py2
4 files changed, 14 insertions, 12 deletions
diff --git a/ep_page_ancestors.py b/ep_page_ancestors.py
index 3093d3d..2955db7 100644
--- a/ep_page_ancestors.py
+++ b/ep_page_ancestors.py
@@ -77,9 +77,9 @@ class AncestorsController(object):
pre: widget is not None
"""
# draw precalculated protozoon stored in the surface cache.
- ka_debug.info('on_ancestrosarea_expose: ' + widget.name + ' '
- + str(widget.allocation.width)
- + 'x' + str(widget.allocation.height))
+# ka_debug.info('on_ancestrosarea_expose: ' + widget.name + ' '
+# + str(widget.allocation.width)
+# + 'x' + str(widget.allocation.height))
ctx = widget.window.cairo_create()
# Restrict Cairo to the exposed area; avoid extra work
ctx.rectangle(event.area.x, event.area.y,
@@ -123,7 +123,7 @@ class AncestorsController(object):
def _paint_next(self, ctx, xpos, ypos, my_id):
if my_id is not None and self._history.contains(my_id):
- ka_debug.info('my_id: ' + my_id)
+# ka_debug.info('my_id: ' + my_id)
surface = self._history.get_surface(my_id)
width = surface.get_width() if surface is not None else 200
height = surface.get_height() if surface is not None else 200
@@ -143,10 +143,12 @@ class AncestorsController(object):
ctx.restore()
if surface is not None:
- ka_debug.info('(xpos, ypos): %d, %d' % (xpos, ypos))
+# ka_debug.info('(xpos, ypos): %d, %d' % (xpos, ypos))
+ ctx.save()
ctx.set_operator(cairo.OPERATOR_SOURCE)
ctx.rectangle(xpos-width/2, ypos, width, height)
ctx.clip()
ctx.set_source_surface(surface, xpos-width/2, ypos)
ctx.paint()
- ctx.reset_clip()
+# ctx.reset_clip() #TODO Required argument 'cr' not found
+ ctx.restore()
diff --git a/ka_history.py b/ka_history.py
index 46bfa55..8ca1e08 100644
--- a/ka_history.py
+++ b/ka_history.py
@@ -83,7 +83,7 @@ class KandidHistory(object):
"""
if my_id not in self.parents:
self.parents[my_id] = KandidHistory.Item(None, None)
- self.parents[my_id].ref_count += -1
+#!! self.parents[my_id].ref_count += -1
if self.parents[my_id].surface is None:
self.surfaces_referenced += 1
self.parents[my_id].surface = my_surface
diff --git a/po/Kandid.pot b/po/Kandid.pot
index c994955..b94761a 100644
--- a/po/Kandid.pot
+++ b/po/Kandid.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2010-03-28 16:40+0200\n"
+"POT-Creation-Date: 2010-03-31 20:16+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -168,16 +168,16 @@ msgstr ""
msgid "Square root of number of edges: "
msgstr ""
-#: activity.py:180
+#: activity.py:179
msgid "Activity is shared."
msgstr ""
-#: activity.py:189 activity.py:236
+#: activity.py:188 activity.py:235
#, python-format
msgid "I am '%s', my handle in that group is %u."
msgstr ""
-#: activity.py:232
+#: activity.py:231
msgid "Joined an existing shared activity."
msgstr ""
diff --git a/test_history.py b/test_history.py
index 3187910..7b15ca9 100644
--- a/test_history.py
+++ b/test_history.py
@@ -66,7 +66,7 @@ class TestKandidHistory(unittest.TestCase):
def test_history_overflow(self):
history = ka_history.KandidHistory.instance()
history.clear()
- self._add(6, history)
+ self._add(7, history)
for my_id, parent in history.parents.iteritems():
print my_id, parent