diff --git a/mitterlib/network/__init__.py b/mitterlib/network/__init__.py index fae95b6..b1c71f1 100644 --- a/mitterlib/network/__init__.py +++ b/mitterlib/network/__init__.py @@ -19,6 +19,7 @@ import logging import os.path +import urllib2 from mitterlib.network.networkbase import NetworkData from mitterlib import module_search diff --git a/mitterlib/network/twitter.py b/mitterlib/network/twitter.py index dbdb952..329a33d 100644 --- a/mitterlib/network/twitter.py +++ b/mitterlib/network/twitter.py @@ -25,7 +25,6 @@ import base64 import htmlentitydefs import re import warnings -import htmlentitydefs import gettext from httplib import BadStatusLine diff --git a/mitterlib/ui/helpers/timesince.py b/mitterlib/ui/helpers/timesince.py index 5d88d74..e8972f9 100644 --- a/mitterlib/ui/helpers/timesince.py +++ b/mitterlib/ui/helpers/timesince.py @@ -18,7 +18,6 @@ # along with this program. If not, see . import datetime -import math import time diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 240404b..4797c1b 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -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' \ - '%(full_name)s ' \ - '(%(username)s' \ - '%(message_type)s' \ - '):' \ - '%(read_status)s\n' \ - '%(message)s\n' \ +MESSAGE_FORMAT = '%(favourite_star)s' \ + '%(full_name)s ' \ + '(%(username)s' \ + '%(message_type)s' \ + '):' \ + '%(read_status)s\n' \ + '%(message)s\n' \ '%(message_age)s' @@ -468,7 +466,7 @@ class Interface(object): view_messages_action.connect('activate', self._change_tab, 0) action_group.add_action_with_accel(view_messages_action, '1') - view_replies_action = gtk.Action('Replies', _('_Replies'), + view_replies_action = gtk.Action('Replies', _('_Replies'), _('Display replies'), None) view_replies_action.connect('activate', self._change_tab, 1) action_group.add_action_with_accel(view_replies_action, '2') @@ -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...'))