diff --git a/README.html b/README.html index 740963f1583f4e02c04d5dcb3e919eaf011ee093..5624b12936411adef14e06b209cb326603741a32 100644 --- a/README.html +++ b/README.html @@ -38,7 +38,6 @@ Gajim is a GTK+ app that loves GNOME. You can do 'make' so you don't require gno <li>notification-daemon or notify-python (and D-Bus) to get cooler popups</li> <li>D-Bus running to have gajim-remote working. Some distributions split dbus-x11, which is needed for dbus to work with Gajim. Version >= 0.80 is required.</li> <li>python-dbus bindings (>=0.81)</li> -<li>python-sexy to have clickable URLs in chat windows</li> <li>python-kerberos to use GSSAPI authentification. Note: version1.1 or higher is required</li> </ul> diff --git a/data/glade/message_window.glade b/data/glade/message_window.glade index 7e86aad151586bd45e0d4b93f0cfd19914f65207..e58931f0d079a94ff130e1d65272b8ac280a0696 100644 --- a/data/glade/message_window.glade +++ b/data/glade/message_window.glade @@ -69,7 +69,17 @@ </packing> </child> <child> - <placeholder/> + <widget class="GtkLabel" id="banner_label"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">label</property> + <property name="use_markup">True</property> + <property name="selectable">True</property> + <signal name="populate_popup" handler="on_banner_label_populate_popup"/> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> @@ -948,7 +958,16 @@ </packing> </child> <child> - <placeholder/> + <widget class="GtkLabel" id="banner_label"> + <property name="visible">True</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">label</property> + <property name="use_markup">True</property> + <property name="selectable">True</property> + </widget> + <packing> + <property name="position">1</property> + </packing> </child> </widget> <packing> diff --git a/debian/control b/debian/control index 377940f115d6dec32ff2aa86b567db22e1ab49d1..8832ee1b2f18c75aa80451d95c4c60abea261e55 100644 --- a/debian/control +++ b/debian/control @@ -15,7 +15,7 @@ Architecture: any XB-Python-Version: ${python:Versions} Depends: ${misc:Depends}, ${shlibs:Depends}, ${python:Depends}, python-support (>= 0.7.1), python-glade2 (>= 2.12.0), python-gtk2 (>= 2.12.0), dnsutils Recommends: dbus, python-dbus, notification-daemon, python-gnupginterface, python-openssl, python-crypto -Suggests: python-gconf, python-gnome2, nautilus-sendto, avahi-daemon, python-avahi, network-manager, libgtkspell0, aspell-en, python-gnomekeyring, gnome-keyring, python-sexy, python-kerberos (>= 1.1), texlive-latex-base, dvipng +Suggests: python-gconf, python-gnome2, nautilus-sendto, avahi-daemon, python-avahi, network-manager, libgtkspell0, aspell-en, python-gnomekeyring, gnome-keyring, python-kerberos (>= 1.1), texlive-latex-base, dvipng Description: Jabber client written in PyGTK Gajim is a Jabber client. It has a tabbed user interface with normal chats, group chats, and has many features such as, TLS, GPG, SSL, multiple accounts, diff --git a/src/chat_control.py b/src/chat_control.py index ca5ce6e586520dcc1e8edfcd3f5f8f25fa123820..263e53df4efd84e7d37a487076ddc9473d50d5eb 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -96,7 +96,10 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): def make_href(self, match): url_color = gajim.config.get('urlmsgcolor') - return '<a href="%s"><span color="%s">%s</span></a>' % (match.group(), + url = match.group() + if not '://' in url: + url = 'http://' + url + return '<a href="%s"><span color="%s">%s</span></a>' % (url, url_color, match.group()) def get_font_attrs(self): @@ -257,21 +260,10 @@ class ChatControlBase(MessageControl, ChatCommandProcessor, CommandTools): self.urlfinder = re.compile( r"(www\.(?!\.)|[a-z][a-z0-9+.-]*://)[^\s<>'\"]+[^!,\.\s<>\)'\"\]]") - if gajim.HAVE_PYSEXY: - import sexy - self.banner_status_label = sexy.UrlLabel() - self.banner_status_label.connect('url_activated', - self.status_url_clicked) - else: - self.banner_status_label = gtk.Label() - self.banner_status_label.set_selectable(True) - self.banner_status_label.set_alignment(0,0.5) - self.banner_status_label.connect('populate_popup', + self.banner_status_label = self.xml.get_widget('banner_label') + id_ = self.banner_status_label.connect('populate_popup', self.on_banner_label_populate_popup) - - banner_vbox = self.xml.get_widget('banner_vbox') - banner_vbox.pack_start(self.banner_status_label) - self.banner_status_label.show() + self.handlers[id_] = self.banner_status_label # Init DND self.TARGET_TYPE_URI_LIST = 80 @@ -1843,14 +1835,11 @@ class ChatControl(ChatControlBase): label_tooltip = '%s%s' % (name, acct_info) if status_escaped: - if gajim.HAVE_PYSEXY: - status_text = self.urlfinder.sub(self.make_href, status_escaped) - status_text = '<span %s>%s</span>' % (font_attrs_small, status_text) - else: - status_text = '<span %s>%s</span>' % (font_attrs_small, status_escaped) + status_text = self.urlfinder.sub(self.make_href, status_escaped) + status_text = '<span %s>%s</span>' % (font_attrs_small, status_escaped) self.banner_status_label.set_tooltip_text(status) - self.banner_status_label.show() self.banner_status_label.set_no_show_all(False) + self.banner_status_label.show() else: status_text = '' self.banner_status_label.hide() diff --git a/src/common/gajim.py b/src/common/gajim.py index aef963e8b6d51f10c5816b7ebcedd082fe4ae0a2..7be22b2fc7ad9c508158502b63ec3704591243a8 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -166,12 +166,6 @@ try: except ImportError: HAVE_PYCRYPTO = False -HAVE_PYSEXY = True -try: - import sexy -except ImportError: - HAVE_PYSEXY = False - HAVE_GPG = True try: import GnuPGInterface diff --git a/src/features_window.py b/src/features_window.py index b806eed88afebc86d1f85078992944c57677a515..336bbd4675310112f0be8b2402ccac01e85d0a9d 100644 --- a/src/features_window.py +++ b/src/features_window.py @@ -101,10 +101,6 @@ class FeaturesWindow: _('Generate XHTML output from RST code (see http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html).'), _('Requires python-docutils.'), _('Requires python-docutils.')), - _('Banners and clickable links'): (self.pysexy_available, - _('Ability to have clickable URLs in chat and groupchat window banners.'), - _('Requires python-sexy.'), - _('Requires python-sexy.')), _('Audio / Video'): (self.farsight_available, _('Ability to start audio and video chat.'), _('Requires python-farsight.'), @@ -256,9 +252,6 @@ class FeaturesWindow: return False return True - def pysexy_available(self): - return gajim.HAVE_PYSEXY - def farsight_available(self): return gajim.HAVE_FARSIGHT diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 2b512bab37577c7e65ceddfd023f332e79e85fe9..e5ebd439e2c1773b9f2ae81dcc69227a6a7684cf 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -634,17 +634,13 @@ class GroupchatControl(ChatControlBase): if self.subject: subject = helpers.reduce_chars_newlines(self.subject, max_lines=2) subject = gobject.markup_escape_text(subject) - if gajim.HAVE_PYSEXY: - subject_text = self.urlfinder.sub(self.make_href, subject) - subject_text = '<span %s>%s</span>' % (font_attrs_small, - subject_text) - else: - subject_text = '<span %s>%s</span>' % (font_attrs_small, subject) + subject_text = self.urlfinder.sub(self.make_href, subject) + subject_text = '<span %s>%s</span>' % (font_attrs_small, subject_text) # tooltip must always hold ALL the subject self.event_box.set_tooltip_text(self.subject) - self.banner_status_label.show() self.banner_status_label.set_no_show_all(False) + self.banner_status_label.show() else: subject_text = '' self.event_box.set_has_tooltip(False)