Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-10-16 16:20:03 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-11-24 19:22:02 (GMT)
commit80d7a68f08646ae8c05b1685502b0815d6196bf3 (patch)
tree386646dd555c2d74bd2ad9016b05f6fb559e09d2 /src
parent54dc55baad526a5b80273585cf414d401219df6a (diff)
PEP8 cleanup: fix spaces around operators and parentheses
Reviewed-by: James Cameron <quozl@laptop.org> Reviewed-by: Simon Schampijer <simon@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
Diffstat (limited to 'src')
-rw-r--r--src/jarabe/controlpanel/gui.py12
-rw-r--r--src/jarabe/controlpanel/inlinealert.py8
-rw-r--r--src/jarabe/controlpanel/sectionview.py10
-rw-r--r--src/jarabe/controlpanel/toolbar.py4
-rw-r--r--src/jarabe/desktop/activitieslist.py12
-rw-r--r--src/jarabe/desktop/favoriteslayout.py14
-rw-r--r--src/jarabe/desktop/favoritesview.py10
-rw-r--r--src/jarabe/desktop/grid.py5
-rw-r--r--src/jarabe/desktop/homebox.py10
-rw-r--r--src/jarabe/desktop/homewindow.py6
-rw-r--r--src/jarabe/desktop/keydialog.py2
-rw-r--r--src/jarabe/desktop/meshbox.py7
-rw-r--r--src/jarabe/desktop/schoolserver.py2
-rw-r--r--src/jarabe/desktop/transitionbox.py3
-rw-r--r--src/jarabe/frame/activitiestray.py3
-rw-r--r--src/jarabe/frame/clipboard.py2
-rw-r--r--src/jarabe/frame/clipboardtray.py2
-rw-r--r--src/jarabe/frame/eventarea.py8
-rw-r--r--src/jarabe/frame/frame.py4
-rw-r--r--src/jarabe/frame/notification.py6
-rw-r--r--src/jarabe/intro/window.py7
-rw-r--r--src/jarabe/journal/detailview.py2
-rw-r--r--src/jarabe/journal/journaltoolbox.py10
-rw-r--r--src/jarabe/journal/listmodel.py34
-rw-r--r--src/jarabe/journal/listview.py18
-rw-r--r--src/jarabe/journal/model.py6
-rw-r--r--src/jarabe/journal/objectchooser.py4
-rw-r--r--src/jarabe/journal/palettes.py7
-rw-r--r--src/jarabe/journal/volumestoolbar.py13
-rw-r--r--src/jarabe/model/adhoc.py2
-rw-r--r--src/jarabe/model/bundleregistry.py6
-rw-r--r--src/jarabe/model/friends.py8
-rw-r--r--src/jarabe/model/invites.py8
-rw-r--r--src/jarabe/model/neighborhood.py70
-rw-r--r--src/jarabe/model/network.py102
-rw-r--r--src/jarabe/model/shell.py31
-rw-r--r--src/jarabe/util/emulator.py14
-rw-r--r--src/jarabe/util/telepathy/connection_watcher.py2
-rw-r--r--src/jarabe/view/keyhandler.py46
-rw-r--r--src/jarabe/view/viewsource.py11
40 files changed, 245 insertions, 286 deletions
diff --git a/src/jarabe/controlpanel/gui.py b/src/jarabe/controlpanel/gui.py
index 4e2cbd1..4fa030b 100644
--- a/src/jarabe/controlpanel/gui.py
+++ b/src/jarabe/controlpanel/gui.py
@@ -368,14 +368,10 @@ class _SectionIcon(gtk.EventBox):
__gtype_name__ = "SugarSectionIcon"
__gproperties__ = {
- 'icon-name' : (str, None, None, None,
- gobject.PARAM_READWRITE),
- 'pixel-size' : (object, None, None,
- gobject.PARAM_READWRITE),
- 'xo-color' : (object, None, None,
- gobject.PARAM_READWRITE),
- 'title' : (str, None, None, None,
- gobject.PARAM_READWRITE)
+ 'icon-name': (str, None, None, None, gobject.PARAM_READWRITE),
+ 'pixel-size': (object, None, None, gobject.PARAM_READWRITE),
+ 'xo-color': (object, None, None, gobject.PARAM_READWRITE),
+ 'title': (str, None, None, None, gobject.PARAM_READWRITE),
}
def __init__(self, **kwargs):
diff --git a/src/jarabe/controlpanel/inlinealert.py b/src/jarabe/controlpanel/inlinealert.py
index 9c08c62..f970af4 100644
--- a/src/jarabe/controlpanel/inlinealert.py
+++ b/src/jarabe/controlpanel/inlinealert.py
@@ -37,11 +37,9 @@ class InlineAlert(gtk.HBox):
__gtype_name__ = 'SugarInlineAlert'
__gproperties__ = {
- 'msg' : (str, None, None, None,
- gobject.PARAM_READWRITE),
- 'icon' : (object, None, None,
- gobject.PARAM_WRITABLE)
- }
+ 'msg': (str, None, None, None, gobject.PARAM_READWRITE),
+ 'icon': (object, None, None, gobject.PARAM_WRITABLE),
+ }
def __init__(self, **kwargs):
diff --git a/src/jarabe/controlpanel/sectionview.py b/src/jarabe/controlpanel/sectionview.py
index 5b44161..edef59f 100644
--- a/src/jarabe/controlpanel/sectionview.py
+++ b/src/jarabe/controlpanel/sectionview.py
@@ -23,14 +23,12 @@ class SectionView(gtk.VBox):
__gtype_name__ = 'SugarSectionView'
__gsignals__ = {
- 'request-close': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([]))
- }
+ 'request-close': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
+ }
__gproperties__ = {
- 'is_valid' : (bool, None, None, True,
- gobject.PARAM_READWRITE)
- }
+ 'is_valid': (bool, None, None, True, gobject.PARAM_READWRITE),
+ }
_APPLY_TIMEOUT = 1000
diff --git a/src/jarabe/controlpanel/toolbar.py b/src/jarabe/controlpanel/toolbar.py
index 72b1be3..fca34a0 100644
--- a/src/jarabe/controlpanel/toolbar.py
+++ b/src/jarabe/controlpanel/toolbar.py
@@ -37,7 +37,7 @@ class MainToolbar(gtk.Toolbar):
([])),
'search-changed': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
- ([str]))
+ ([str])),
}
def __init__(self):
@@ -97,7 +97,7 @@ class SectionToolbar(gtk.Toolbar):
([])),
'accept-clicked': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
- ([]))
+ ([])),
}
def __init__(self):
diff --git a/src/jarabe/desktop/activitieslist.py b/src/jarabe/desktop/activitieslist.py
index 6856b36..6f815f0 100644
--- a/src/jarabe/desktop/activitieslist.py
+++ b/src/jarabe/desktop/activitieslist.py
@@ -43,8 +43,8 @@ class ActivitiesTreeView(gtk.TreeView):
__gtype_name__ = 'SugarActivitiesTreeView'
__gsignals__ = {
- 'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str]))
+ 'erase-activated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str])),
}
def __init__(self):
@@ -260,8 +260,8 @@ class CellRendererActivityIcon(CellRendererIcon):
__gtype_name__ = 'SugarCellRendererActivityIcon'
__gsignals__ = {
- 'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str]))
+ 'erase-activated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str])),
}
def __init__(self, tree_view):
@@ -383,8 +383,8 @@ class ActivityListPalette(ActivityPalette):
__gtype_name__ = 'SugarActivityListPalette'
__gsignals__ = {
- 'erase-activated' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str]))
+ 'erase-activated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str])),
}
def __init__(self, activity_info):
diff --git a/src/jarabe/desktop/favoriteslayout.py b/src/jarabe/desktop/favoriteslayout.py
index 433dd2d..e03e30b 100644
--- a/src/jarabe/desktop/favoriteslayout.py
+++ b/src/jarabe/desktop/favoriteslayout.py
@@ -439,7 +439,7 @@ class SunflowerLayout(RingLayout):
# removed to make room for the "active activity" icon.
x = r * cos(phi) + (width - icon_size) / 2
y = r * sin(phi) + (height - icon_size - \
- (style.GRID_CELL_SIZE / 2) ) / 2
+ (style.GRID_CELL_SIZE / 2)) / 2
# skip allocations outside the allocation box.
# give up once we can't fit
@@ -489,9 +489,9 @@ class BoxLayout(RingLayout):
cos = lambda r: cos_d(math.degrees(r))
sin = lambda r: cos_d(math.degrees(r) - 90)
- return RingLayout._calculate_position\
- (self, radius, icon_size, index, children_count,
- sin=sin, cos=cos)
+ return RingLayout._calculate_position(self, radius, icon_size, index,
+ children_count, sin=sin,
+ cos=cos)
class TriangleLayout(RingLayout):
@@ -547,6 +547,6 @@ class TriangleLayout(RingLayout):
cos = lambda r: cos_d(math.degrees(r))
sin = lambda r: sin_d(math.degrees(r))
- return RingLayout._calculate_position\
- (self, radius, icon_size, index, children_count,
- sin=sin, cos=cos)
+ return RingLayout._calculate_position(self, radius, icon_size, index,
+ children_count, sin=sin,
+ cos=cos)
diff --git a/src/jarabe/desktop/favoritesview.py b/src/jarabe/desktop/favoritesview.py
index 08c3675..614003f 100644
--- a/src/jarabe/desktop/favoritesview.py
+++ b/src/jarabe/desktop/favoritesview.py
@@ -206,9 +206,9 @@ class FavoritesView(hippo.Canvas):
icon_x, icon_y = icon.get_context().translate_to_widget(icon)
icon_width, icon_height = icon.get_allocation()
- if (x >= icon_x ) and (x <= icon_x + icon_width) and \
- (y >= icon_y ) and (y <= icon_y + icon_height) and \
- isinstance(icon, ActivityIcon):
+ if (x >= icon_x) and (x <= icon_x + icon_width) and \
+ (y >= icon_y) and (y <= icon_y + icon_height) and \
+ isinstance(icon, ActivityIcon):
return icon
return None
@@ -603,8 +603,8 @@ class OwnerIcon(BuddyIcon):
__gtype_name__ = 'SugarFavoritesOwnerIcon'
__gsignals__ = {
- 'register-activate' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([]))
+ 'register-activate': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([])),
}
def __init__(self, size):
diff --git a/src/jarabe/desktop/grid.py b/src/jarabe/desktop/grid.py
index 319ff38..cdba238 100644
--- a/src/jarabe/desktop/grid.py
+++ b/src/jarabe/desktop/grid.py
@@ -31,9 +31,8 @@ _MAX_COLLISIONS_PER_REFRESH = 20
class Grid(_sugarext.Grid):
__gsignals__ = {
- 'child-changed' : (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ 'child-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
}
def __init__(self, width, height):
diff --git a/src/jarabe/desktop/homebox.py b/src/jarabe/desktop/homebox.py
index beaaf41..b19d562 100644
--- a/src/jarabe/desktop/homebox.py
+++ b/src/jarabe/desktop/homebox.py
@@ -59,7 +59,7 @@ class HomeBox(gtk.VBox):
def show_software_updates_alert(self):
alert = Alert()
updater_icon = Icon(icon_name='module-updater',
- pixel_size = style.STANDARD_ICON_SIZE)
+ pixel_size=style.STANDARD_ICON_SIZE)
alert.props.icon = updater_icon
updater_icon.show()
alert.props.title = _('Software Update')
@@ -151,12 +151,10 @@ class HomeToolbar(gtk.Toolbar):
__gtype_name__ = 'SugarHomeToolbar'
__gsignals__ = {
- 'query-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
+ 'query-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([str])),
- 'view-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([object]))
+ 'view-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
diff --git a/src/jarabe/desktop/homewindow.py b/src/jarabe/desktop/homewindow.py
index a2ea688..b0f648a 100644
--- a/src/jarabe/desktop/homewindow.py
+++ b/src/jarabe/desktop/homewindow.py
@@ -29,9 +29,9 @@ from jarabe.model.shell import ShellModel
from jarabe.model import shell
-_HOME_PAGE = 0
-_GROUP_PAGE = 1
-_MESH_PAGE = 2
+_HOME_PAGE = 0
+_GROUP_PAGE = 1
+_MESH_PAGE = 2
_TRANSITION_PAGE = 3
_instance = None
diff --git a/src/jarabe/desktop/keydialog.py b/src/jarabe/desktop/keydialog.py
index 63099e2..35b35e6 100644
--- a/src/jarabe/desktop/keydialog.py
+++ b/src/jarabe/desktop/keydialog.py
@@ -26,7 +26,7 @@ from jarabe.model.network import Secrets
IW_AUTH_ALG_OPEN_SYSTEM = 'open'
-IW_AUTH_ALG_SHARED_KEY = 'shared'
+IW_AUTH_ALG_SHARED_KEY = 'shared'
WEP_PASSPHRASE = 1
WEP_HEX = 2
diff --git a/src/jarabe/desktop/meshbox.py b/src/jarabe/desktop/meshbox.py
index ededa6d..aa32b9c 100644
--- a/src/jarabe/desktop/meshbox.py
+++ b/src/jarabe/desktop/meshbox.py
@@ -157,9 +157,8 @@ class MeshToolbar(gtk.Toolbar):
__gtype_name__ = 'MeshToolbar'
__gsignals__ = {
- 'query-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([str]))
+ 'query-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str])),
}
def __init__(self):
@@ -227,7 +226,7 @@ class DeviceObserver(gobject.GObject):
'access-point-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([gobject.TYPE_PYOBJECT])),
'access-point-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT])),
}
def __init__(self, device):
diff --git a/src/jarabe/desktop/schoolserver.py b/src/jarabe/desktop/schoolserver.py
index 8dc7d71..5388466 100644
--- a/src/jarabe/desktop/schoolserver.py
+++ b/src/jarabe/desktop/schoolserver.py
@@ -40,7 +40,7 @@ def generate_serial_number():
serial_part1 = []
- for y_ in range(3) :
+ for y_ in range(3):
serial_part1.append(random.choice(ascii_uppercase))
serial_part1 = ''.join(serial_part1)
diff --git a/src/jarabe/desktop/transitionbox.py b/src/jarabe/desktop/transitionbox.py
index 184f62c..4042044 100644
--- a/src/jarabe/desktop/transitionbox.py
+++ b/src/jarabe/desktop/transitionbox.py
@@ -68,8 +68,7 @@ class TransitionBox(hippo.Canvas):
__gtype_name__ = 'SugarTransitionBox'
__gsignals__ = {
- 'completed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([]))
+ 'completed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self):
diff --git a/src/jarabe/frame/activitiestray.py b/src/jarabe/frame/activitiestray.py
index 05891b4..6d4d875 100644
--- a/src/jarabe/frame/activitiestray.py
+++ b/src/jarabe/frame/activitiestray.py
@@ -473,8 +473,7 @@ class BaseTransferPalette(Palette):
__gtype_name__ = "SugarBaseTransferPalette"
__gsignals__ = {
- 'dismiss-clicked': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
+ 'dismiss-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self, file_transfer):
diff --git a/src/jarabe/frame/clipboard.py b/src/jarabe/frame/clipboard.py
index 8e237dd..95ae192 100644
--- a/src/jarabe/frame/clipboard.py
+++ b/src/jarabe/frame/clipboard.py
@@ -38,7 +38,7 @@ class Clipboard(gobject.GObject):
'object-deleted': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([int])),
'object-state-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([object]))
+ ([object])),
}
def __init__(self):
diff --git a/src/jarabe/frame/clipboardtray.py b/src/jarabe/frame/clipboardtray.py
index 40a1f65..1c06552 100644
--- a/src/jarabe/frame/clipboardtray.py
+++ b/src/jarabe/frame/clipboardtray.py
@@ -156,7 +156,7 @@ class ClipboardTray(tray.VTray):
if 'XdndDirectSave0' in context.targets:
window = context.source_window
prop_type, format_, filename = \
- window.property_get('XdndDirectSave0','text/plain')
+ window.property_get('XdndDirectSave0', 'text/plain')
# FIXME query the clipboard service for a filename?
base_dir = tempfile.gettempdir()
diff --git a/src/jarabe/frame/eventarea.py b/src/jarabe/frame/eventarea.py
index cdd6f97..af6f1b6 100644
--- a/src/jarabe/frame/eventarea.py
+++ b/src/jarabe/frame/eventarea.py
@@ -25,10 +25,8 @@ _MAX_DELAY = 1000
class EventArea(gobject.GObject):
__gsignals__ = {
- 'enter': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'leave': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([]))
+ 'enter': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
+ 'leave': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self):
@@ -42,7 +40,7 @@ class EventArea(gobject.GObject):
self._corner_delay = client.get_int('/desktop/sugar/frame/corner_delay')
right = gtk.gdk.screen_width() - 1
- bottom = gtk.gdk.screen_height() -1
+ bottom = gtk.gdk.screen_height() - 1
width = gtk.gdk.screen_width() - 2
height = gtk.gdk.screen_height() - 2
diff --git a/src/jarabe/frame/frame.py b/src/jarabe/frame/frame.py
index 39dd31e..933729c 100644
--- a/src/jarabe/frame/frame.py
+++ b/src/jarabe/frame/frame.py
@@ -96,7 +96,7 @@ class _KeyListener(object):
class Frame(object):
- MODE_MOUSE = 0
+ MODE_MOUSE = 0
MODE_KEYBOARD = 1
MODE_NON_INTERACTIVE = 2
@@ -183,7 +183,7 @@ class Frame(object):
zoom_toolbar = ZoomToolbar()
panel.append(hippo.CanvasWidget(widget=zoom_toolbar,
- box_width=4*style.GRID_CELL_SIZE))
+ box_width=4 * style.GRID_CELL_SIZE))
zoom_toolbar.show()
activities_tray = ActivitiesTray()
diff --git a/src/jarabe/frame/notification.py b/src/jarabe/frame/notification.py
index fceb41e..703cf2c 100644
--- a/src/jarabe/frame/notification.py
+++ b/src/jarabe/frame/notification.py
@@ -27,9 +27,9 @@ class NotificationIcon(gtk.EventBox):
__gtype_name__ = 'SugarNotificationIcon'
__gproperties__ = {
- 'xo-color' : (object, None, None, gobject.PARAM_READWRITE),
- 'icon-name' : (str, None, None, None, gobject.PARAM_READWRITE),
- 'icon-filename' : (str, None, None, None, gobject.PARAM_READWRITE)
+ 'xo-color': (object, None, None, gobject.PARAM_READWRITE),
+ 'icon-name': (str, None, None, None, gobject.PARAM_READWRITE),
+ 'icon-filename': (str, None, None, None, gobject.PARAM_READWRITE),
}
_PULSE_TIMEOUT = 3
diff --git a/src/jarabe/intro/window.py b/src/jarabe/intro/window.py
index 4c8d224..168fbc5 100644
--- a/src/jarabe/intro/window.py
+++ b/src/jarabe/intro/window.py
@@ -45,7 +45,7 @@ def create_profile(name, color=None, pixbuf=None):
color = XoColor()
icon_path = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
- pixbuf.save(icon_path, "jpeg", {"quality":"85"})
+ pixbuf.save(icon_path, "jpeg", {"quality": "85"})
client = gconf.client_get_default()
client.set_string("/desktop/sugar/user/nick", name)
@@ -65,8 +65,7 @@ def create_profile(name, color=None, pixbuf=None):
class _Page(hippo.CanvasBox):
__gproperties__ = {
- 'valid' : (bool, None, None, False,
- gobject.PARAM_READABLE)
+ 'valid': (bool, None, None, False, gobject.PARAM_READABLE),
}
def __init__(self, **kwargs):
@@ -147,7 +146,7 @@ class _ColorPage(_Page):
class _IntroBox(hippo.CanvasBox):
__gsignals__ = {
'done': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])),
}
PAGE_NAME = 0
diff --git a/src/jarabe/journal/detailview.py b/src/jarabe/journal/detailview.py
index 6a04a44..aa8c039 100644
--- a/src/jarabe/journal/detailview.py
+++ b/src/jarabe/journal/detailview.py
@@ -32,7 +32,7 @@ class DetailView(gtk.VBox):
__gtype_name__ = 'DetailView'
__gsignals__ = {
- 'go-back-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([]))
+ 'go-back-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self, **kwargs):
diff --git a/src/jarabe/journal/journaltoolbox.py b/src/jarabe/journal/journaltoolbox.py
index 08c8b2f..39cd735 100644
--- a/src/jarabe/journal/journaltoolbox.py
+++ b/src/jarabe/journal/journaltoolbox.py
@@ -74,9 +74,8 @@ class SearchToolbar(gtk.Toolbar):
__gtype_name__ = 'SearchToolbar'
__gsignals__ = {
- 'query-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([object]))
+ 'query-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
@@ -369,9 +368,8 @@ class DetailToolbox(Toolbox):
class EntryToolbar(gtk.Toolbar):
__gsignals__ = {
- 'volume-error': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([str, str]))
+ 'volume-error': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str, str])),
}
def __init__(self):
diff --git a/src/jarabe/journal/listmodel.py b/src/jarabe/journal/listmodel.py
index fb50ea3..fb34c6a 100644
--- a/src/jarabe/journal/listmodel.py
+++ b/src/jarabe/journal/listmodel.py
@@ -39,12 +39,8 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource):
__gtype_name__ = 'JournalListModel'
__gsignals__ = {
- 'ready': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([])),
- 'progress': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([])),
+ 'ready': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
+ 'progress': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
COLUMN_UID = 0
@@ -60,18 +56,20 @@ class ListModel(gtk.GenericTreeModel, gtk.TreeDragSource):
COLUMN_BUDDY_2 = 10
COLUMN_BUDDY_3 = 11
- _COLUMN_TYPES = {COLUMN_UID: str,
- COLUMN_FAVORITE: bool,
- COLUMN_ICON: str,
- COLUMN_ICON_COLOR: object,
- COLUMN_TITLE: str,
- COLUMN_TIMESTAMP: str,
- COLUMN_CREATION_TIME: str,
- COLUMN_FILESIZE: str,
- COLUMN_PROGRESS: int,
- COLUMN_BUDDY_1: object,
- COLUMN_BUDDY_3: object,
- COLUMN_BUDDY_2: object}
+ _COLUMN_TYPES = {
+ COLUMN_UID: str,
+ COLUMN_FAVORITE: bool,
+ COLUMN_ICON: str,
+ COLUMN_ICON_COLOR: object,
+ COLUMN_TITLE: str,
+ COLUMN_TIMESTAMP: str,
+ COLUMN_CREATION_TIME: str,
+ COLUMN_FILESIZE: str,
+ COLUMN_PROGRESS: int,
+ COLUMN_BUDDY_1: object,
+ COLUMN_BUDDY_3: object,
+ COLUMN_BUDDY_2: object,
+ }
_PAGE_SIZE = 10
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py
index bca9f2c..b696931 100644
--- a/src/jarabe/journal/listview.py
+++ b/src/jarabe/journal/listview.py
@@ -65,9 +65,7 @@ class BaseListView(gtk.Bin):
__gtype_name__ = 'JournalBaseListView'
__gsignals__ = {
- 'clear-clicked': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([]))
+ 'clear-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self):
@@ -373,8 +371,8 @@ class BaseListView(gtk.Bin):
icon = CanvasIcon(size=style.LARGE_ICON_SIZE,
icon_name='activity-journal',
- stroke_color = style.COLOR_BUTTON_GREY.get_svg(),
- fill_color = style.COLOR_TRANSPARENT.get_svg())
+ stroke_color=style.COLOR_BUTTON_GREY.get_svg(),
+ fill_color=style.COLOR_TRANSPARENT.get_svg())
box.append(icon)
if message == MESSAGE_EMPTY_JOURNAL:
@@ -387,7 +385,7 @@ class BaseListView(gtk.Bin):
text = hippo.CanvasText(text=text,
xalign=hippo.ALIGNMENT_CENTER,
font_desc=style.FONT_BOLD.get_pango_desc(),
- color = style.COLOR_BUTTON_GREY.get_int())
+ color=style.COLOR_BUTTON_GREY.get_int())
box.append(text)
if message == MESSAGE_NO_MATCH:
@@ -468,9 +466,8 @@ class ListView(BaseListView):
__gtype_name__ = 'JournalListView'
__gsignals__ = {
- 'detail-clicked': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([object]))
+ 'detail-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
@@ -579,8 +576,7 @@ class CellRendererActivityIcon(CellRendererIcon):
__gtype_name__ = 'JournalCellRendererActivityIcon'
__gsignals__ = {
- 'detail-clicked': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
+ 'detail-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([str])),
}
diff --git a/src/jarabe/journal/model.py b/src/jarabe/journal/model.py
index 4a9a8c8..c8aab18 100644
--- a/src/jarabe/journal/model.py
+++ b/src/jarabe/journal/model.py
@@ -81,7 +81,7 @@ class BaseResultSet(object):
"""
def __init__(self, query, page_size):
- self._total_count = -1
+ self._total_count = -1
self._position = -1
self._query = query
self._page_size = page_size
@@ -268,7 +268,7 @@ class InplaceResultSet(BaseResultSet):
keygetter = itemgetter(2) # timestamp
self._file_list.sort(lambda a, b: b - a,
key=keygetter,
- reverse=self._sort[0]=='-')
+ reverse=(self._sort[0] == '-'))
self.ready.send(self)
def find(self, query):
@@ -281,7 +281,7 @@ class InplaceResultSet(BaseResultSet):
t = time.time()
offset = int(query.get('offset', 0))
- limit = int(query.get('limit', len(self._file_list)))
+ limit = int(query.get('limit', len(self._file_list)))
total_count = len(self._file_list)
files = self._file_list[offset:offset + limit]
diff --git a/src/jarabe/journal/objectchooser.py b/src/jarabe/journal/objectchooser.py
index 97139f8..ecb8ecf 100644
--- a/src/jarabe/journal/objectchooser.py
+++ b/src/jarabe/journal/objectchooser.py
@@ -35,9 +35,7 @@ class ObjectChooser(gtk.Window):
__gtype_name__ = 'ObjectChooser'
__gsignals__ = {
- 'response': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([int]))
+ 'response': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([int])),
}
def __init__(self, parent=None, what_filter=''):
diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py
index b2ecd1c..d341506 100644
--- a/src/jarabe/journal/palettes.py
+++ b/src/jarabe/journal/palettes.py
@@ -41,8 +41,7 @@ class ObjectPalette(Palette):
__gtype_name__ = 'ObjectPalette'
__gsignals__ = {
- 'detail-clicked': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
+ 'detail-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([str])),
}
@@ -160,8 +159,8 @@ class FriendsMenu(gtk.Menu):
__gtype_name__ = 'JournalFriendsMenu'
__gsignals__ = {
- 'friend-selected' : (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([object])),
+ 'friend-selected': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
diff --git a/src/jarabe/journal/volumestoolbar.py b/src/jarabe/journal/volumestoolbar.py
index d4caade..45346ba 100644
--- a/src/jarabe/journal/volumestoolbar.py
+++ b/src/jarabe/journal/volumestoolbar.py
@@ -35,12 +35,10 @@ class VolumesToolbar(gtk.Toolbar):
__gtype_name__ = 'VolumesToolbar'
__gsignals__ = {
- 'volume-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
+ 'volume-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([str])),
- 'volume-error': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([str, str]))
+ 'volume-error': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str, str])),
}
def __init__(self):
@@ -134,9 +132,8 @@ class VolumesToolbar(gtk.Toolbar):
class BaseButton(RadioToolButton):
__gsignals__ = {
- 'volume-error': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([str, str]))
+ 'volume-error': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str, str])),
}
def __init__(self, mount_point):
diff --git a/src/jarabe/model/adhoc.py b/src/jarabe/model/adhoc.py
index a3f2927..88e1bbc 100644
--- a/src/jarabe/model/adhoc.py
+++ b/src/jarabe/model/adhoc.py
@@ -55,7 +55,7 @@ class AdHocManager(gobject.GObject):
'members-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])),
'state-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT, gobject.TYPE_PYOBJECT])),
}
_AUTOCONNECT_TIMEOUT = 30
diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py
index 392f92d..f01c38d 100644
--- a/src/jarabe/model/bundleregistry.py
+++ b/src/jarabe/model/bundleregistry.py
@@ -43,12 +43,12 @@ class BundleRegistry(gobject.GObject):
"""Tracks the available activity bundles"""
__gsignals__ = {
- 'bundle-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
+ 'bundle-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
'bundle-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([gobject.TYPE_PYOBJECT])),
'bundle-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT])),
}
def __init__(self):
diff --git a/src/jarabe/model/friends.py b/src/jarabe/model/friends.py
index b317130..bad6eed 100644
--- a/src/jarabe/model/friends.py
+++ b/src/jarabe/model/friends.py
@@ -94,10 +94,10 @@ class FriendBuddyModel(BuddyModel):
class Friends(gobject.GObject):
__gsignals__ = {
- 'friend-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'friend-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([str]))
+ 'friend-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'friend-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([str])),
}
def __init__(self):
diff --git a/src/jarabe/model/invites.py b/src/jarabe/model/invites.py
index 8fbc398..e24a429 100644
--- a/src/jarabe/model/invites.py
+++ b/src/jarabe/model/invites.py
@@ -111,10 +111,10 @@ class ActivityInvite(object):
class Invites(gobject.GObject):
__gsignals__ = {
- 'invite-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'invite-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object]))
+ 'invite-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'invite-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
diff --git a/src/jarabe/model/neighborhood.py b/src/jarabe/model/neighborhood.py
index ec825ac..372f48e 100644
--- a/src/jarabe/model/neighborhood.py
+++ b/src/jarabe/model/neighborhood.py
@@ -71,14 +71,14 @@ _model = None
class ActivityModel(gobject.GObject):
__gsignals__ = {
- 'current-buddy-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'current-buddy-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'buddy-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'buddy-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
+ 'current-buddy-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'current-buddy-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'buddy-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'buddy-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self, activity_id, room_handle):
@@ -159,28 +159,26 @@ class ActivityModel(gobject.GObject):
class _Account(gobject.GObject):
__gsignals__ = {
- 'activity-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object, object])),
- 'activity-updated': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object, object])),
- 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'buddy-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object, object, object])),
- 'buddy-updated': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object, object])),
- 'buddy-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'buddy-joined-activity': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object, object])),
- 'buddy-left-activity': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object, object])),
+ 'activity-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object, object])),
+ 'activity-updated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object, object])),
+ 'activity-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'buddy-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object, object, object])),
+ 'buddy-updated': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object, object])),
+ 'buddy-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'buddy-joined-activity': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object, object])),
+ 'buddy-left-activity': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object, object])),
'current-activity-updated': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE, ([object, object])),
- 'connected': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
- 'disconnected': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([])),
+ 'connected': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
+ 'disconnected': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
}
def __init__(self, account_path):
@@ -623,14 +621,14 @@ class _Account(gobject.GObject):
class Neighborhood(gobject.GObject):
__gsignals__ = {
- 'activity-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'buddy-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object])),
- 'buddy-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE, ([object]))
+ 'activity-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'activity-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'buddy-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
+ 'buddy-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([object])),
}
def __init__(self):
diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 20fd192..fa32b79 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -154,91 +154,91 @@ def get_error_by_reason(reason):
if _nm_device_state_reason_description is None:
_nm_device_state_reason_description = {
- NM_DEVICE_STATE_REASON_UNKNOWN: \
- _("The reason for the device state change \ is unknown."),
- NM_DEVICE_STATE_REASON_NONE: \
+ NM_DEVICE_STATE_REASON_UNKNOWN:
+ _("The reason for the device state change is unknown."),
+ NM_DEVICE_STATE_REASON_NONE:
_("The state change is normal."),
- NM_DEVICE_STATE_REASON_NOW_MANAGED: \
+ NM_DEVICE_STATE_REASON_NOW_MANAGED:
_("The device is now managed."),
- NM_DEVICE_STATE_REASON_NOW_UNMANAGED: \
+ NM_DEVICE_STATE_REASON_NOW_UNMANAGED:
_("The device is no longer managed."),
- NM_DEVICE_STATE_REASON_CONFIG_FAILED: \
+ NM_DEVICE_STATE_REASON_CONFIG_FAILED:
_("The device could not be readied for configuration."),
- NM_DEVICE_STATE_REASON_CONFIG_UNAVAILABLE : \
- _("IP configuration could not be reserved " \
- "(no available address, timeout, etc)."),
- NM_DEVICE_STATE_REASON_CONFIG_EXPIRED : \
+ NM_DEVICE_STATE_REASON_CONFIG_UNAVAILABLE:
+ _("IP configuration could not be reserved "
+ "(no available address, timeout, etc)."),
+ NM_DEVICE_STATE_REASON_CONFIG_EXPIRED:
_("The IP configuration is no longer valid."),
- NM_DEVICE_STATE_REASON_NO_SECRETS : \
+ NM_DEVICE_STATE_REASON_NO_SECRETS:
_("Secrets were required, but not provided."),
- NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT : \
- _("The 802.1X supplicant disconnected from "\
- "the access point or authentication server."),
- NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED : \
+ NM_DEVICE_STATE_REASON_SUPPLICANT_DISCONNECT:
+ _("The 802.1X supplicant disconnected from "
+ "the access point or authentication server."),
+ NM_DEVICE_STATE_REASON_SUPPLICANT_CONFIG_FAILED:
_("Configuration of the 802.1X supplicant failed."),
- NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED : \
+ NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED:
_("The 802.1X supplicant quit or failed unexpectedly."),
- NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT : \
+ NM_DEVICE_STATE_REASON_SUPPLICANT_TIMEOUT:
_("The 802.1X supplicant took too long to authenticate."),
- NM_DEVICE_STATE_REASON_PPP_START_FAILED : \
+ NM_DEVICE_STATE_REASON_PPP_START_FAILED:
_("The PPP service failed to start within the allowed time."),
- NM_DEVICE_STATE_REASON_PPP_DISCONNECT : \
+ NM_DEVICE_STATE_REASON_PPP_DISCONNECT:
_("The PPP service disconnected unexpectedly."),
- NM_DEVICE_STATE_REASON_PPP_FAILED : \
+ NM_DEVICE_STATE_REASON_PPP_FAILED:
_("The PPP service quit or failed unexpectedly."),
- NM_DEVICE_STATE_REASON_DHCP_START_FAILED : \
+ NM_DEVICE_STATE_REASON_DHCP_START_FAILED:
_("The DHCP service failed to start within the allowed time."),
- NM_DEVICE_STATE_REASON_DHCP_ERROR : \
+ NM_DEVICE_STATE_REASON_DHCP_ERROR:
_("The DHCP service reported an unexpected error."),
- NM_DEVICE_STATE_REASON_DHCP_FAILED : \
+ NM_DEVICE_STATE_REASON_DHCP_FAILED:
_("The DHCP service quit or failed unexpectedly."),
- NM_DEVICE_STATE_REASON_SHARED_START_FAILED : \
+ NM_DEVICE_STATE_REASON_SHARED_START_FAILED:
_("The shared connection service failed to start."),
- NM_DEVICE_STATE_REASON_SHARED_FAILED : \
- _("The shared connection service quit or " \
- "failed unexpectedly."),
- NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED : \
+ NM_DEVICE_STATE_REASON_SHARED_FAILED:
+ _("The shared connection service quit or "
+ "failed unexpectedly."),
+ NM_DEVICE_STATE_REASON_AUTOIP_START_FAILED:
_("The AutoIP service failed to start."),
- NM_DEVICE_STATE_REASON_AUTOIP_ERROR : \
+ NM_DEVICE_STATE_REASON_AUTOIP_ERROR:
_("The AutoIP service reported an unexpected error."),
- NM_DEVICE_STATE_REASON_AUTOIP_FAILED : \
+ NM_DEVICE_STATE_REASON_AUTOIP_FAILED:
_("The AutoIP service quit or failed unexpectedly."),
- NM_DEVICE_STATE_REASON_MODEM_BUSY : \
+ NM_DEVICE_STATE_REASON_MODEM_BUSY:
_("Dialing failed because the line was busy."),
- NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE : \
+ NM_DEVICE_STATE_REASON_MODEM_NO_DIAL_TONE:
_("Dialing failed because there was no dial tone."),
- NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER : \
+ NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER:
_("Dialing failed because there was no carrier."),
- NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT : \
+ NM_DEVICE_STATE_REASON_MODEM_DIAL_TIMEOUT:
_("Dialing timed out."),
- NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED : \
+ NM_DEVICE_STATE_REASON_MODEM_DIAL_FAILED:
_("Dialing failed."),
- NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED : \
+ NM_DEVICE_STATE_REASON_MODEM_INIT_FAILED:
_("Modem initialization failed."),
- NM_DEVICE_STATE_REASON_GSM_APN_FAILED : \
+ NM_DEVICE_STATE_REASON_GSM_APN_FAILED:
_("Failed to select the specified GSM APN."),
- NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING : \
+ NM_DEVICE_STATE_REASON_GSM_REGISTRATION_NOT_SEARCHING:
_("Not searching for networks."),
- NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED : \
+ NM_DEVICE_STATE_REASON_GSM_REGISTRATION_DENIED:
_("Network registration was denied."),
- NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT : \
+ NM_DEVICE_STATE_REASON_GSM_REGISTRATION_TIMEOUT:
_("Network registration timed out."),
- NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED : \
+ NM_DEVICE_STATE_REASON_GSM_REGISTRATION_FAILED:
_("Failed to register with the requested GSM network."),
- NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED : \
+ NM_DEVICE_STATE_REASON_GSM_PIN_CHECK_FAILED:
_("PIN check failed."),
- NM_DEVICE_STATE_REASON_FIRMWARE_MISSING : \
+ NM_DEVICE_STATE_REASON_FIRMWARE_MISSING:
_("Necessary firmware for the device may be missing."),
- NM_DEVICE_STATE_REASON_REMOVED : \
+ NM_DEVICE_STATE_REASON_REMOVED:
_("The device was removed."),
- NM_DEVICE_STATE_REASON_SLEEPING : \
+ NM_DEVICE_STATE_REASON_SLEEPING:
_("NetworkManager went to sleep."),
- NM_DEVICE_STATE_REASON_CONNECTION_REMOVED : \
- _("The device's active connection was removed " \
- "or disappeared."),
- NM_DEVICE_STATE_REASON_USER_REQUESTED : \
+ NM_DEVICE_STATE_REASON_CONNECTION_REMOVED:
+ _("The device's active connection was removed "
+ "or disappeared."),
+ NM_DEVICE_STATE_REASON_USER_REQUESTED:
_("A user or client requested the disconnection."),
- NM_DEVICE_STATE_REASON_CARRIER : \
+ NM_DEVICE_STATE_REASON_CARRIER:
_("The device's carrier/link changed.")}
return _nm_device_state_reason_description[reason]
@@ -667,7 +667,7 @@ class NMSettingsConnection(dbus.service.Object):
class AccessPoint(gobject.GObject):
__gsignals__ = {
'props-changed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT])),
}
def __init__(self, device, model):
diff --git a/src/jarabe/model/shell.py b/src/jarabe/model/shell.py
index 624648c..3c8b4db 100644
--- a/src/jarabe/model/shell.py
+++ b/src/jarabe/model/shell.py
@@ -312,27 +312,22 @@ class ShellModel(gobject.GObject):
"""
__gsignals__ = {
- 'activity-added': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'activity-removed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
+ 'activity-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'activity-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
'active-activity-changed': (gobject.SIGNAL_RUN_FIRST,
gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
+ ([gobject.TYPE_PYOBJECT])),
'tabbing-activity-changed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'launch-started': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'launch-completed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT])),
- 'launch-failed': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'launch-started': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'launch-completed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
+ 'launch-failed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
+ ([gobject.TYPE_PYOBJECT])),
}
ZOOM_MESH = 0
diff --git a/src/jarabe/util/emulator.py b/src/jarabe/util/emulator.py
index afcac30..4c9ca8e 100644
--- a/src/jarabe/util/emulator.py
+++ b/src/jarabe/util/emulator.py
@@ -34,7 +34,7 @@ default_dimensions = (800, 600)
def _run_xephyr(display, dpi, dimensions, fullscreen):
- cmd = [ 'Xephyr' ]
+ cmd = ['Xephyr']
cmd.append(':%d' % display)
cmd.append('-ac')
cmd += ['-title', _('Sugar in a window')]
@@ -42,25 +42,25 @@ def _run_xephyr(display, dpi, dimensions, fullscreen):
screen_size = (gtk.gdk.screen_width(), gtk.gdk.screen_height())
if (not dimensions) and (fullscreen is None) and \
- (screen_size < default_dimensions) :
+ (screen_size < default_dimensions):
# no forced settings, screen too small => fit screen
fullscreen = True
- elif (not dimensions) :
+ elif not dimensions:
# screen is big enough or user has en/disabled fullscreen manually
# => use default size (will get ignored for fullscreen)
dimensions = '%dx%d' % default_dimensions
- if not dpi :
+ if not dpi:
dpi = gtk.settings_get_default().get_property('gtk-xft-dpi') / 1024
- if fullscreen :
+ if fullscreen:
cmd.append('-fullscreen')
- if dimensions :
+ if dimensions:
cmd.append('-screen')
cmd.append(dimensions)
- if dpi :
+ if dpi:
cmd.append('-dpi')
cmd.append('%d' % dpi)
diff --git a/src/jarabe/util/telepathy/connection_watcher.py b/src/jarabe/util/telepathy/connection_watcher.py
index 2e073ae..685ef2c 100644
--- a/src/jarabe/util/telepathy/connection_watcher.py
+++ b/src/jarabe/util/telepathy/connection_watcher.py
@@ -37,7 +37,7 @@ class ConnectionWatcher(gobject.GObject):
'connection-added': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([gobject.TYPE_PYOBJECT])),
'connection-removed': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
- ([gobject.TYPE_PYOBJECT]))
+ ([gobject.TYPE_PYOBJECT])),
}
def __init__(self, bus=None):
diff --git a/src/jarabe/view/keyhandler.py b/src/jarabe/view/keyhandler.py
index 794092d..78a0693 100644
--- a/src/jarabe/view/keyhandler.py
+++ b/src/jarabe/view/keyhandler.py
@@ -39,30 +39,30 @@ _TABBING_MODIFIER = gtk.gdk.MOD1_MASK
_actions_table = {
- 'F1' : 'zoom_mesh',
- 'F2' : 'zoom_group',
- 'F3' : 'zoom_home',
- 'F4' : 'zoom_activity',
- 'F5' : 'open_search',
- 'F6' : 'frame',
- 'XF86AudioMute' : 'volume_mute',
- 'F11' : 'volume_down',
- 'XF86AudioLowerVolume' : 'volume_down',
- 'F12' : 'volume_up',
- 'XF86AudioRaiseVolume' : 'volume_up',
- '<alt>F11' : 'volume_min',
- '<alt>F12' : 'volume_max',
- '0x93' : 'frame',
- '<alt>Tab' : 'next_window',
- '<alt><shift>Tab' : 'previous_window',
- '<alt>Escape' : 'close_window',
- '0xDC' : 'open_search',
+ 'F1': 'zoom_mesh',
+ 'F2': 'zoom_group',
+ 'F3': 'zoom_home',
+ 'F4': 'zoom_activity',
+ 'F5': 'open_search',
+ 'F6': 'frame',
+ 'XF86AudioMute': 'volume_mute',
+ 'F11': 'volume_down',
+ 'XF86AudioLowerVolume': 'volume_down',
+ 'F12': 'volume_up',
+ 'XF86AudioRaiseVolume': 'volume_up',
+ '<alt>F11': 'volume_min',
+ '<alt>F12': 'volume_max',
+ '0x93': 'frame',
+ '<alt>Tab': 'next_window',
+ '<alt><shift>Tab': 'previous_window',
+ '<alt>Escape': 'close_window',
+ '0xDC': 'open_search',
# the following are intended for emulator users
- '<alt><shift>f' : 'frame',
- '<alt><shift>q' : 'quit_emulator',
- 'XF86Search' : 'open_search',
- '<alt><shift>o' : 'open_search',
- '<alt><shift>s' : 'say_text',
+ '<alt><shift>f': 'frame',
+ '<alt><shift>q': 'quit_emulator',
+ 'XF86Search': 'open_search',
+ '<alt><shift>o': 'open_search',
+ '<alt><shift>s': 'say_text',
}
SPEECH_DBUS_SERVICE = 'org.laptop.Speech'
diff --git a/src/jarabe/view/viewsource.py b/src/jarabe/view/viewsource.py
index e6e7e36..7b2a24f 100644
--- a/src/jarabe/view/viewsource.py
+++ b/src/jarabe/view/viewsource.py
@@ -132,10 +132,10 @@ class ViewSource(gtk.Window):
file_name = ''
activity_bundle = ActivityBundle(bundle_path)
- command = activity_bundle.get_command()
+ command = activity_bundle.get_command()
if len(command.split(' ')) > 1:
name = command.split(' ')[1].split('.')[0]
- file_name = name + '.py'
+ file_name = name + '.py'
path = os.path.join(activity_bundle.get_path(), file_name)
self._selected_file = path
@@ -260,11 +260,8 @@ class Toolbar(gtk.Toolbar):
__gtype_name__ = 'SugarViewSourceToolbar'
__gsignals__ = {
- 'stop-clicked': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
- ([])),
- 'source-selected': (gobject.SIGNAL_RUN_FIRST,
- gobject.TYPE_NONE,
+ 'stop-clicked': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, ([])),
+ 'source-selected': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE,
([str])),
}