diff options
author | Sascha Silbe <sascha-pgp@silbe.org> | 2010-10-15 19:14:59 (GMT) |
---|---|---|
committer | Sascha Silbe <sascha-pgp@silbe.org> | 2010-11-23 16:14:34 (GMT) |
commit | 7acfbd070fa207dff309383da6e743ad2b9843c3 (patch) | |
tree | 662b4cb7ff5494f162365d85098e7fce7179d35e /src/sugar/graphics | |
parent | 5f13fcfc847ecff18b9558de8ce29da884a06d7a (diff) |
style cleanup: prefer ' for strings
Tomeu prefers ' for strings, so let's use it wherever we don't have a good
reason to use ".
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
CC: Aleksey Lim <alsroot@member.fsf.org>
Diffstat (limited to 'src/sugar/graphics')
-rw-r--r-- | src/sugar/graphics/alert.py | 2 | ||||
-rw-r--r-- | src/sugar/graphics/combobox.py | 2 | ||||
-rw-r--r-- | src/sugar/graphics/icon.py | 2 | ||||
-rw-r--r-- | src/sugar/graphics/objectchooser.py | 4 | ||||
-rw-r--r-- | src/sugar/graphics/palettewindow.py | 10 | ||||
-rw-r--r-- | src/sugar/graphics/radiotoolbutton.py | 2 | ||||
-rw-r--r-- | src/sugar/graphics/toggletoolbutton.py | 4 | ||||
-rw-r--r-- | src/sugar/graphics/toolbutton.py | 4 | ||||
-rw-r--r-- | src/sugar/graphics/tray.py | 4 | ||||
-rw-r--r-- | src/sugar/graphics/xocolor.py | 2 |
10 files changed, 18 insertions, 18 deletions
diff --git a/src/sugar/graphics/alert.py b/src/sugar/graphics/alert.py index f032871..5298430 100644 --- a/src/sugar/graphics/alert.py +++ b/src/sugar/graphics/alert.py @@ -145,7 +145,7 @@ class Alert(gtk.EventBox): if pspec.name == 'title': if self._title != value: self._title = value - self._title_label.set_markup("<b>" + self._title + "</b>") + self._title_label.set_markup('<b>' + self._title + '</b>') elif pspec.name == 'msg': if self._msg != value: self._msg = value diff --git a/src/sugar/graphics/combobox.py b/src/sugar/graphics/combobox.py index bc759c2..09554e5 100644 --- a/src/sugar/graphics/combobox.py +++ b/src/sugar/graphics/combobox.py @@ -65,7 +65,7 @@ class ComboBox(gtk.ComboBox): width, height = gtk.icon_size_lookup(size) info = icon_theme.lookup_icon(name, max(width, height), 0) if not info: - raise ValueError("Icon '" + name + "' not found.") + raise ValueError('Icon %r not found.' % name) fname = info.get_filename() del info return fname diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py index ea3a9c0..870c49e 100644 --- a/src/sugar/graphics/icon.py +++ b/src/sugar/graphics/icon.py @@ -247,7 +247,7 @@ class _IconBuffer(object): # -- 2007-12-14 Benjamin Berg pixbuf = widget.style.render_icon(icon_source, widget.get_direction(), gtk.STATE_INSENSITIVE, -1, widget, - "sugar-icon") + 'sugar-icon') return pixbuf diff --git a/src/sugar/graphics/objectchooser.py b/src/sugar/graphics/objectchooser.py index 590e35d..af9142d 100644 --- a/src/sugar/graphics/objectchooser.py +++ b/src/sugar/graphics/objectchooser.py @@ -68,8 +68,8 @@ class ObjectChooser(object): self._bus = dbus.SessionBus(mainloop=self._main_loop) self._bus.add_signal_receiver( self.__name_owner_changed_cb, - signal_name="NameOwnerChanged", - dbus_interface="org.freedesktop.DBus", + signal_name='NameOwnerChanged', + dbus_interface='org.freedesktop.DBus', arg0=J_DBUS_SERVICE) obj = self._bus.get_object(J_DBUS_SERVICE, J_DBUS_PATH) diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py index 0250f4a..38331ad 100644 --- a/src/sugar/graphics/palettewindow.py +++ b/src/sugar/graphics/palettewindow.py @@ -165,7 +165,7 @@ class PaletteWindow(gtk.Window): self.set_data('sugar-accel-group', accel_group) self.add_accel_group(accel_group) - self.set_group_id("default") + self.set_group_id('default') self.connect('show', self.__show_cb) self.connect('hide', self.__hide_cb) @@ -279,12 +279,12 @@ class PaletteWindow(gtk.Window): if gap: wstyle.paint_box_gap(event.window, gtk.STATE_PRELIGHT, - gtk.SHADOW_IN, event.area, self, "palette", + gtk.SHADOW_IN, event.area, self, 'palette', 0, 0, allocation.width, allocation.height, gap[0], gap[1], gap[2]) else: wstyle.paint_box(event.window, gtk.STATE_PRELIGHT, - gtk.SHADOW_IN, event.area, self, "palette", + gtk.SHADOW_IN, event.area, self, 'palette', 0, 0, allocation.width, allocation.height) # Fall trough to the container expose handler. @@ -740,14 +740,14 @@ class WidgetInvoker(Invoker): if gap: wstyle.paint_box_gap(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_IN, event.area, self._widget, - "palette-invoker", x, y, + 'palette-invoker', x, y, self._widget.allocation.width, self._widget.allocation.height, gap[0], gap[1], gap[2]) else: wstyle.paint_box(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_IN, event.area, self._widget, - "palette-invoker", x, y, + 'palette-invoker', x, y, self._widget.allocation.width, self._widget.allocation.height) diff --git a/src/sugar/graphics/radiotoolbutton.py b/src/sugar/graphics/radiotoolbutton.py index 37267b4..b5fabf2 100644 --- a/src/sugar/graphics/radiotoolbutton.py +++ b/src/sugar/graphics/radiotoolbutton.py @@ -175,7 +175,7 @@ class RadioToolButton(gtk.RadioToolButton): elif child.state == gtk.STATE_PRELIGHT: child.style.paint_box(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_NONE, event.area, - child, "toolbutton-prelight", + child, 'toolbutton-prelight', allocation.x, allocation.y, allocation.width, allocation.height) diff --git a/src/sugar/graphics/toggletoolbutton.py b/src/sugar/graphics/toggletoolbutton.py index cdaf2f0..012c2b0 100644 --- a/src/sugar/graphics/toggletoolbutton.py +++ b/src/sugar/graphics/toggletoolbutton.py @@ -28,7 +28,7 @@ from sugar.graphics.palette import Palette, ToolInvoker class ToggleToolButton(gtk.ToggleToolButton): - __gtype_name__ = "SugarToggleToolButton" + __gtype_name__ = 'SugarToggleToolButton' def __init__(self, named_icon=None): gtk.ToggleToolButton.__init__(self) @@ -82,7 +82,7 @@ class ToggleToolButton(gtk.ToggleToolButton): elif child.state == gtk.STATE_PRELIGHT: child.style.paint_box(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_NONE, event.area, - child, "toolbutton-prelight", + child, 'toolbutton-prelight', allocation.x, allocation.y, allocation.width, allocation.height) diff --git a/src/sugar/graphics/toolbutton.py b/src/sugar/graphics/toolbutton.py index f15e406..25833b6 100644 --- a/src/sugar/graphics/toolbutton.py +++ b/src/sugar/graphics/toolbutton.py @@ -59,7 +59,7 @@ def setup_accelerator(tool_button): class ToolButton(gtk.ToolButton): - __gtype_name__ = "SugarToolButton" + __gtype_name__ = 'SugarToolButton' def __init__(self, icon_name=None, **kwargs): self._accelerator = None @@ -151,7 +151,7 @@ class ToolButton(gtk.ToolButton): elif child.state == gtk.STATE_PRELIGHT: child.style.paint_box(event.window, gtk.STATE_PRELIGHT, gtk.SHADOW_NONE, event.area, - child, "toolbutton-prelight", + child, 'toolbutton-prelight', allocation.x, allocation.y, allocation.width, allocation.height) diff --git a/src/sugar/graphics/tray.py b/src/sugar/graphics/tray.py index 0e048d8..fb98d89 100644 --- a/src/sugar/graphics/tray.py +++ b/src/sugar/graphics/tray.py @@ -396,7 +396,7 @@ class TrayButton(ToolButton): class _IconWidget(gtk.EventBox): - __gtype_name__ = "SugarTrayIconWidget" + __gtype_name__ = 'SugarTrayIconWidget' def __init__(self, icon_name=None, xo_color=None): gtk.EventBox.__init__(self) @@ -422,7 +422,7 @@ class _IconWidget(gtk.EventBox): class TrayIcon(gtk.ToolItem): - __gtype_name__ = "SugarTrayIcon" + __gtype_name__ = 'SugarTrayIcon' def __init__(self, icon_name=None, xo_color=None): gtk.ToolItem.__init__(self) diff --git a/src/sugar/graphics/xocolor.py b/src/sugar/graphics/xocolor.py index fd329cb..df60917 100644 --- a/src/sugar/graphics/xocolor.py +++ b/src/sugar/graphics/xocolor.py @@ -261,7 +261,7 @@ class XoColor: return '%s,%s' % (self.stroke, self.fill) -if __name__ == "__main__": +if __name__ == '__main__': import sys import re |