~ubuntuone-control-tower/software-center/trunk

« back to all changes in this revision

Viewing changes to softwarecenter/ui/gtk3/widgets/spinner.py

* lp:~mvo/software-center/lobby-visual-mvo-workaround-lp1048912:
  - workaround for visual corruption that is occuring
    on startup when recommendations are enabled
    (LP: #1048912)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
# Authors:
4
4
#  Gary Lasker
 
5
#  Natalia Bidart
5
6
#
6
7
# This program is free software; you can redistribute it and/or modify it under
7
8
# the terms of the GNU General Public License as published by the Free Software
111
112
        """ show the spinner page with a alternative message """
112
113
        if msg:
113
114
            self.spinner_view.set_text(msg)
114
 
        # "mask" the spinner view momentarily to prevent it from flashing into
 
115
        # delay showing the spinner view prevent it from flashing into
115
116
        # view in the case of short delays where it isn't actually needed
116
 
        self.spinner_view.stop_and_hide()
117
 
        self._last_timeout_id = GObject.timeout_add(250,
118
 
                                                    self._unmask_view_spinner)
 
117
        # (but only if its not already visible anyway)
 
118
        if self.get_current_page() == self.CONTENT_PAGE:
 
119
            self.spinner_view.stop_and_hide()
 
120
            self._last_timeout_id = GObject.timeout_add(
 
121
                250, self._unmask_view_spinner)
119
122
 
120
123
    def hide_spinner(self):
121
124
        """ hide the spinner page again and show the content page """