~ubuntu-branches/ubuntu/trusty/autokey/trusty

« back to all changes in this revision

Viewing changes to src/lib/service.py

  • Committer: Bazaar Package Importer
  • Author(s): Luke Faraone
  • Date: 2011-02-08 09:36:20 UTC
  • mfrom: (1.4.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110208093620-vlkei0e11x4228gw
Tags: 0.71.2-1
* New upstream version.  
* Update copyright file to match upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
# -*- coding: utf-8 -*-
3
3
 
4
 
# Copyright (C) 2008 Chris Dekter
5
 
 
6
 
# This program is free software; you can redistribute it and/or modify
 
4
# Copyright (C) 2011 Chris Dekter
 
5
#
 
6
# This program is free software: you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
8
 
# the Free Software Foundation; either version 2 of the License, or
 
8
# the Free Software Foundation, either version 3 of the License, or
9
9
# (at your option) any later version.
10
10
#
11
 
# This program is distributed in the hope that it will be useful, but
12
 
# 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.
 
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
 
14
# GNU General Public License for more details.
15
15
#
16
16
# You should have received a copy of the GNU General Public License
17
 
# along with this program; if not, write to the Free Software
18
 
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
18
 
20
19
import time, logging, threading, traceback
21
20
import common
119
118
            menu = None
120
119
 
121
120
            for item in self.configManager.hotKeys:
122
 
                if item.check_hotkey(modifiers, key, windowName):
 
121
                if item.check_hotkey(modifiers, rawKey, windowName):
123
122
                    itemMatch = item
124
123
                    break
125
124
 
134
133
            else:
135
134
                logger.debug("No phrase/script matched hotkey")
136
135
                for folder in self.configManager.hotKeyFolders:
137
 
                    if folder.check_hotkey(modifiers, key, windowName):
 
136
                    if folder.check_hotkey(modifiers, rawKey, windowName):
138
137
                        #menu = PopupMenu(self, [folder], [])
139
138
                        menu = ([folder], [])
140
139