~ubuntu-branches/ubuntu/natty/pida/natty

« back to all changes in this revision

Viewing changes to pida/core/languages.py

  • Committer: Bazaar Package Importer
  • Author(s): Jan Luebbe
  • Date: 2007-09-05 17:54:09 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070905175409-ty9f6qpuctyjv1sd
Tags: 0.5.1-2
* Depend on librsvg2-common, which is not pulled in by the other depends
  (closes: #394860)
* gvim is no alternative for python-gnome2 and python-gnome2-extras
  (closes: #436431)
* Pida now uses ~/.pida2, so it can no longer be confused by old
  configurations (closes: #421378)
* Culebra is no longer supported by upstream (closes: #349009)
* Update manpage (closes: #440375)
* Update watchfile (pida is now called PIDA)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*- 
2
 
 
3
 
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
4
 
#Copyright (c) 2005 Ali Afshar aafshar@gmail.com
5
 
 
6
 
#Permission is hereby granted, free of charge, to any person obtaining a copy
7
 
#of this software and associated documentation files (the "Software"), to deal
8
 
#in the Software without restriction, including without limitation the rights
9
 
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
 
#copies of the Software, and to permit persons to whom the Software is
11
 
#furnished to do so, subject to the following conditions:
12
 
 
13
 
#The above copyright notice and this permission notice shall be included in
14
 
#all copies or substantial portions of the Software.
15
 
 
16
 
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
 
#IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
 
#FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
 
#AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
 
#LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
 
#OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
 
#SOFTWARE.
23
 
 
24
 
import actions
25
 
 
26
 
class language_handler(actions.action_handler):
27
 
 
28
 
    type_name = 'language'
29
 
 
30
 
    file_name_globs = []
31
 
    first_line_globs = []
32
 
 
33
 
    def __init__(self, *args):
34
 
        actions.action_handler.__init__(self, *args)
35
 
        self.service.uncache = self.uncache
36
 
        self.__active = True
37
 
 
38
 
    def uncache(self, document):
39
 
        if document.unique_id in self.cached:
40
 
            del self.cached[document.unique_id]
41
 
            self.load_document(document)
42
 
 
43
 
    def get_active(self):
44
 
        return self.__active
45
 
 
46
 
    def set_active(self, active):
47
 
        self.__active = active
48
 
 
49
 
    active = property(get_active, set_active)
50
 
 
51