Browse Source

ui_pygtk: cleaning up formatting errors reported by pyflakes

master
Gergely Imreh 16 years ago
parent
commit
5d9709ad66
  1. 21
      mitterlib/ui/ui_pygtk.py

21
mitterlib/ui/ui_pygtk.py

@ -70,9 +70,9 @@ class _IdleObject(gobject.GObject):
"""
def __init__(self):
gobject.GObject.__init__(self)
def emit(self, *args):
gobject.idle_add(gobject.GObject.emit,self,*args)
gobject.idle_add(gobject.GObject.emit, self, *args)
class _WorkerThread(threading.Thread, _IdleObject):
@ -86,17 +86,17 @@ class _WorkerThread(threading.Thread, _IdleObject):
(gobject.TYPE_PYOBJECT,)), # list/networkdata
"exception": (
gobject.SIGNAL_RUN_LAST,
gobject.TYPE_NONE,
gobject.TYPE_NONE,
(gobject.TYPE_PYOBJECT,)) # The exception
}
def __init__(self, function, *args, **kwargs):
threading.Thread.__init__(self)
_IdleObject.__init__(self)
self._function = function
self._args = args
self._kwargs = kwargs
def run(self):
# call the function
_log.debug('Thread %s calling %s', self.name, str(self._function))
@ -137,8 +137,8 @@ class _ThreadManager(object):
# not actually a widget. It's the object that emitted the signal, in
# this case, the _WorkerThread object.
thread_id = widget.name
thread_id = widget.name
_log.debug('Thread %s completed, %d threads in the queue', thread_id,
len(self._thread_pool))
@ -378,7 +378,7 @@ class Interface(object):
'Settings', gtk.STOCK_PREFERENCES)
#settings_action.connect('activate', self.show_settings)
self._update_action = gtk.Action('Update', '_Update',
self._update_action = gtk.Action('Update', '_Update',
'Update your status', gtk.STOCK_ADD)
self._update_action.set_property('sensitive', False)
self._update_action.connect('activate', self._update_status)
@ -601,7 +601,6 @@ class Interface(object):
# ------------------------------------------------------------
# Widget callback functions
# ------------------------------------------------------------
def _count_chars(self, text_buffer):
"""Count the number of chars in the edit field and update the
label that shows the available space."""
@ -775,7 +774,6 @@ class Interface(object):
# ------------------------------------------------------------
# Required functions for all interfaces
# ------------------------------------------------------------
def __init__(self, connection, options):
"""Start the interface. `connection` is the :class:`Networks` object
with all the available networks. `options` is the :class:`ConfigOpt`
@ -813,7 +811,7 @@ class Interface(object):
self._threads = _ThreadManager()
# queue the first fetch
self._threads.add_work(self._post_get_messages,
self._threads.add_work(self._post_get_messages,
self._exception_get_messages,
self._connection.messages)
@ -887,4 +885,3 @@ class Interface(object):
default='blue',
conflict_group='interface',
is_cmd_option=False)

Loading…
Cancel
Save