Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/chat
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-04-23 03:02:25 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-04-23 03:02:25 (GMT)
commit68b991404ee7bd3bde1300d456a46d863ff4d54a (patch)
treeb9b8c66b036283381fb5e4917c12fd6e5bdbea6a /chat
parent9b14f7e5788a73d3091f96053930ea0b83f06a00 (diff)
Set styles on current selection
Diffstat (limited to 'chat')
-rw-r--r--chat/richtext.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/chat/richtext.py b/chat/richtext.py
index 925613d..7996547 100644
--- a/chat/richtext.py
+++ b/chat/richtext.py
@@ -17,9 +17,15 @@ class RichTextBuffer(gtk.TextBuffer):
def apply_tag(self, tag_name):
self.active_tags.append(tag_name)
+
+ [start, end] = self.get_selection_bounds()
+ self.apply_tag_by_name(tag_name, start, end)
def unapply_tag(self, tag_name):
self.active_tags.remove(tag_name)
+
+ [start, end] = self.get_selection_bounds()
+ self.remove_tag_by_name(tag_name, start, end)
def __create_tags(self):
tag = self.create_tag("bold")