~juliank/software-center/debian-next

« back to all changes in this revision

Viewing changes to softwarecenter/enums.py

  • Committer: Julian Andres Klode
  • Date: 2010-08-02 15:20:09 UTC
  • mfrom: (429.62.230 trunk)
  • Revision ID: jak@debian.org-20100802152009-r5s64zd6rb43g7pa
* Merge with Ubuntu's 2.1 series (2.1.7 + bzr), remaining differences:
  - po/cs.po: Updated.
  - softwarecenter/app.py: Remove views menu when not on Ubuntu.
  - setup.py: Support + and - in version numbers.
  - setup.py, setup.cfg: Use unbranded stuff.
  - debian/control:
    - Update Standards-Version
    - Change Vcs-Bzr, Maintainer to Debian.
    - Do not depend on humanity-icon-theme, but gnome-icon-theme.
    - Remove Ubuntu from package description-
  - debian/rules:
    - Drop the old hack for handling non-Ubuntu systems.
    - Run build_i18n in clean.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
APP_INSTALL_DESKTOP_PATH = APP_INSTALL_PATH+"/desktop/"
24
24
APP_INSTALL_CHANNELS_PATH = APP_INSTALL_PATH+"/channels/"
25
25
ICON_PATH = APP_INSTALL_PATH+"/icons/"
26
 
 
27
 
# icon
 
26
SOFTWARE_CENTER_PLUGIN_DIR = "/usr/share/software-center/plugins"
 
27
 
 
28
# the various "views" that the app has
 
29
VIEW_PAGE_AVAILABLE = "view-page-available"
 
30
VIEW_PAGE_INSTALLED = "view-page-installed"
 
31
VIEW_PAGE_HISTORY =  "view-page-history"
 
32
VIEW_PAGE_SEPARATOR_1 = "view-page-separator-1"
 
33
VIEW_PAGE_PENDING =  "view-page-pending"
 
34
VIEW_PAGE_CHANNEL = "view-page-channel"
 
35
 
 
36
# items considered "permanent", that is, if a item disappears
 
37
# (e.g. progress) then switch back to the previous on in permanent
 
38
# views (LP:  #431907)
 
39
PERMANENT_VIEWS = [VIEW_PAGE_AVAILABLE,
 
40
                   VIEW_PAGE_INSTALLED,
 
41
                   VIEW_PAGE_CHANNEL,
 
42
                   VIEW_PAGE_HISTORY,
 
43
                  ]
 
44
 
 
45
# icons
28
46
MISSING_APP_ICON = "applications-other"
 
47
MISSING_PKG_ICON = "dialog-question"
29
48
 
 
49
# sorting
 
50
(SORT_UNSORTED,
 
51
 SORT_BY_ALPHABET,
 
52
 SORT_BY_SEARCH_RANKING,
 
53
 SORT_BY_CATALOGED_TIME,
 
54
) = range(4)
30
55
 
31
56
# values used in the database
32
57
XAPIAN_VALUE_APPNAME = 170
40
65
XAPIAN_VALUE_ARCHIVE_CHANNEL = 178
41
66
XAPIAN_VALUE_DESKTOP_FILE = 179
42
67
 
 
68
# pkg action state constants
 
69
PKG_STATE_INSTALLED     = 0
 
70
PKG_STATE_UNINSTALLED   = 1
 
71
PKG_STATE_UPGRADABLE    = 2
 
72
PKG_STATE_INSTALLING    = 3
 
73
PKG_STATE_REMOVING      = 4
 
74
PKG_STATE_UPGRADING     = 5
 
75
PKG_STATE_NEEDS_SOURCE  = 6
 
76
PKG_STATE_UNKNOWN       = 7
 
77
PKG_STATE_REINSTALLABLE = 8
 
78
 
 
79
# application actions
 
80
APP_ACTION_INSTALL = "install"
 
81
APP_ACTION_REMOVE = "remove"
 
82
APP_ACTION_UPGRADE = "upgrade"
43
83
 
44
84
from version import *
45
85
USER_AGENT="Software Center/%s (N;) %s/%s (%s)" % (VERSION,