~ubuntu-branches/ubuntu/oneiric/ubuntuone-client/oneiric

« back to all changes in this revision

Viewing changes to ubuntuone/syncdaemon/status_listener.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2011-02-23 18:34:09 UTC
  • mfrom: (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20110223183409-535o7yo165wbjmca
Tags: 1.5.5-0ubuntu1
* New upstream release.
  - Subscribing to a RO share will not download content (LP: #712528)
  - Can't synchronize "~/Ubuntu One Music" (LP: #714976)
  - Syncdaemon needs to show progress in Unity launcher (LP: #702116)
  - Notifications say "your cloud" (LP: #715887)
  - No longer requires python-libproxy
  - Recommend unity and indicator libs by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Listener for event queue that updates the UI to show syncdaemon status."""
19
19
 
20
20
from ubuntuone.status.aggregator import StatusFrontend
21
 
from ubuntuone.syncdaemon import action_queue
 
21
from ubuntuone.syncdaemon import action_queue, config
22
22
 
23
23
def should_start_listener():
24
24
    """Check if the status listener should be started."""
37
37
class StatusListener(object):
38
38
    """SD listener for EQ events that turns them into status updates."""
39
39
 
 
40
    _show_all_notifications = True
 
41
 
40
42
    def __init__(self, fsm, vm, status_frontend):
41
43
        """Initialize this instance with the FSM and VM."""
42
44
        self.fsm = fsm
43
45
        self.vm = vm
44
46
        self.status_frontend = status_frontend
 
47
        user_conf = config.get_user_config()
 
48
        self.show_all_notifications = user_conf.get_show_all_notifications()
 
49
 
 
50
    def get_show_all_notifications(self):
 
51
        """Get the value of show_all_notifications."""
 
52
        return self._show_all_notifications
 
53
 
 
54
    def set_show_all_notifications(self, value):
 
55
        """Set the value of show_all_notifications."""
 
56
        self._show_all_notifications = value
 
57
        self.status_frontend.set_show_all_notifications(value)
 
58
 
 
59
    show_all_notifications = property(get_show_all_notifications,
 
60
                                      set_show_all_notifications)
45
61
 
46
62
    def handle_AQ_CHANGE_PUBLIC_ACCESS_OK(self, share_id, node_id, is_public,
47
63
                                                  public_url):