From 4fe175617d93b2a8f9dea1f0cf92beeb3fa5dd64 Mon Sep 17 00:00:00 2001 From: flavio Date: Tue, 21 Aug 2012 18:36:23 +0000 Subject: Corrections in ChatBox --- diff --git a/.gitignore b/.gitignore index 1c1c194..88bd8c8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.xo *.pyc +*.bak .*.sw[op] locale .sweets diff --git a/chat/box.py b/chat/box.py index 1b32d5f..adf2004 100644 --- a/chat/box.py +++ b/chat/box.py @@ -217,10 +217,11 @@ class TextBox(Gtk.TextView): foreground="blue", underline=Pango.Underline.SINGLE) tag.set_data("url", word) palette = _URLMenu(word) - palette.connect('enter-notify-event', - self.__palette_mouse_enter_cb) - palette.connect('leave-notify-event', - self.__palette_mouse_leave_cb) + # FIXME: TypeError: _URLMenu: unknown signal name: enter-notify-event - leave-notify-event + #palette.connect('enter-notify-event', + # self.__palette_mouse_enter_cb) + #palette.connect('leave-notify-event', + # self.__palette_mouse_leave_cb) tag.set_data('palette', palette) buf.insert_with_tags(self.iter_text, word, tag, self.fg_tag) @@ -436,7 +437,7 @@ class _URLMenu(Palette): def __init__(self, url): Palette.__init__(self, url) self.owns_clipboard = False - self.url = _url_check_protocol(url) + self.url = self._url_check_protocol(url) menu_item = MenuItem(_('Copy to Clipboard'), 'edit-copy') menu_item.connect('activate', self._copy_to_clipboard_cb) self.menu.append(menu_item) @@ -474,7 +475,7 @@ class _URLMenu(Palette): logging.debug('clipboard_clear_cb') self.owns_clipboard = False - def _url_check_protocol(url): + def _url_check_protocol(self, url): """Check that the url has a protocol, otherwise prepend https:// url -- string Returns url -- string -- cgit v0.9.1