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

« back to all changes in this revision

Viewing changes to stock.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
 
 
3
 
#   This file is part of emesene.
4
 
#
5
 
#    Emesene is free software; you can redistribute it and/or modify
6
 
#    it under the terms of the GNU General Public License as published by
7
 
#    the Free Software Foundation; either version 2 of the License, or
8
 
#    (at your option) any later version.
9
 
#
10
 
#    emesene is distributed in the hope that it will be useful,
11
 
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
#    GNU General Public License for more details.
14
 
#
15
 
#    You should have received a copy of the GNU General Public License
16
 
#    along with emesene; if not, write to the Free Software
17
 
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
 
'''a module that map the abstract.stock module to gtk'''
19
 
import gtk
20
 
 
21
 
from abstract.stock import *
22
 
 
23
 
MAP = {}
24
 
MAP[ACCEPT] = gtk.STOCK_OK
25
 
MAP[ADD] = gtk.STOCK_ADD
26
 
MAP[APPLY] = gtk.STOCK_APPLY
27
 
MAP[BACK] = gtk.STOCK_GO_BACK
28
 
MAP[BOLD] = gtk.STOCK_BOLD
29
 
MAP[CANCEL] = gtk.STOCK_CANCEL
30
 
MAP[CLEAR] = gtk.STOCK_CLEAR
31
 
MAP[CLOSE] = gtk.STOCK_CLOSE
32
 
MAP[CONNECT] = gtk.STOCK_CONNECT
33
 
MAP[DELETE] = gtk.STOCK_DELETE
34
 
MAP[DISCONNECT] = gtk.STOCK_DISCONNECT
35
 
MAP[DOWN] = gtk.STOCK_GO_DOWN
36
 
MAP[EDIT] = gtk.STOCK_EDIT
37
 
MAP[ERROR] = gtk.STOCK_DIALOG_ERROR
38
 
MAP[FORWARD] = gtk.STOCK_GO_FORWARD
39
 
MAP[INFORMATION] = gtk.STOCK_DIALOG_INFO
40
 
MAP[ITALIC] = gtk.STOCK_ITALIC
41
 
MAP[NEW] = gtk.STOCK_NEW
42
 
MAP[NO] = gtk.STOCK_NO
43
 
MAP[OK] = gtk.STOCK_OK
44
 
MAP[OPEN] = gtk.STOCK_OPEN
45
 
MAP[PREFERENCES] = gtk.STOCK_PREFERENCES
46
 
MAP[PROPERTIES] = gtk.STOCK_PROPERTIES
47
 
MAP[QUESTION] = gtk.STOCK_DIALOG_QUESTION
48
 
MAP[QUIT] = gtk.STOCK_QUIT
49
 
MAP[REFRESH] = gtk.STOCK_REFRESH
50
 
MAP[REMOVE] = gtk.STOCK_REMOVE
51
 
MAP[SAVE] = gtk.STOCK_SAVE
52
 
MAP[SELECT_COLOR] = gtk.STOCK_SELECT_COLOR
53
 
MAP[SELECT_FONT] = gtk.STOCK_SELECT_FONT
54
 
MAP[STOP] = gtk.STOCK_STOP
55
 
MAP[STRIKE] = gtk.STOCK_STRIKETHROUGH
56
 
MAP[UNDERLINE] = gtk.STOCK_UNDERLINE
57
 
MAP[UP] = gtk.STOCK_GO_UP
58
 
MAP[WARNING] = gtk.STOCK_DIALOG_WARNING
59
 
MAP[YES] = gtk.STOCK_YES
60
 
MAP[ABOUT] = gtk.STOCK_ABOUT
61
 
MAP[COPY] = gtk.STOCK_COPY
62
 
 
63
 
def map_stock(stock_id, default=None):
64
 
    '''try to return a gtk.STOCK_ from the given stock_id
65
 
    if not found, return default'''
66
 
 
67
 
    if stock_id in MAP:
68
 
        return MAP[stock_id]
69
 
 
70
 
    return default