Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/TextThought.py
diff options
context:
space:
mode:
authormascha@ma-scha.de <mascha@ma-scha.de@8f060a39-251c-0410-b1f3-431655927647>2008-03-25 13:17:54 (GMT)
committer mascha@ma-scha.de <mascha@ma-scha.de@8f060a39-251c-0410-b1f3-431655927647>2008-03-25 13:17:54 (GMT)
commitdfadb54e682f4ea74c1562c4e9fdbc122d540176 (patch)
tree3e27dab8ff4bd173dd06c2d887db16b3fab9756a /src/TextThought.py
parentaaa9008a5abd529e4bc94c28296b60824a91c13c (diff)
2008-03-25 Martin Schaaf <mascha@ma-scha.de>
* src/ImageThought.py * src/TextThought.py * src/DrawingThought.py * src/utils.py o show a bigger border if a thought has extended info, fixes issue 33 git-svn-id: http://labyrinth.googlecode.com/svn/trunk@218 8f060a39-251c-0410-b1f3-431655927647
Diffstat (limited to 'src/TextThought.py')
-rw-r--r--src/TextThought.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/TextThought.py b/src/TextThought.py
index b773006..23c8c23 100644
--- a/src/TextThought.py
+++ b/src/TextThought.py
@@ -304,7 +304,10 @@ class TextThought (BaseThought.BaseThought):
if not self.ul or not self.lr:
print "Warning: Trying to draw unfinished box "+str(self.identity)+". Aborting."
return
- utils.draw_thought_outline (context, self.ul, self.lr, self.background_color, self.am_selected, self.am_primary, utils.STYLE_NORMAL)
+ if len (self.extended_buffer.get_text()) == 0:
+ utils.draw_thought_outline (context, self.ul, self.lr, self.background_color, self.am_selected, self.am_primary, utils.STYLE_NORMAL)
+ else:
+ utils.draw_thought_outline (context, self.ul, self.lr, self.background_color, self.am_selected, self.am_primary, utils.STYLE_EXTENDED_CONTENT)
else:
if prefs.get_direction() == gtk.TEXT_DIR_LTR:
@@ -876,7 +879,7 @@ class TextThought (BaseThought.BaseThought):
self.element.appendChild (elem)
elem.setAttribute("start", str(r[0]))
elem.setAttribute("end", str(r[1]))
- elem.setAttribute("type", "bold")
+ elem.setAttribute("type", "bold")
elif x.type == pango.ATTR_STYLE and x.value == pango.STYLE_ITALIC:
elem = doc.createElement ("attribute")
self.element.appendChild (elem)
@@ -1265,7 +1268,7 @@ class TextThought (BaseThought.BaseThought):
old_attrs,
self.attributes.copy()))
self.recalc_edges()
-
+
def set_underline (self, active):
if not self.editing:
return
@@ -1344,4 +1347,5 @@ class TextThought (BaseThought.BaseThought):
self.undo_attr_cb,
old_attrs,
self.attributes.copy()))
- self.recalc_edges()
+ self.recalc_edges()
+