|
|
|
@ -24,12 +24,10 @@ gobject.threads_init()
|
|
|
|
|
|
|
|
|
|
import logging |
|
|
|
|
import threading |
|
|
|
|
import Queue |
|
|
|
|
import re |
|
|
|
|
import urllib2 |
|
|
|
|
import webbrowser |
|
|
|
|
import gettext |
|
|
|
|
import time |
|
|
|
|
|
|
|
|
|
from cgi import escape as html_escape |
|
|
|
|
|
|
|
|
@ -54,13 +52,13 @@ N_ = t.ngettext
|
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
|
# String with the format to the message |
|
|
|
|
# ---------------------------------------------------------------------- |
|
|
|
|
MESSAGE_FORMAT = '%(favourite_star)s' \ |
|
|
|
|
'<b>%(full_name)s</b> ' \ |
|
|
|
|
'<small>(%(username)s' \ |
|
|
|
|
'%(message_type)s' \ |
|
|
|
|
')</small>:' \ |
|
|
|
|
'%(read_status)s\n' \ |
|
|
|
|
'%(message)s\n' \ |
|
|
|
|
MESSAGE_FORMAT = '%(favourite_star)s' \ |
|
|
|
|
'<b>%(full_name)s</b> ' \ |
|
|
|
|
'<small>(%(username)s' \ |
|
|
|
|
'%(message_type)s' \ |
|
|
|
|
')</small>:' \ |
|
|
|
|
'%(read_status)s\n' \ |
|
|
|
|
'%(message)s\n' \ |
|
|
|
|
'<small>%(message_age)s</small>' |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -493,7 +491,6 @@ class Interface(object):
|
|
|
|
|
"""Create the widgets related to the update box""" |
|
|
|
|
self._update_text = gtk.TextView() |
|
|
|
|
self._update_text.set_property('wrap-mode', gtk.WRAP_WORD) |
|
|
|
|
text_buffer = self._update_text.get_buffer() |
|
|
|
|
|
|
|
|
|
self._update_button = gtk.Button(label='Send') |
|
|
|
|
self._update_button.connect('clicked', self._update_status) |
|
|
|
@ -502,7 +499,6 @@ class Interface(object):
|
|
|
|
|
self._cancel_button = gtk.Button(label='Cancel') |
|
|
|
|
self._cancel_button.connect('clicked', self._clear_text) |
|
|
|
|
|
|
|
|
|
info_box = gtk.HBox(True, 0) |
|
|
|
|
self._count_label = gtk.Label() |
|
|
|
|
self._count_label.set_justify(gtk.JUSTIFY_LEFT) |
|
|
|
|
self._reply_label = gtk.Label() |
|
|
|
@ -761,7 +757,6 @@ class Interface(object):
|
|
|
|
|
iter = model.get_iter_first() |
|
|
|
|
path = model.get_path(iter) |
|
|
|
|
|
|
|
|
|
cell_rectangle = widget.get_cell_area(path, column) |
|
|
|
|
width = win_width - 70 # 48 = icon size |
|
|
|
|
# TODO: Find out where those 12 pixels came from and/or if they |
|
|
|
|
# are platform specific. |
|
|
|
@ -841,7 +836,7 @@ class Interface(object):
|
|
|
|
|
child.get_child().grab_focus() # notebook have ScrolledWindows, |
|
|
|
|
# TreeViews inside that. |
|
|
|
|
|
|
|
|
|
self._message_selected(child.get_child()); |
|
|
|
|
self._message_selected(child.get_child()) |
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
def _quit_app(self, widget=None, user_data=None): |
|
|
|
@ -934,13 +929,13 @@ class Interface(object):
|
|
|
|
|
confirm = gtk.MessageDialog(parent=self._main_window, |
|
|
|
|
type=gtk.MESSAGE_QUESTION, |
|
|
|
|
message_format=_('Delete this message?'), |
|
|
|
|
buttons=gtk.BUTTONS_YES_NO); |
|
|
|
|
buttons=gtk.BUTTONS_YES_NO) |
|
|
|
|
option = confirm.run() |
|
|
|
|
confirm.hide() |
|
|
|
|
|
|
|
|
|
_log.debug("Option selected: %s" % (option)) |
|
|
|
|
if option == -9: |
|
|
|
|
_log.debug("Delete cancelled"); |
|
|
|
|
_log.debug("Delete cancelled") |
|
|
|
|
return False |
|
|
|
|
|
|
|
|
|
self._update_statusbar(_('Deleting message...')) |
|
|
|
|