PEP8 cleanup: fix number of blank lines
Caught by pep8. Reviewed-by: James Cameron <quozl@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
This commit is contained in:
@@ -98,6 +98,7 @@ J_DBUS_INTERFACE = 'org.laptop.Journal'
|
||||
|
||||
CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'
|
||||
|
||||
|
||||
class _ActivitySession(gobject.GObject):
|
||||
|
||||
__gsignals__ = {
|
||||
|
||||
@@ -291,6 +291,7 @@ class ConfirmationAlert(Alert):
|
||||
self.add_button(gtk.RESPONSE_OK, _('Ok'), icon)
|
||||
icon.show()
|
||||
|
||||
|
||||
class ErrorAlert(Alert):
|
||||
"""
|
||||
This is a ready-made one button (Ok) alert.
|
||||
@@ -336,6 +337,7 @@ class ErrorAlert(Alert):
|
||||
self.add_button(gtk.RESPONSE_OK, _('Ok'), icon)
|
||||
icon.show()
|
||||
|
||||
|
||||
class _TimeoutIcon(hippo.CanvasText, hippo.CanvasItem):
|
||||
"""An icon with a round border"""
|
||||
__gtype_name__ = 'AlertTimeoutIcon'
|
||||
|
||||
@@ -669,6 +669,7 @@ class Invoker(gobject.GObject):
|
||||
if not self.props.cache_palette:
|
||||
self.set_palette(None)
|
||||
|
||||
|
||||
class WidgetInvoker(Invoker):
|
||||
|
||||
def __init__(self, parent=None, widget=None):
|
||||
|
||||
@@ -463,11 +463,13 @@ class Activity(gobject.GObject):
|
||||
_logger.debug('%r: leaving', self)
|
||||
self.telepathy_text_chan.Close()
|
||||
|
||||
|
||||
class _BaseCommand(gobject.GObject):
|
||||
__gsignals__ = {
|
||||
'finished': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
|
||||
([object])),
|
||||
}
|
||||
|
||||
def __init__(self):
|
||||
gobject.GObject.__init__(self)
|
||||
|
||||
@@ -532,6 +534,7 @@ class _ShareCommand(_BaseCommand):
|
||||
self._finished = True
|
||||
self.emit('finished', error)
|
||||
|
||||
|
||||
class _JoinCommand(_BaseCommand):
|
||||
def __init__(self, connection, room_handle):
|
||||
_BaseCommand.__init__(self)
|
||||
|
||||
@@ -144,6 +144,7 @@ class BaseBuddy(gobject.GObject):
|
||||
|
||||
class Buddy(BaseBuddy):
|
||||
__gtype_name__ = 'PresenceBuddy'
|
||||
|
||||
def __init__(self, account_path, contact_id):
|
||||
_logger.debug('Buddy.__init__')
|
||||
BaseBuddy.__init__(self)
|
||||
|
||||
@@ -31,12 +31,14 @@ from telepathy.constants import CONNECTION_STATUS_CONNECTED
|
||||
ACCOUNT_MANAGER_SERVICE = 'org.freedesktop.Telepathy.AccountManager'
|
||||
ACCOUNT_MANAGER_PATH = '/org/freedesktop/Telepathy/AccountManager'
|
||||
|
||||
|
||||
class Connection(object):
|
||||
def __init__(self, account_path, connection):
|
||||
self.account_path = account_path
|
||||
self.connection = connection
|
||||
self.connected = False
|
||||
|
||||
|
||||
class ConnectionManager(object):
|
||||
"""Track available telepathy connections"""
|
||||
|
||||
@@ -108,8 +110,8 @@ class ConnectionManager(object):
|
||||
return account_path
|
||||
return None
|
||||
|
||||
_connection_manager = None
|
||||
|
||||
_connection_manager = None
|
||||
def get_connection_manager():
|
||||
global _connection_manager
|
||||
if not _connection_manager:
|
||||
|
||||
@@ -37,6 +37,7 @@ from telepathy.interfaces import ACCOUNT, \
|
||||
CONNECTION
|
||||
from telepathy.constants import HANDLE_TYPE_CONTACT
|
||||
|
||||
|
||||
_logger = logging.getLogger('sugar.presence.presenceservice')
|
||||
|
||||
ACCOUNT_MANAGER_SERVICE = 'org.freedesktop.Telepathy.AccountManager'
|
||||
@@ -44,6 +45,7 @@ ACCOUNT_MANAGER_PATH = '/org/freedesktop/Telepathy/AccountManager'
|
||||
|
||||
CONN_INTERFACE_ACTIVITY_PROPERTIES = 'org.laptop.Telepathy.ActivityProperties'
|
||||
|
||||
|
||||
class PresenceService(gobject.GObject):
|
||||
"""Provides simplified access to the Telepathy framework to activities"""
|
||||
__gsignals__ = {
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@ UNSTABLE. Used only internally by Activity and jarabe.
|
||||
import gtk
|
||||
import logging
|
||||
|
||||
|
||||
def _property_get_trapped(window, prop, prop_type):
|
||||
gtk.gdk.error_trap_push()
|
||||
|
||||
@@ -35,6 +36,7 @@ def _property_get_trapped(window, prop, prop_type):
|
||||
|
||||
return prop_info
|
||||
|
||||
|
||||
def _property_change_trapped(window, prop, prop_type, format, mode, data):
|
||||
gtk.gdk.error_trap_push()
|
||||
|
||||
@@ -83,4 +85,3 @@ def set_activity_id(window, activity_id):
|
||||
def set_bundle_id(window, bundle_id):
|
||||
_property_change_trapped(window, '_SUGAR_BUNDLE_ID', 'STRING', 8,
|
||||
gtk.gdk.PROP_MODE_REPLACE, bundle_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user