Browse Source

pep8 fixes

master
Julio Biason 15 years ago
parent
commit
177f6fd718
  1. 1
      mitterlib/network/__init__.py
  2. 1
      mitterlib/network/twitter.py
  3. 1
      mitterlib/ui/helpers/timesince.py
  4. 27
      mitterlib/ui/ui_pygtk.py

1
mitterlib/network/__init__.py

@ -19,6 +19,7 @@
import logging import logging
import os.path import os.path
import urllib2
from mitterlib.network.networkbase import NetworkData from mitterlib.network.networkbase import NetworkData
from mitterlib import module_search from mitterlib import module_search

1
mitterlib/network/twitter.py

@ -25,7 +25,6 @@ import base64
import htmlentitydefs import htmlentitydefs
import re import re
import warnings import warnings
import htmlentitydefs
import gettext import gettext
from httplib import BadStatusLine from httplib import BadStatusLine

1
mitterlib/ui/helpers/timesince.py

@ -18,7 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime import datetime
import math
import time import time

27
mitterlib/ui/ui_pygtk.py

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

Loading…
Cancel
Save