~ubuntu-branches/ubuntu/natty/software-center/natty-security

« back to all changes in this revision

Viewing changes to softwarecenter/view/widgets/carousel.py

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2011-03-07 20:40:10 UTC
  • Revision ID: james.westby@ubuntu.com-20110307204010-xykj0i9ped9y7uy0
Tags: 3.1.23.1
* softwarecenter/db/reviews.py:
  - fix crash when submitting new review

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
        self._is_playing = False
95
95
        self._play_offset = 0
96
96
        self._user_offset_override = None
97
 
        self._width = 0
 
97
        self._allocation = None
98
98
        self._alpha = 1.0
99
99
        self._fader = 0
100
100
        self._layout = None
108
108
 
109
109
    def _on_allocate(self, widget, allocation):
110
110
        logging.getLogger("softwarecenter.view.allocation").debug("on_alloc widget=%s, allocation=%s" % (widget, allocation))
111
 
        if allocation.width == self._width: 
 
111
        if allocation == self._allocation or allocation.width <= 200: 
112
112
            logging.getLogger("softwarecenter.view.allocation").debug("CarouselView skipped!")
113
113
            return
114
 
        self._width = allocation.width
115
 
        self._build_view(self._width)
 
114
 
 
115
        self._allocation = allocation
 
116
        self._build_view(allocation.width)
116
117
        return
117
118
 
118
119
    def _on_page_clicked(self, page_sel, page):