~ubuntu-branches/ubuntu/oneiric/emesene/oneiric-proposed

« back to all changes in this revision

Viewing changes to abstract/status.py

  • Committer: Bazaar Package Importer
  • Author(s): Devid Antonio Filoni
  • Date: 2011-03-03 14:49:13 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20110303144913-0adl9cmw2s35lvzo
Tags: 2.0~git20110303-0ubuntu1
* New upstream git revision (LP: #728469).
* Remove debian/watch, debian/emesene.xpm, debian/install and
  debian/README.source files.
* Remove 21_svn2451_fix_avatar and 20_dont_build_own_libmimic patches.
* debian/control: modify python to python (>= 2.5) in Build-Depends field.
* debian/control: remove python-libmimic from Recommends field.
* debian/control: modify python-gtk2 (>= 2.10) to python-gtk2 (>= 2.12) in
  Depends field.
* debian/control: add python-appindicator and python-xmpp to Recommends
  field.
* debian/control: add python-papyon (>= 0.5.4) and python-webkit to Depends
  field.
* debian/control: update Description field.
* debian/control: add python-setuptools to Build-Depends field.
* debian/control: move python-dbus and python-notify to Depends field.
* Update debian/copyright file.
* Update debian/links file.
* debian/menu: update description field.
* Bump Standards-Version to 3.9.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
'''a module to handle abstract status for different IM clients'''
3
 
 
4
 
#   This file is part of emesene.
5
 
#
6
 
#    Emesene is free software; you can redistribute it and/or modify
7
 
#    it under the terms of the GNU General Public License as published by
8
 
#    the Free Software Foundation; either version 2 of the License, or
9
 
#    (at your option) any later version.
10
 
#
11
 
#    emesene is distributed in the hope that it will be useful,
12
 
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
#    GNU General Public License for more details.
15
 
#
16
 
#    You should have received a copy of the GNU General Public License
17
 
#    along with emesene; if not, write to the Free Software
18
 
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 
20
 
#import gettext
21
 
#_ = gettext.gettext
22
 
 
23
 
OFFLINE = 0
24
 
ONLINE = 1
25
 
BUSY = 2
26
 
AWAY = 3
27
 
IDLE = 4
28
 
INVISIBLE = 5
29
 
LUNCH = 6
30
 
TELEPHONE = 7
31
 
BE_RIGHT_BACK = 8
32
 
 
33
 
ORDERED = [ONLINE, BUSY, AWAY, BE_RIGHT_BACK, IDLE, LUNCH, TELEPHONE,
34
 
    INVISIBLE, OFFLINE]
35
 
 
36
 
STATUS = {OFFLINE : _('Offline'),
37
 
    ONLINE : _('Online'),
38
 
    BUSY : _('Busy'),
39
 
    AWAY : _('Away'),
40
 
    IDLE : _('Idle'),
41
 
    INVISIBLE : _('Invisible'),
42
 
    LUNCH : _('Lunch'),
43
 
    TELEPHONE : _('On the phone'),
44
 
    BE_RIGHT_BACK : _('Be right back')}
45
 
 
46
 
REVERSE = dict([(y, x) for x, y in STATUS.items()])
47
 
 
48
 
def is_valid(status):
49
 
    '''return True if status is a valid status value'''
50
 
 
51
 
    return status in STATUS
52