~ubuntu-branches/ubuntu/gutsy/gedit/gutsy-proposed

« back to all changes in this revision

Viewing changes to plugins/snippets/snippets/Library.py

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2007-09-28 14:21:05 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20070928142105-qoi1dwkib1qxh1vb
Tags: 2.20.1-0ubuntu2
* Don't drop the upload made during the freeze
* debian/patches/90_from_svn_fix_snippets_syntax.patch:
  - dropped, fixed with the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
 
77
77
                self.properties = {}
78
78
                props = SnippetData.PROPS.copy()
79
 
                
 
79
 
80
80
                # Store all properties present
81
81
                for child in node:
82
 
                        if props.has_key(child.tag):
 
82
                        if child.tag in props:
83
83
                                del props[child.tag]
84
 
                                
 
84
 
85
85
                                # Normalize accelerator
86
86
                                if child.tag == 'accelerator' and child.text != None:
87
87
                                        keyval, mod = gtk.accelerator_parse(child.text)
88
 
                                        
89
 
                                        if not gtk.accelerator_valid(keyval, mod):
 
88
 
 
89
                                        if gtk.accelerator_valid(keyval, mod):
 
90
                                                child.text = gtk.accelerator_name(keyval, mod)
 
91
                                        else:
90
92
                                                child.text = ''
91
 
                                        else:
92
 
                                                child.text = gtk.accelerator_name(keyval, mod)
93
 
                                
 
93
 
94
94
                                if self.can_modify():
95
95
                                        self.properties[child.tag] = child
96
96
                                else: