diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py index 6f4f5789..f38d70cc 100644 --- a/src/sugar/bundle/activitybundle.py +++ b/src/sugar/bundle/activitybundle.py @@ -260,7 +260,8 @@ class ActivityBundle(Bundle): return os.path.join(self._path, icon_path) else: icon_data = self.get_file(icon_path).read() - temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon, suffix='.svg') + temp_file, temp_file_path = tempfile.mkstemp(prefix=self._icon, + suffix='.svg') os.write(temp_file, icon_data) os.close(temp_file) return util.TempFilePath(temp_file_path) diff --git a/src/sugar/graphics/icon.py b/src/sugar/graphics/icon.py index 51bb584a..6f5a1678 100644 --- a/src/sugar/graphics/icon.py +++ b/src/sugar/graphics/icon.py @@ -1019,7 +1019,8 @@ class CellRendererIcon(gtk.GenericCellRenderer): if self._buffer.background_color != value: self._buffer.background_color = value - background_color = gobject.property(type=object, setter=set_background_color) + background_color = gobject.property(type=object, + setter=set_background_color) def set_size(self, value): if self._buffer.width != value: @@ -1061,7 +1062,7 @@ class CellRendererIcon(gtk.GenericCellRenderer): if pos is None: return False - path, column, x, y = pos + path_, column, x, y = pos for cell_renderer in column.get_cell_renderers(): if cell_renderer == self: diff --git a/src/sugar/graphics/palettewindow.py b/src/sugar/graphics/palettewindow.py index 82c4bbab..96e4da19 100644 --- a/src/sugar/graphics/palettewindow.py +++ b/src/sugar/graphics/palettewindow.py @@ -26,13 +26,10 @@ import logging import gtk import gobject import hippo -import pango from sugar.graphics import palettegroup from sugar.graphics import animator from sugar.graphics import style -from sugar.graphics.icon import Icon -from sugar import _sugarext # Helper function to find the gap position and size of widget a def _calculate_gap(a, b): @@ -906,8 +903,8 @@ class CellRendererInvoker(Invoker): def _redraw_path(self, path): model = self._tree_view.get_model() - iter = model.get_iter(path) - model.row_changed(path, iter) + iterator = model.get_iter(path) + model.row_changed(path, iterator) def __leave_notify_event_cb(self, widget, event): self.notify_mouse_leave() @@ -931,7 +928,7 @@ class CellRendererInvoker(Invoker): if pos is None: return False - path, column, x, y = pos + path_, column, x, y_ = pos for cell_renderer in column.get_cell_renderers(): if cell_renderer == self._cell_renderer: diff --git a/src/sugar/graphics/radiopalette.py b/src/sugar/graphics/radiopalette.py index 7667bccd..ff49e218 100644 --- a/src/sugar/graphics/radiopalette.py +++ b/src/sugar/graphics/radiopalette.py @@ -17,7 +17,6 @@ import gtk -from sugar.graphics import style from sugar.graphics.toolbutton import ToolButton from sugar.graphics.palette import Palette diff --git a/src/sugar/graphics/window.py b/src/sugar/graphics/window.py index 0d537765..4b25bc00 100644 --- a/src/sugar/graphics/window.py +++ b/src/sugar/graphics/window.py @@ -22,7 +22,6 @@ STABLE. import gobject import gtk -import logging import warnings from sugar.graphics.icon import Icon @@ -101,7 +100,8 @@ class Window(gtk.Window): self._event_box = gtk.EventBox() self._hbox.pack_start(self._event_box) self._event_box.show() - self._event_box.add_events(gtk.gdk.POINTER_MOTION_HINT_MASK | gtk.gdk.POINTER_MOTION_MASK) + self._event_box.add_events(gtk.gdk.POINTER_MOTION_HINT_MASK + | gtk.gdk.POINTER_MOTION_MASK) self._event_box.connect('motion-notify-event', self.__motion_notify_cb) self.add(self._vbox) diff --git a/src/sugar/presence/buddy.py b/src/sugar/presence/buddy.py index 57cd7107..877a798c 100644 --- a/src/sugar/presence/buddy.py +++ b/src/sugar/presence/buddy.py @@ -153,9 +153,9 @@ class Buddy(gobject.GObject): """Retrieve our dbus object path""" return self._object_path - def _emit_icon_changed_signal(self, bytes): + def _emit_icon_changed_signal(self, icon_data): """Emit GObject signal when icon has changed""" - self._icon = str(bytes) + self._icon = str(icon_data) self.emit('icon-changed') return False