diff options
author | Walter Bender <walter@sugarlabs.org> | 2010-07-07 01:22:09 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2010-07-07 01:22:09 (GMT) |
commit | 33a91b128e6bff3b715cf79b5308ad0e42689e27 (patch) | |
tree | 05ae66965decdcd32c17f448ef7dc6ea8b5efde4 | |
parent | 1b9a7192bfd7ceab4d3e2c94f8fd572e4eed436b (diff) |
more pep8 cleanup
-rw-r--r-- | VisualMatchActivity.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/VisualMatchActivity.py b/VisualMatchActivity.py index 7d11a0e..8bc513f 100644 --- a/VisualMatchActivity.py +++ b/VisualMatchActivity.py @@ -63,10 +63,11 @@ SERVICE = 'org.sugarlabs.VisualMatchActivity' IFACE = SERVICE PATH = '/org/augarlabs/VisualMatchActivity' + def _button_factory(icon_name, tooltip, callback, toolbar, cb_arg=None, accelerator=None): """Factory for making toolbar buttons""" - my_button = ToolButton( icon_name ) + my_button = ToolButton(icon_name) my_button.set_tooltip(tooltip) my_button.props.sensitive = True if accelerator is not None: @@ -75,13 +76,14 @@ def _button_factory(icon_name, tooltip, callback, toolbar, cb_arg=None, my_button.connect('clicked', callback, cb_arg) else: my_button.connect('clicked', callback) - if hasattr(toolbar, 'insert'): # the main toolbar + if hasattr(toolbar, 'insert'): # the main toolbar toolbar.insert(my_button, -1) else: # or a secondary toolbar toolbar.props.page.insert(my_button, -1) my_button.show() return my_button + def _label_factory(label, toolbar): """ Factory for adding a label to a toolbar """ my_label = gtk.Label(label) @@ -93,6 +95,7 @@ def _label_factory(label, toolbar): _toolitem.show() return my_label + def _spin_factory(default, min, max, callback, toolbar): """ Factory for adding a spinner """ _spin_adj = gtk.Adjustment(default, min, max, 5, 15, 0) @@ -106,6 +109,7 @@ def _spin_factory(default, min, max, callback, toolbar): _toolitem.show() return my_spin + def _separator_factory(toolbar, visible=True, expand=False): """ Factory for adding a separator to a toolbar """ _separator = gtk.SeparatorToolItem() @@ -670,11 +674,8 @@ class VisualMatchActivity(activity.Activity): self.chattube.SendText(entry) -# -# Class for setting up tube for sharing -# class ChatTube(ExportedGObject): - + """ Class for setting up tube for sharing """ def __init__(self, tube, is_initiator, stack_received_cb): super(ChatTube, self).__init__(tube, PATH) self.tube = tube @@ -695,4 +696,3 @@ class ChatTube(ExportedGObject): @signal(dbus_interface=IFACE, signature='s') def SendText(self, text): self.stack = text - |