Fixes for pep8 1.5
This commit is contained in:
@@ -267,7 +267,7 @@ class _IconBuffer(object):
|
||||
# document-generic. If that doesn't work out, bail.
|
||||
icon_width = None
|
||||
for (file_name, icon_name) in ((self.file_name, self.icon_name),
|
||||
(None, 'document-generic')):
|
||||
(None, 'document-generic')):
|
||||
icon_info = self._get_icon_info(file_name, icon_name)
|
||||
if icon_info.file_name is None:
|
||||
return None
|
||||
@@ -347,7 +347,7 @@ class Icon(Gtk.Image):
|
||||
|
||||
__gtype_name__ = 'SugarIcon'
|
||||
|
||||
#FIXME: deprecate icon_size
|
||||
# FIXME: deprecate icon_size
|
||||
_MENU_SIZES = (Gtk.IconSize.MENU, Gtk.IconSize.DND,
|
||||
Gtk.IconSize.SMALL_TOOLBAR, Gtk.IconSize.BUTTON)
|
||||
|
||||
@@ -360,7 +360,7 @@ class Icon(Gtk.Image):
|
||||
self._alpha = 1.0
|
||||
self._scale = 1.0
|
||||
|
||||
#FIXME: deprecate icon_size
|
||||
# FIXME: deprecate icon_size
|
||||
if 'icon_size' in kwargs:
|
||||
logging.warning("icon_size is deprecated. Use pixel_size instead.")
|
||||
|
||||
@@ -391,7 +391,7 @@ class Icon(Gtk.Image):
|
||||
if self._buffer.file_name != self.props.file:
|
||||
self._buffer.file_name = self.props.file
|
||||
|
||||
#FIXME: deprecate icon_size
|
||||
# FIXME: deprecate icon_size
|
||||
pixel_size = None
|
||||
if self.props.pixel_size == -1:
|
||||
if self.props.icon_size in self._MENU_SIZES:
|
||||
@@ -453,9 +453,9 @@ class Icon(Gtk.Image):
|
||||
|
||||
allocation = self.get_allocation()
|
||||
x = math.floor(xpad +
|
||||
(allocation.width - requisition.width) * xalign)
|
||||
(allocation.width - requisition.width) * xalign)
|
||||
y = math.floor(ypad +
|
||||
(allocation.height - requisition.height) * yalign)
|
||||
(allocation.height - requisition.height) * yalign)
|
||||
|
||||
if self._scale != 1.0:
|
||||
cr.scale(self._scale, self._scale)
|
||||
|
||||
@@ -75,7 +75,7 @@ class Group(GObject.GObject):
|
||||
self._sig_ids[palette].append(sid)
|
||||
|
||||
def remove(self, palette):
|
||||
if not palette in self._palettes:
|
||||
if palette not in self._palettes:
|
||||
# This happens when converting a window based palette to a menu
|
||||
# based one.
|
||||
return
|
||||
|
||||
@@ -171,7 +171,7 @@ class ToolbarBox(Gtk.VBox):
|
||||
return self.toolbar.get_nth_item(self._expanded_button_index)
|
||||
|
||||
def set_expanded_button(self, button):
|
||||
if not button in self.toolbar:
|
||||
if button not in self.toolbar:
|
||||
self._expanded_button_index = -1
|
||||
return
|
||||
self._expanded_button_index = self.toolbar.get_item_index(button)
|
||||
|
||||
Reference in New Issue
Block a user