~ubuntu-branches/debian/sid/guake/sid

« back to all changes in this revision

Viewing changes to src/globals.py

  • Committer: Package Import Robot
  • Author(s): Daniel Echeverry
  • Date: 2014-09-05 21:47:17 UTC
  • mfrom: (1.2.1) (22.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20140905214717-s239dpeg4o9cn0u6
Tags: 0.5.0-1
* New upstream release.
* debian/control
  + Update Vcs-* fields.
* guake.postinst/guake.prerm
  + Register guake as x-terminal-emulator. Closes: #736184
* remove postint and prerm file because are duplicates

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8; -*-
2
 
"""
3
 
Copyright (C) 2007-2009 Lincoln de Sousa <lincoln@minaslivre.org>
4
 
Copyright (C) 2007 Gabriel Falcão <gabrielteratos@gmail.com>
5
 
 
6
 
This program is free software; you can redistribute it and/or
7
 
modify it under the terms of the GNU General Public License as
8
 
published by the Free Software Foundation; either version 2 of the
9
 
License, or (at your option) any later version.
10
 
 
11
 
This program 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 GNU
14
 
General Public License for more details.
15
 
 
16
 
You should have received a copy of the GNU General Public
17
 
License along with this program; if not, write to the
18
 
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19
 
Boston, MA 02111-1307, USA.
20
 
"""
21
 
 
22
 
__all__ = [
23
 
    'NAME', 'VERSION', 'IMAGE_DIR', 'GLADE_DIR', 'LOCALE_DIR',
24
 
    'GCONF_PATH', 'KEY', 'TERMINAL_MATCH_EXPRS', 'TERMINAL_MATCH_TAGS',
25
 
    'ALIGN_CENTER', 'ALIGN_RIGHT', 'ALIGN_LEFT',
26
 
    ]
27
 
 
28
 
NAME = 'guake'
29
 
VERSION = '0.4.4'
30
 
IMAGE_DIR = '/usr/local/share/pixmaps/' + NAME
31
 
GLADE_DIR = '/usr/local/share/' + NAME
32
 
LOCALE_DIR = '/usr/local/share/locale'
33
 
 
34
 
# Gconf stuff. Yep, it is hardcoded =)
35
 
GCONF_PATH = '/apps/guake'
36
 
KEY = lambda x: (GCONF_PATH+x)
37
 
 
38
 
# regular expressions to highlight links in terminal. This code was
39
 
# lovely stolen from the great gnome-terminal project, thank you =)
40
 
USERCHARS = "-[:alnum:]"
41
 
PASSCHARS = "-[:alnum:],?;.:/!%$^*&~\"#'"
42
 
HOSTCHARS = "-[:alnum:]"
43
 
HOST      = "[" + HOSTCHARS + "]+(\\.[" + HOSTCHARS + "]+)*"
44
 
PORT      = "(:[:digit:]{1,5})?"
45
 
PATHCHARS =  "-[:alnum:]_$.+!*(),;:@&=?/~#%"
46
 
SCHEME    = "(news:|telnet:|nntp:|file:/|https?:|ftps?:|webcal:)"
47
 
USER      = "[" + USERCHARS + "]+(:[" + PASSCHARS + "]+)?"
48
 
URLPATH   = "/[" + PATHCHARS + "]*[^]'.}>) \t\r\n,\\\"]"
49
 
 
50
 
TERMINAL_MATCH_EXPRS = [
51
 
  "\<" + SCHEME + "//(" + USER + "@)?" + HOST + PORT + "(" + URLPATH + ")?\>/?",
52
 
  "\<(www|ftp)[" + HOSTCHARS + "]*\." + HOST + PORT + "(" +URLPATH + ")?\>/?",
53
 
  "\<(mailto:)?[" + USERCHARS + "][" + USERCHARS + ".]*@[" + HOSTCHARS +
54
 
  "]+\." + HOST + "\>"
55
 
  ]
56
 
 
57
 
TERMINAL_MATCH_TAGS = 'schema', 'http', 'email'
58
 
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT = range(3)