~ubuntu-branches/ubuntu/precise/ubuntuone-client/precise-201112142106

« back to all changes in this revision

Viewing changes to ubuntuone/platform/linux/launcher.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2011-08-09 12:47:56 UTC
  • mfrom: (1.1.53 upstream)
  • Revision ID: james.westby@ubuntu.com-20110809124756-7nzilp3oix0a1yl9
Tags: 1.7.1-0ubuntu1
* New upstream release.
* debian/*:
  - Removed obsolete pycompat file
  - Removed ubuntuone-client-gnome deps and binary packaging, as it was
    moved out to separate project upstream.
  - Updated copyright to remove obsolete file reference
* debian/patches:
  - Removed patches which have been included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    """The Ubuntu One launcher icon."""
31
31
 
32
32
    def __init__(self):
33
 
        """Initialize this instance."""
34
33
        self.entry = Unity.LauncherEntry.get_for_desktop_id(U1_DOTDESKTOP)
35
34
 
36
35
    def show_progressbar(self):
37
 
        """The progressbar is shown."""
38
 
        self.entry.props.progress_visible = True
 
36
        """Show the progress bar."""
 
37
        self.entry.set_property('progress_visible', True)
39
38
 
40
39
    def hide_progressbar(self):
41
 
        """The progressbar is hidden."""
42
 
        self.entry.props.progress_visible = False
 
40
        """Hide the progress bar."""
 
41
        self.entry.set_property('progress_visible', False)
43
42
 
44
43
    def set_progress(self, value):
45
 
        """The progressbar value is changed."""
46
 
        self.entry.props.progress = value
 
44
        """Change progressbar value."""
 
45
        self.entry.set_property('progress', value)
47
46
 
48
47
    def set_urgent(self, value=True):
49
48
        """Set the launcher to urgent."""
50
 
        self.entry.props.urgent = value
 
49
        self.entry.set_property('urgent', value)
 
50
 
 
51
    def set_count(self, value):
 
52
        """Set the count value."""
 
53
        self.entry.set_property('count', value)
 
54
 
 
55
    def show_count(self):
 
56
        """Show the count."""
 
57
        self.entry.set_property('count_visible', True)
 
58
 
 
59
    def hide_count(self):
 
60
        """Show the count."""
 
61
        self.entry.set_property('count_visible', False)
51
62
 
52
63
 
53
64
class DummyLauncher(object):
68
79
    def set_urgent(self, value=True):
69
80
        """Set the launcher to urgent."""
70
81
 
 
82
    def set_count(self, value):
 
83
        """Set the count value."""
 
84
 
 
85
    def show_count(self):
 
86
        """Show the count."""
 
87
 
 
88
    def hide_count(self):
 
89
        """Show the count."""
 
90
 
71
91
 
72
92
UbuntuOneLauncher = UbuntuOneLauncherUnity if use_libunity else DummyLauncher