~didrocks/ubuntuone-client/use_result_var

« back to all changes in this revision

Viewing changes to ubuntuone/platform/windows/messaging.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2011-02-11 16:18:11 UTC
  • mto: This revision was merged to the branch mainline in revision 67.
  • Revision ID: james.westby@ubuntu.com-20110211161811-n18dj9lde7dxqjzr
Tags: upstream-1.5.4
ImportĀ upstreamĀ versionĀ 1.5.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# ubuntuone.syncdaemon.platform.messaging - Messages to the user
 
2
#
 
3
# Author: Eric Casteleijn <eric.casteleijn@canonical.com>
 
4
#
 
5
# Copyright 2011 Canonical Ltd.
 
6
#
 
7
# This program is free software: you can redistribute it and/or modify it
 
8
# under the terms of the GNU General Public License version 3, as published
 
9
# by the Free Software Foundation.
 
10
#
 
11
# This program is distributed in the hope that it will be useful, but
 
12
# WITHOUT ANY WARRANTY; without even the implied warranties of
 
13
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
 
14
# PURPOSE.  See the GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License along
 
17
# with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
"""Module that implements sending messages to the end user."""
 
19
 
 
20
# TODO: We may want to enable different messaging systems. When none
 
21
# of them are available, we should fall back to silently discarding
 
22
# messages.
 
23
 
 
24
from ubuntuone.status.messaging import AbstractMessaging
 
25
 
 
26
APPLICATION_NAME = 'Ubuntu One Client'
 
27
 
 
28
 
 
29
class Messaging(AbstractMessaging):
 
30
    """Notification of the end user."""
 
31
 
 
32
    # pylint: disable=R0913
 
33
    def show_message(self, sender, callback=None, message_time=None,
 
34
                     message_count=None, icon=None):
 
35
        """Show a message in the messaging menu."""
 
36
        # TODO: make this work
 
37
    # pylint: enable=R0913
 
38
 
 
39
    def update_count(self, sender, add_count):
 
40
        """Update the count for an existing indicator."""
 
41
        # TODO: make this work
 
42
 
 
43
 
 
44
def hide_message(indicator):            # pylint: disable=W0613
 
45
    """Remove the message once it has been dealt with."""
 
46
    # TODO: make this work
 
47
 
 
48
 
 
49
def open_volumes(the_indicator, message_time=None):  # pylint: disable=W0613
 
50
    """Open the control panel to the shares tab."""
 
51
    # TODO: make this work