Permalink
Browse files

Compact code in timeline/timeline.py and timeline/track.py

  • Loading branch information...
1 parent 5942413 commit b52b4bb7dadc218363f0d2568ac877c7d603d058 @nekohayo committed Jun 3, 2012
Showing with 5 additions and 10 deletions.
  1. +2 −4 pitivi/timeline/timeline.py
  2. +3 −6 pitivi/timeline/track.py
View
6 pitivi/timeline/timeline.py
@@ -270,8 +270,7 @@ def getItemsInArea(self, x1, y1, x2, y2):
@type x1: An C{int}
@param y1: The vertical coordinate of the up left corner of the area
@type y1: An C{int}
- @param x2: The horizontal coordinate of the down right corner of the
- area
+ @param x2: The horizontal coordinate of the down right area corner
@type x2: An C{int}
@param x2: The vertical coordinate of the down right corner of the area
@type x2: An C{int}
@@ -345,8 +344,7 @@ def _selectionEnd(self, item, target, event):
return True
def _objectsUnderMarquee(self):
- items = self.get_items_in_area(self._marquee.get_bounds(), True, True,
- True)
+ items = self.get_items_in_area(self._marquee.get_bounds(), True, True, True)
if items:
return set((item.element for item in items if isinstance(item,
TrackObject) and item.bg in items))
View
9 pitivi/timeline/track.py
@@ -507,11 +507,9 @@ def _clipAppearanceSettingsChangedCb(self, *args):
pattern = unpack_cairo_gradient(color)
self.bg.props.fill_pattern = pattern
self.namebg.props.fill_pattern = pattern
- self._selec_indic.props.fill_pattern = unpack_cairo_pattern(
- self.settings.selectedColor)
+ self._selec_indic.props.fill_pattern = unpack_cairo_pattern(self.settings.selectedColor)
self.name.props.font = self.settings.clipFontDesc
- self.name.props.fill_pattern = unpack_cairo_pattern(
- self.settings.clipFontColor)
+ self.name.props.fill_pattern = unpack_cairo_pattern(self.settings.clipFontColor)
twidth, theight = text_size(self.name)
self.namewidth = twidth
self.nameheight = theight
@@ -590,8 +588,7 @@ def _update(self):
if width < min_width:
width = min_width
w = width - handles_width
- self.name.props.clip_path = "M%g,%g h%g v%g h-%g z" % (
- 0, 0, w, self.height, w)
+ self.name.props.clip_path = "M%g,%g h%g v%g h-%g z" % (0, 0, w, self.height, w)
self.bg.props.width = width
self._selec_indic.props.width = width

0 comments on commit b52b4bb

Please sign in to comment.