From 5cebe135ac06c890590953e0fbe15ca8a876b79e Mon Sep 17 00:00:00 2001 From: Morgan Collett Date: Wed, 24 Oct 2007 11:17:49 +0000 Subject: #4320: Show URLs with bold and underline, not blue text --- diff --git a/NEWS b/NEWS index 682d78a..1880796 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -* #4320: Regexp for better URL handling +* #4320: better URL handling and display (morgs) * #4331: Don't crash/ignore non-Sugar buddies (morgs) 26 diff --git a/chat.py b/chat.py index e40d0fc..451e1bf 100644 --- a/chat.py +++ b/chat.py @@ -238,7 +238,14 @@ class Chat(Activity): xalign=hippo.ALIGNMENT_START) rb.append(message) url = text[match.start():match.end()] - message = hippo.CanvasLink(text=url) + message = hippo.CanvasLink( + text=url, + color=text_color, + font_desc=FONT_BOLD.get_pango_desc(), + ) + attrs = pango.AttrList() + attrs.insert(pango.AttrUnderline(pango.UNDERLINE_SINGLE, 0, 32767)) + message.set_property("attributes", attrs) message.connect('activated', self._link_activated_cb) rb.append(message) text = text[match.end():] -- cgit v0.9.1