Merge lp:~lfaraone/ubuntu/lucid/autokey/merge0.61.5-1ubuntu1 into lp:ubuntu/lucid/autokey

Proposed by Luke Faraone
Status: Merged
Merged at revision: not available
Proposed branch: lp:~lfaraone/ubuntu/lucid/autokey/merge0.61.5-1ubuntu1
Merge into: lp:ubuntu/lucid/autokey
Diff against target: 15122 lines (+10561/-3781)
116 files modified
PKG-INFO (+1/-1)
autokey (+0/-13)
autokey-gtk (+13/-0)
autokey-qt (+13/-0)
config/autokey-gtk.desktop (+10/-0)
config/autokey-qt.desktop (+10/-0)
config/autokey.desktop (+0/-10)
debian/autokey-common.init (+150/-0)
debian/autokey-common.install (+13/-0)
debian/autokey-common.lintian-overrides (+1/-0)
debian/autokey-common.postinst (+41/-0)
debian/autokey-common.prerm (+34/-0)
debian/autokey-gtk.install (+6/-0)
debian/autokey-gtk.postinst (+9/-0)
debian/autokey-gtk.prerm (+12/-0)
debian/autokey-qt.install (+5/-0)
debian/autokey-qt.postinst (+9/-0)
debian/autokey-qt.prerm (+12/-0)
debian/autokey.1 (+0/-54)
debian/autokey.init (+0/-145)
debian/autokey.lintian-overrides (+0/-1)
debian/changelog (+45/-0)
debian/compat (+1/-1)
debian/control (+59/-14)
debian/copyright (+1/-1)
debian/patches/00list (+0/-1)
debian/patches/README (+4/-0)
debian/postinst (+0/-37)
debian/prerm (+0/-34)
debian/rules (+3/-6)
doc/man/autokey-gtk.1 (+54/-0)
doc/man/autokey-qt.1 (+54/-0)
glade/abbrselector.glade (+45/-0)
glade/abbrsettings.glade (+189/-0)
glade/folderpage.glade (+70/-0)
glade/hotkeysettings.glade (+151/-0)
glade/mainwindow.glade (+124/-0)
glade/phrasepage-old.glade (+118/-0)
glade/phrasepage.glade (+106/-0)
glade/recorddialog.glade (+145/-0)
glade/scriptpage.glade (+106/-0)
glade/settingsdialog.glade (+762/-0)
glade/settingswidget.glade (+197/-0)
glade/windowfiltersettings.glade (+87/-0)
setup.py (+8/-6)
src/lib/autokey.py (+0/-280)
src/lib/common.py (+48/-0)
src/lib/configmanager.py (+1/-1)
src/lib/daemon.py (+19/-15)
src/lib/gtkapp.py (+262/-0)
src/lib/gtkui/abbrselector.py (+93/-0)
src/lib/gtkui/configwindow.py (+1120/-0)
src/lib/gtkui/data/abbrselector.xml (+42/-0)
src/lib/gtkui/data/abbrsettings.xml (+208/-0)
src/lib/gtkui/data/folderpage.xml (+63/-0)
src/lib/gtkui/data/hotkeysettings.xml (+148/-0)
src/lib/gtkui/data/mainwindow.xml (+124/-0)
src/lib/gtkui/data/menus.xml (+71/-0)
src/lib/gtkui/data/phrasepage.xml (+99/-0)
src/lib/gtkui/data/recorddialog.xml (+154/-0)
src/lib/gtkui/data/scriptpage.xml (+99/-0)
src/lib/gtkui/data/settingsdialog.xml (+725/-0)
src/lib/gtkui/data/settingswidget.xml (+190/-0)
src/lib/gtkui/data/windowfiltersettings.xml (+88/-0)
src/lib/gtkui/dialogs.py (+376/-0)
src/lib/gtkui/notifier.py (+163/-0)
src/lib/gtkui/popupmenu.py (+125/-0)
src/lib/gtkui/settingsdialog.py (+222/-0)
src/lib/interface.py (+47/-37)
src/lib/plugin/manager.py (+0/-52)
src/lib/plugin/plugins.py (+0/-197)
src/lib/qtapp.py (+273/-0)
src/lib/qtui/abbrsettings.py (+70/-0)
src/lib/qtui/centralwidget.py (+79/-0)
src/lib/qtui/configwindow.py (+1083/-0)
src/lib/qtui/data/.directory (+2/-0)
src/lib/qtui/data/api.txt (+36/-0)
src/lib/qtui/data/gui.xml (+71/-0)
src/lib/qtui/dialogs.py (+379/-0)
src/lib/qtui/enginesettings.py (+52/-0)
src/lib/qtui/folderpage.py (+43/-0)
src/lib/qtui/generalsettings.py (+63/-0)
src/lib/qtui/hotkeysettings.py (+71/-0)
src/lib/qtui/interfacesettings.py (+63/-0)
src/lib/qtui/notifier.py (+96/-0)
src/lib/qtui/phrasepage.py (+51/-0)
src/lib/qtui/popupmenu.py (+187/-0)
src/lib/qtui/recorddialog.py (+51/-0)
src/lib/qtui/scriptpage.py (+49/-0)
src/lib/qtui/settingsdialog.py (+224/-0)
src/lib/qtui/settingswidget.py (+74/-0)
src/lib/qtui/specialhotkeysettings.py (+74/-0)
src/lib/qtui/windowfiltersettings.py (+38/-0)
src/lib/scripting.py (+262/-6)
src/lib/service.py (+15/-9)
src/lib/ui/abbrsettings.py (+0/-70)
src/lib/ui/centralwidget.py (+0/-79)
src/lib/ui/configwindow.py (+0/-1086)
src/lib/ui/data/.directory (+0/-2)
src/lib/ui/data/api.txt (+0/-36)
src/lib/ui/data/gui.xml (+0/-71)
src/lib/ui/dialogs.py (+0/-379)
src/lib/ui/enginesettings.py (+0/-52)
src/lib/ui/folderpage.py (+0/-43)
src/lib/ui/generalsettings.py (+0/-63)
src/lib/ui/hotkeysettings.py (+0/-71)
src/lib/ui/interfacesettings.py (+0/-63)
src/lib/ui/notifier.py (+0/-97)
src/lib/ui/phrasepage.py (+0/-51)
src/lib/ui/popupmenu.py (+0/-187)
src/lib/ui/recorddialog.py (+0/-51)
src/lib/ui/scriptpage.py (+0/-49)
src/lib/ui/settingsdialog.py (+0/-224)
src/lib/ui/settingswidget.py (+0/-74)
src/lib/ui/specialhotkeysettings.py (+0/-74)
src/lib/ui/windowfiltersettings.py (+0/-38)
To merge this branch: bzr merge lp:~lfaraone/ubuntu/lucid/autokey/merge0.61.5-1ubuntu1
Reviewer Review Type Date Requested Status
Ubuntu Sponsors Pending
Review via email: mp+22227@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'PKG-INFO'
2--- PKG-INFO 2010-01-08 08:52:58 +0000
3+++ PKG-INFO 2010-03-26 15:01:22 +0000
4@@ -1,6 +1,6 @@
5 Metadata-Version: 1.0
6 Name: autokey
7-Version: 0.61.2
8+Version: 0.61.5
9 Summary: Desktop automation utility
10 Home-page: http://autokey.googlecode.com/
11 Author: Chris Dekter
12
13=== removed file 'autokey'
14--- autokey 2009-09-27 15:08:28 +0000
15+++ autokey 1970-01-01 00:00:00 +0000
16@@ -1,13 +0,0 @@
17-#!/usr/bin/env python
18-# -*- coding: utf-8 -*-
19-
20-import sys
21-from autokey.autokey import Application
22-
23-a = Application()
24-try:
25- a.main()
26-except KeyboardInterrupt:
27- a.shutdown()
28-sys.exit(0)
29-
30
31=== added file 'autokey-gtk'
32--- autokey-gtk 1970-01-01 00:00:00 +0000
33+++ autokey-gtk 2010-03-26 15:01:22 +0000
34@@ -0,0 +1,13 @@
35+#!/usr/bin/env python
36+# -*- coding: utf-8 -*-
37+
38+import sys
39+from autokey.gtkapp import Application
40+
41+a = Application()
42+try:
43+ a.main()
44+except KeyboardInterrupt:
45+ a.shutdown()
46+sys.exit(0)
47+
48
49=== added file 'autokey-qt'
50--- autokey-qt 1970-01-01 00:00:00 +0000
51+++ autokey-qt 2010-03-26 15:01:22 +0000
52@@ -0,0 +1,13 @@
53+#!/usr/bin/env python
54+# -*- coding: utf-8 -*-
55+
56+import sys
57+from autokey.qtapp import Application
58+
59+a = Application()
60+try:
61+ a.main()
62+except KeyboardInterrupt:
63+ a.shutdown()
64+sys.exit(0)
65+
66
67=== added file 'config/akicon-status.png'
68Binary files config/akicon-status.png 1970-01-01 00:00:00 +0000 and config/akicon-status.png 2010-03-26 15:01:22 +0000 differ
69=== added file 'config/autokey-gtk.desktop'
70--- config/autokey-gtk.desktop 1970-01-01 00:00:00 +0000
71+++ config/autokey-gtk.desktop 2010-03-26 15:01:22 +0000
72@@ -0,0 +1,10 @@
73+# $Id: autokey.desktop 22 2008-01-29 11:29:13Z peabody $
74+[Desktop Entry]
75+Name=AutoKey (GTK)
76+GenericName=Keyboard Automation
77+Comment=Program keyboard shortcuts
78+Exec=autokey-gtk
79+Terminal=false
80+Type=Application
81+Icon=/usr/share/pixmaps/akicon.png
82+Categories=GNOME;Utility;
83
84=== added file 'config/autokey-qt.desktop'
85--- config/autokey-qt.desktop 1970-01-01 00:00:00 +0000
86+++ config/autokey-qt.desktop 2010-03-26 15:01:22 +0000
87@@ -0,0 +1,10 @@
88+# $Id: autokey.desktop 22 2008-01-29 11:29:13Z peabody $
89+[Desktop Entry]
90+Name=AutoKey (QT)
91+GenericName=Keyboard Automation
92+Comment=Program keyboard shortcuts
93+Exec=autokey-qt
94+Terminal=false
95+Type=Application
96+Icon=/usr/share/pixmaps/akicon.png
97+Categories=KDE;Utility;
98
99=== removed file 'config/autokey.desktop'
100--- config/autokey.desktop 2009-09-27 15:08:28 +0000
101+++ config/autokey.desktop 1970-01-01 00:00:00 +0000
102@@ -1,10 +0,0 @@
103-# $Id: autokey.desktop 22 2008-01-29 11:29:13Z peabody $
104-[Desktop Entry]
105-Name=AutoKey
106-GenericName=Keyboard Automation
107-Comment=Program keyboard shortcuts
108-Exec=autokey
109-Terminal=false
110-Type=Application
111-Icon=/usr/share/pixmaps/akicon.png
112-Categories=GNOME;KDE;Utility
113
114=== added file 'debian/autokey-common.init'
115--- debian/autokey-common.init 1970-01-01 00:00:00 +0000
116+++ debian/autokey-common.init 2010-03-26 15:01:22 +0000
117@@ -0,0 +1,150 @@
118+#!/usr/bin/env python
119+# -*- coding: utf-8 -*-
120+
121+### BEGIN INIT INFO
122+# Provides: autokey
123+# Required-Start: $local_fs
124+# Required-Stop: $local_fs
125+# Default-Start: 2 3 4 5
126+# Default-Stop: 0 1 6
127+# Short-Description: Start AutoKey daemon.
128+# Description: Enable AutoKey's EvDev interface daemon.
129+### END INIT INFO
130+
131+import sys, os, socket, glob, shutil, time
132+try:
133+ from autokey import evdev, daemon
134+ from autokey.common import DOMAIN_SOCKET_PATH, PACKET_SIZE
135+except ImportError:
136+ # Per DPM ยง 9.3.2 script should fail gracefully if not installed.
137+ print "It does not seem Autokey is installed. Exiting..."
138+ sys.exit(0)
139+
140+PACKET_STRING = "%s,%s,%s"
141+
142+BUTTON_MAP = {
143+ "BTN_LEFT" : '1',
144+ "BTN_MIDDLE": '2',
145+ "BTN_RIGHT" : '3'
146+ }
147+
148+class AutoKeyDaemon(daemon.Daemon):
149+
150+ def __init__(self):
151+ logFile = "/var/log/autokey-daemon.log"
152+ if os.path.exists(logFile):
153+ shutil.move(logFile, logFile + '.old')
154+ daemon.Daemon.__init__(self, '/var/run/autokey-daemon.pid', stdout=logFile, stderr=logFile)
155+
156+ def get_device_paths(self):
157+ keyboardLocations = glob.glob("/dev/input/by-path/*-event-kbd")
158+ mouseLocations = glob.glob("/dev/input/by-path/*-event-mouse")
159+
160+ sys.stdout.write("Keyboards: %s\nMice: %s\n" % (repr(keyboardLocations), repr(mouseLocations)))
161+ return keyboardLocations + mouseLocations
162+
163+ def run(self):
164+ print "AutoKey daemon starting"
165+ if os.path.exists(DOMAIN_SOCKET_PATH):
166+ os.remove(DOMAIN_SOCKET_PATH)
167+ s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
168+ s.bind(DOMAIN_SOCKET_PATH)
169+ os.chmod(DOMAIN_SOCKET_PATH, 0777)
170+ print "Created domain socket"
171+
172+ while True:
173+ time.sleep(5) # sleep 5 seconds, waiting for devices to appear after resume from S3
174+ s.listen(1)
175+ try:
176+ conn, addr = s.accept()
177+ print "Accepted connection"
178+ except Exception, e:
179+ print "Fatal error while accepting connections - daemon shutting down"
180+ print str(e)
181+ break
182+
183+ devices = evdev.DeviceGroup(self.get_device_paths())
184+ sys.stdout.flush()
185+ sys.stderr.flush()
186+
187+ while True:
188+ try:
189+ event = devices.next_event()
190+ except OSError:
191+ print "Unable to read from device(s). Connection will be closed and restarted"
192+ break
193+
194+ if event is not None:
195+ if event.type == "EV_KEY" and isinstance(event.code, str):
196+ if event.code.startswith("KEY"):
197+ # Keyboard event
198+ code = event.scanCode
199+ button = ''
200+ state = event.value
201+
202+ try:
203+ self.send_packet(conn, code, button, state)
204+ except:
205+ break
206+
207+ elif event.code.startswith("BTN") and event.value == 1:
208+ # Mouse event - only care about button press, not release
209+ code = ''
210+ if event.code in BUTTON_MAP:
211+ button = BUTTON_MAP[event.code]
212+ else:
213+ button = -1
214+ state = event.value
215+
216+ try:
217+ self.send_packet(conn, code, button, state)
218+ except:
219+ break
220+
221+ conn.close()
222+ devices.close()
223+ print "Connection closed"
224+ sys.stdout.flush()
225+ sys.stderr.flush()
226+
227+ def send_packet(self, conn, code, button, state):
228+ if code:
229+ code = self.translate_keycode(code)
230+ sendData = PACKET_STRING % (code, button, state)
231+ sendData += (PACKET_SIZE - len(sendData)) * ' '
232+ conn.send(sendData)
233+
234+ def translate_keycode(self, keyCode):
235+ if keyCode < 151:
236+ keyCode += 8
237+ else:
238+ print "Got untranslatable evdev keycode: %d\n" % keyCode
239+ keyCode = 0
240+ return keyCode
241+
242+
243+if __name__ == "__main__":
244+ #daemon = AutoKeyDaemon('/tmp/autokey-daemon.pid', stdout=sys.__stdout__, stderr=sys.__stderr__)
245+ daemon = AutoKeyDaemon()
246+ if len(sys.argv) == 2:
247+ if 'start' == sys.argv[1]:
248+ daemon.start()
249+ elif 'stop' == sys.argv[1]:
250+ daemon.stop()
251+ elif 'restart' == sys.argv[1]:
252+ daemon.restart()
253+ elif 'force-reload' == sys.argv[1]:
254+ # we don't support on-the-fly reloading,
255+ # so just restart the daemon per DPM 9.3.2
256+ daemon.restart()
257+ else:
258+ print "Unknown command"
259+ sys.exit(2)
260+ sys.exit(0)
261+ else:
262+ print "usage: %s {start|stop|restart|force-reload}" % sys.argv[0]
263+ sys.exit(2)
264+
265+ sys.exit(0)
266+
267+
268
269=== added file 'debian/autokey-common.install'
270--- debian/autokey-common.install 1970-01-01 00:00:00 +0000
271+++ debian/autokey-common.install 2010-03-26 15:01:22 +0000
272@@ -0,0 +1,13 @@
273+usr/lib/python*/*-packages/autokey/common.py
274+usr/lib/python*/*-packages/autokey/configmanager.py
275+usr/lib/python*/*-packages/autokey/daemon.py
276+usr/lib/python*/*-packages/autokey/evdev.py
277+usr/lib/python*/*-packages/autokey/__init__.py
278+usr/lib/python*/*-packages/autokey/interface.py
279+usr/lib/python*/*-packages/autokey/iomediator.py
280+usr/lib/python*/*-packages/autokey/model.py
281+usr/lib/python*/*-packages/autokey/nogui.py
282+usr/lib/python*/*-packages/autokey/scripting.py
283+usr/lib/python*/*-packages/autokey/service.py
284+usr/lib/python*/*-packages/autokey-*.egg-info
285+usr/share/pixmaps/akicon.png
286
287=== added file 'debian/autokey-common.lintian-overrides'
288--- debian/autokey-common.lintian-overrides 1970-01-01 00:00:00 +0000
289+++ debian/autokey-common.lintian-overrides 2010-03-26 15:01:22 +0000
290@@ -0,0 +1,1 @@
291+autokey-common binary: init.d-script-uses-usr-interpreter
292
293=== added file 'debian/autokey-common.postinst'
294--- debian/autokey-common.postinst 1970-01-01 00:00:00 +0000
295+++ debian/autokey-common.postinst 2010-03-26 15:01:22 +0000
296@@ -0,0 +1,41 @@
297+#!/bin/sh
298+# postinst script for test
299+#
300+# see: dh_installdeb(1)
301+
302+set -e
303+
304+
305+# We need python-support triggers activated before we start the daemon.
306+update-python-modules -p
307+
308+# summary of how this script can be called:
309+# * <postinst> `configure' <most-recently-configured-version>
310+# * <old-postinst> `abort-upgrade' <new version>
311+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
312+# <new-version>
313+# * <postinst> `abort-remove'
314+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
315+# <failed-install-package> <version> `removing'
316+# <conflicting-package> <version>
317+# for details, see http://www.debian.org/doc/debian-policy/ or
318+# the debian-policy package
319+
320+
321+# dh_installdeb will replace this with shell code automatically
322+# generated by other debhelper scripts.
323+
324+#DEBHELPER#
325+
326+# Automatically added by dh_installinit
327+if [ -x "/etc/init.d/autokey" ]; then
328+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
329+ invoke-rc.d autokey start || exit $?
330+ else
331+ /etc/init.d/autokey start || exit $?
332+ fi
333+fi
334+# End automatically added section
335+
336+
337+exit 0
338
339=== added file 'debian/autokey-common.prerm'
340--- debian/autokey-common.prerm 1970-01-01 00:00:00 +0000
341+++ debian/autokey-common.prerm 2010-03-26 15:01:22 +0000
342@@ -0,0 +1,34 @@
343+#!/bin/sh
344+# prerm script for test
345+#
346+# see: dh_installdeb(1)
347+
348+set -e
349+
350+# summary of how this script can be called:
351+# * <prerm> `remove'
352+# * <old-prerm> `upgrade' <new-version>
353+# * <new-prerm> `failed-upgrade' <old-version>
354+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
355+# * <deconfigured's-prerm> `deconfigure' `in-favour'
356+# <package-being-installed> <version> `removing'
357+# <conflicting-package> <version>
358+# for details, see http://www.debian.org/doc/debian-policy/ or
359+# the debian-policy package
360+
361+# Automatically added by dh_installinit
362+if [ -x "/etc/init.d/autokey" ]; then
363+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
364+ invoke-rc.d autokey stop || exit $?
365+ else
366+ /etc/init.d/autokey stop || exit $?
367+ fi
368+fi
369+# End automatically added section
370+
371+# dh_installdeb will replace this with shell code automatically
372+# generated by other debhelper scripts.
373+
374+#DEBHELPER#
375+
376+exit 0
377
378=== added file 'debian/autokey-gtk.install'
379--- debian/autokey-gtk.install 1970-01-01 00:00:00 +0000
380+++ debian/autokey-gtk.install 2010-03-26 15:01:22 +0000
381@@ -0,0 +1,6 @@
382+usr/lib/python*/*-packages/autokey/gtkui/
383+usr/lib/python*/*-packages/autokey/gtkapp.py
384+usr/bin/autokey-gtk
385+usr/share/applications/autokey-gtk.desktop
386+usr/share/man/man1/autokey-gtk.1
387+usr/share/pixmaps/akicon-status.png
388\ No newline at end of file
389
390=== added file 'debian/autokey-gtk.postinst'
391--- debian/autokey-gtk.postinst 1970-01-01 00:00:00 +0000
392+++ debian/autokey-gtk.postinst 2010-03-26 15:01:22 +0000
393@@ -0,0 +1,9 @@
394+#!/bin/sh -e
395+
396+update-alternatives --install /usr/bin/autokey autokey \
397+ /usr/bin/autokey-gtk 50 \
398+ --slave /usr/share/man/man1/autokey.1.gz autokey.1.gz \
399+ /usr/share/man/man1/autokey-gtk.1.gz
400+
401+#DEBHELPER#
402+
403
404=== added file 'debian/autokey-gtk.prerm'
405--- debian/autokey-gtk.prerm 1970-01-01 00:00:00 +0000
406+++ debian/autokey-gtk.prerm 2010-03-26 15:01:22 +0000
407@@ -0,0 +1,12 @@
408+#!/bin/sh -e
409+
410+case "$1" in
411+ remove|deconfigure)
412+ update-alternatives --remove autokey /usr/bin/autokey-gtk
413+ ;;
414+esac
415+
416+#DEBHELPER#
417+
418+exit 0
419+
420
421=== added file 'debian/autokey-qt.install'
422--- debian/autokey-qt.install 1970-01-01 00:00:00 +0000
423+++ debian/autokey-qt.install 2010-03-26 15:01:22 +0000
424@@ -0,0 +1,5 @@
425+usr/lib/python*/*-packages/autokey/qtui/
426+usr/lib/python*/*-packages/autokey/qtapp.py
427+usr/bin/autokey-qt
428+usr/share/applications/autokey-qt.desktop
429+usr/share/man/man1/autokey-qt.1
430
431=== added file 'debian/autokey-qt.postinst'
432--- debian/autokey-qt.postinst 1970-01-01 00:00:00 +0000
433+++ debian/autokey-qt.postinst 2010-03-26 15:01:22 +0000
434@@ -0,0 +1,9 @@
435+#!/bin/sh -e
436+
437+update-alternatives --install /usr/bin/autokey autokey \
438+ /usr/bin/autokey-qt 60 \
439+ --slave /usr/share/man/man1/autokey.1.gz autokey.1.gz \
440+ /usr/share/man/man1/autokey-qt.1.gz
441+
442+#DEBHELPER#
443+
444
445=== added file 'debian/autokey-qt.prerm'
446--- debian/autokey-qt.prerm 1970-01-01 00:00:00 +0000
447+++ debian/autokey-qt.prerm 2010-03-26 15:01:22 +0000
448@@ -0,0 +1,12 @@
449+#!/bin/sh -e
450+
451+case "$1" in
452+ remove|deconfigure)
453+ update-alternatives --remove autokey /usr/bin/autokey-qt
454+ ;;
455+esac
456+
457+#DEBHELPER#
458+
459+exit 0
460+
461
462=== removed file 'debian/autokey.1'
463--- debian/autokey.1 2009-09-27 15:08:28 +0000
464+++ debian/autokey.1 1970-01-01 00:00:00 +0000
465@@ -1,54 +0,0 @@
466-.\" Hey, EMACS: -*- nroff -*-
467-.\" First parameter, NAME, should be all caps
468-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
469-.\" other parameters are allowed: see man(7), man(1)
470-.TH AUTOKEY "1" "August 19, 2009"
471-.\" Please adjust this date whenever revising the manpage.
472-.\"
473-.\" Some roff macros, for reference:
474-.\" .nh disable hyphenation
475-.\" .hy enable hyphenation
476-.\" .ad l left justify
477-.\" .ad b justify to both left and right margins
478-.\" .nf disable filling
479-.\" .fi enable filling
480-.\" .br insert line break
481-.\" .sp <n> insert n+1 empty lines
482-.\" for manpage-specific macros, see man(7)
483-.SH NAME
484-autokey \- keyboard automation utility
485-.SH SYNOPSIS
486-.B autokey
487-.RI [ options ]
488-.SH DESCRIPTION
489-This manual page briefly documents the
490-.B autokey
491-command.
492-.PP
493-.\" TeX users may be more comfortable with the \fB<whatever>\fP and
494-.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
495-.\" respectively.
496-\fBautokey\fP AutoKey is a desktop automation utility for Linux and X11. It allows
497-the automation of virtually any task by responding to typed abbreviations and hotkeys. It
498-offers a full-featured GUI that makes it highly accessible for novices, as well as a scripting
499-interface offering the full flexibility and power of the Python language.
500-.br
501-For more information refer to the online wiki at:
502- http://code.google.com/p/autokey/w/list
503-.SH OPTIONS
504-This program follows the usual GNU command line syntax, with long
505-options starting with two dashes (`-').
506-A summary of options is included below.
507-.TP
508-.B \-\-help
509-Show summary of options.
510-.TP
511-.B \-l, \-\-verbose
512-Enable verbose (debug) logging.
513-.TP
514-.B \-c, \-\-configure
515-Show the configuration window on startup, even if this is not the first run.
516-.SH AUTHOR
517-AutoKey was written by Chris Dekter, loosely based on a script by Sam Peterson.
518-.PP
519-This manual page was written by Chris Dekter <cdekter@gmail.com>.
520
521=== removed file 'debian/autokey.init'
522--- debian/autokey.init 2010-01-08 08:52:58 +0000
523+++ debian/autokey.init 1970-01-01 00:00:00 +0000
524@@ -1,145 +0,0 @@
525-#!/usr/bin/env python
526-# -*- coding: utf-8 -*-
527-
528-### BEGIN INIT INFO
529-# Provides: autokey
530-# Required-Start: $local_fs
531-# Required-Stop: $local_fs
532-# Default-Start: 2 3 4 5
533-# Default-Stop: 0 1 6
534-# Short-Description: Start AutoKey daemon.
535-# Description: Enable AutoKey's EvDev interface daemon.
536-### END INIT INFO
537-
538-import sys, os, socket, glob, shutil, time
539-from autokey import evdev, daemon
540-from autokey.interface import DOMAIN_SOCKET_PATH, PACKET_SIZE
541-
542-PACKET_STRING = "%s,%s,%s"
543-
544-BUTTON_MAP = {
545- "BTN_LEFT" : '1',
546- "BTN_MIDDLE": '2',
547- "BTN_RIGHT" : '3'
548- }
549-
550-class AutoKeyDaemon(daemon.Daemon):
551-
552- def __init__(self):
553- logFile = "/var/log/autokey-daemon.log"
554- if os.path.exists(logFile):
555- shutil.move(logFile, logFile + '.old')
556- daemon.Daemon.__init__(self, '/tmp/autokey-daemon.pid', stdout=logFile, stderr=logFile)
557-
558- def get_device_paths(self):
559- keyboardLocations = glob.glob("/dev/input/by-path/*-event-kbd")
560- mouseLocations = glob.glob("/dev/input/by-path/*-event-mouse")
561-
562- sys.stdout.write("Keyboards: %s\nMice: %s\n" % (repr(keyboardLocations), repr(mouseLocations)))
563- return keyboardLocations + mouseLocations
564-
565- def run(self):
566- print "AutoKey daemon starting"
567- if os.path.exists(DOMAIN_SOCKET_PATH):
568- os.remove(DOMAIN_SOCKET_PATH)
569- s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
570- s.bind(DOMAIN_SOCKET_PATH)
571- os.chmod(DOMAIN_SOCKET_PATH, 0777)
572- print "Created domain socket"
573-
574- while True:
575- time.sleep(5) # sleep 5 seconds, waiting for devices to appear after resume from S3
576- s.listen(1)
577- try:
578- conn, addr = s.accept()
579- print "Accepted connection"
580- except Exception, e:
581- print "Fatal error while accepting connections - daemon shutting down"
582- print str(e)
583- break
584-
585- devices = evdev.DeviceGroup(self.get_device_paths())
586- sys.stdout.flush()
587- sys.stderr.flush()
588-
589- while True:
590- try:
591- event = devices.next_event()
592- except OSError:
593- print "Unable to read from device(s). Connection will be closed and restarted"
594- break
595-
596- if event is not None:
597- if event.type == "EV_KEY" and isinstance(event.code, str):
598- if event.code.startswith("KEY"):
599- # Keyboard event
600- code = event.scanCode
601- button = ''
602- state = event.value
603-
604- try:
605- self.send_packet(conn, code, button, state)
606- except:
607- break
608-
609- elif event.code.startswith("BTN") and event.value == 1:
610- # Mouse event - only care about button press, not release
611- code = ''
612- if event.code in BUTTON_MAP:
613- button = BUTTON_MAP[event.code]
614- else:
615- button = -1
616- state = event.value
617-
618- try:
619- self.send_packet(conn, code, button, state)
620- except:
621- break
622-
623- conn.close()
624- devices.close()
625- print "Connection closed"
626- sys.stdout.flush()
627- sys.stderr.flush()
628-
629- def send_packet(self, conn, code, button, state):
630- if code:
631- code = self.translate_keycode(code)
632- sendData = PACKET_STRING % (code, button, state)
633- sendData += (PACKET_SIZE - len(sendData)) * ' '
634- conn.send(sendData)
635-
636- def translate_keycode(self, keyCode):
637- if keyCode < 151:
638- keyCode += 8
639- else:
640- print "Got untranslatable evdev keycode: %d\n" % keyCode
641- keyCode = 0
642- return keyCode
643-
644-
645-if __name__ == "__main__":
646- #daemon = AutoKeyDaemon('/tmp/autokey-daemon.pid', stdout=sys.__stdout__, stderr=sys.__stderr__)
647- daemon = AutoKeyDaemon()
648- if len(sys.argv) == 2:
649- if 'start' == sys.argv[1]:
650- daemon.start()
651- elif 'stop' == sys.argv[1]:
652- daemon.stop()
653- elif 'restart' == sys.argv[1]:
654- daemon.restart()
655- elif 'force-reload' == sys.argv[1]:
656- # we don't support on-the-fly reloading,
657- # so just restart the daemon per DPM 9.3.2
658- daemon.restart()
659- else:
660- print "Unknown command"
661- sys.exit(2)
662- sys.exit(0)
663- else:
664- print "usage: %s {start|stop|restart|force-reload}" % sys.argv[0]
665- sys.exit(2)
666-
667- sys.exit(0)
668-
669-
670
671=== removed file 'debian/autokey.lintian-overrides'
672--- debian/autokey.lintian-overrides 2009-07-20 23:19:40 +0000
673+++ debian/autokey.lintian-overrides 1970-01-01 00:00:00 +0000
674@@ -1,1 +0,0 @@
675-autokey binary: init.d-script-uses-usr-interpreter
676
677=== modified file 'debian/changelog'
678--- debian/changelog 2010-01-08 08:52:58 +0000
679+++ debian/changelog 2010-03-26 15:01:22 +0000
680@@ -1,3 +1,48 @@
681+autokey (0.61.5-1ubuntu1) lucid; urgency=low
682+
683+ * Make "autokey" a transitional package for autokey-gtk rather than -qt.
684+
685+ -- Luke Faraone <luke@faraone.cc> Wed, 24 Mar 2010 22:06:35 -0400
686+
687+autokey (0.61.5-1) unstable; urgency=low
688+
689+ * New upstream version:
690+ - Combine GTK and QT versions into single source tree
691+ * Provide "autokey" as a transitional package to autokey-common and autokey-qt
692+ * debian/autokey-common.postinst: call `update-python-modules -p` so that
693+ starting the daemon does not fail if qt4 was not fully configured.
694+ (LP: #543654)
695+
696+ -- Luke Faraone <luke@faraone.cc> Tue, 23 Mar 2010 10:19:47 -0400
697+
698+autokey (0.61.3-2) unstable; urgency=high
699+
700+ * SECURITY UPDATE: arbitrary file overwriting via symlinks (LP: #538471)
701+ - Store files for the EvDev daamon in FHS-specified locations
702+ - debian/autokey.init: Set pidfile path to '/var/run/autokey-daemon.pid'
703+ - src/lib/interface.py: Set DOMAIN_SOCKET_PATH to "/var/run/autokey-daemon"
704+ - CVE-2010-0398
705+
706+ -- Luke Faraone <luke@faraone.cc> Sat, 13 Mar 2010 22:25:44 -0500
707+
708+autokey (0.61.3-1) unstable; urgency=low
709+
710+ * debian/rules: call dh_installinit with --error-handler so that install
711+ doesn't fail if Autokey cannot be restarted during configure (LP: #479131)
712+ * New upstream version:
713+ - Merge changes to interface.py from GTK branch that were missed
714+
715+ -- Luke Faraone <luke@faraone.cc> Sat, 27 Feb 2010 11:05:08 -0500
716+
717+autokey (0.61.2-2) unstable; urgency=low
718+
719+ * Set DM-Upload-Allowed to Yes in control
720+ * Patch src/lib/daemon.py to handle empty or invalid PIDs (closes: #568070)
721+ * Fix typo in Vcs-Browser
722+ * Bump standards version
723+
724+ -- Luke Faraone <luke@faraone.cc> Wed, 03 Feb 2010 09:16:24 -0500
725+
726 autokey (0.61.2-1) unstable; urgency=low
727
728 * New upstream version:
729
730=== modified file 'debian/compat'
731--- debian/compat 2009-07-20 23:19:40 +0000
732+++ debian/compat 2010-03-26 15:01:22 +0000
733@@ -1,1 +1,1 @@
734-6
735+7
736
737=== modified file 'debian/control'
738--- debian/control 2009-12-16 08:46:43 +0000
739+++ debian/control 2010-03-26 15:01:22 +0000
740@@ -1,23 +1,68 @@
741 Source: autokey
742-Section: kde
743 Priority: optional
744-Maintainer: Luke Faraone <luke@faraone.cc>
745+Section: utils
746+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
747+XSBC-Original-Maintainer: Luke Faraone <luke@faraone.cc>
748 Uploaders: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
749-Build-Depends: python (>= 2.5), cdbs (>= 0.4.49), debhelper (>= 6), dpatch
750-Build-Depends-indep: python-central (>= 0.6.0)
751-Standards-Version: 3.8.3
752+Build-Depends: python (>= 2.5), cdbs (>= 0.4.49), debhelper (>= 7)
753+Build-Depends-indep: python-central, dpatch
754+Standards-Version: 3.8.4
755+DM-Upload-Allowed: yes
756 XS-Python-Version: >= 2.5
757 Homepage: http://code.google.com/p/autokey/
758 Vcs-Svn: svn://svn.debian.org/python-apps/packages/autokey/trunk
759-Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/autokeyp/trunk/
760+Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/autokey/trunk/
761
762 Package: autokey
763 Architecture: all
764-Depends: ${python:Depends}, ${misc:Depends}, python-kde4, python-qt4, python-qscintilla2, python-xlib, wmctrl
765-XB-Python-Version: ${python:Versions}
766-Description: desktop automation utility
767- AutoKey is a desktop automation utility for Linux and X11. It allows the
768- automation of virtually any task by responding to typed abbreviations and
769- hotkeys. It offers a full-featured GUI that makes it highly accessible for
770- novices, as well as a scripting interface offering the full flexibility and
771- power of the Python language.
772+Depends: ${misc:Depends}, autokey-gtk, autokey-common
773+Description: dummy transitional package for autokey-gtk
774+ This transitional package helps users transition to the autokey-gtk package.
775+ Once this package and its dependencies are installed you can safely remove it.
776+
777+Package: autokey-common
778+Architecture: all
779+Depends: ${python:Depends}, ${misc:Depends}, python-xlib, wmctrl
780+Replaces: autokey (<<0.61.4-0~0)
781+Breaks: autokey (<<0.61.4-0~0)
782+XB-Python-Version: ${python:Versions}
783+Description: desktop automation utility - common data
784+ AutoKey is a desktop automation utility for Linux and X11. It allows the
785+ automation of virtually any task by responding to typed abbreviations and
786+ hotkeys. It offers a full-featured GUI that makes it highly accessible for
787+ novices, as well as a scripting interface offering the full flexibility and
788+ power of the Python language.
789+ .
790+ This package contains the common data shared between the various frontends.
791+
792+Package: autokey-qt
793+Section: kde
794+Architecture: all
795+Depends: ${python:Depends}, ${misc:Depends}, python-kde4, python-qt4, python-qscintilla2, python-xlib, wmctrl, autokey-common
796+Replaces: autokey (<<0.61.4-0~0)
797+Breaks: autokey (<<0.61.4-0~0)
798+XB-Python-Version: ${python:Versions}
799+Description: desktop automation utility - QT version
800+ AutoKey is a desktop automation utility for Linux and X11. It allows the
801+ automation of virtually any task by responding to typed abbreviations and
802+ hotkeys. It offers a full-featured GUI that makes it highly accessible for
803+ novices, as well as a scripting interface offering the full flexibility and
804+ power of the Python language.
805+ .
806+ This package contains the QT frontend.
807+
808+Package: autokey-gtk
809+Section: gnome
810+Architecture: all
811+Depends: ${python:Depends}, ${misc:Depends}, python-gtk2, python-gtksourceview2, python-glade2, python-xlib, python-notify, wmctrl, autokey-common
812+Replaces: autokey (<<0.61.4-0~0)
813+Breaks: autokey (<<0.61.4-0~0)
814+XB-Python-Version: ${python:Versions}
815+Description: desktop automation utility - GTK+ version
816+ AutoKey is a desktop automation utility for Linux and X11. It allows the
817+ automation of virtually any task by responding to typed abbreviations and
818+ hotkeys. It offers a full-featured GUI that makes it highly accessible for
819+ novices, as well as a scripting interface offering the full flexibility and
820+ power of the Python language.
821+ .
822+ This package contains the GTK+ frontend.
823
824=== modified file 'debian/copyright'
825--- debian/copyright 2009-09-27 15:08:28 +0000
826+++ debian/copyright 2010-03-26 15:01:22 +0000
827@@ -34,6 +34,6 @@
828 The Debian packaging is
829
830 Copyright ยฉ 2009, Chris Dekter <cdekter@gmail.com>
831- Copyright ยฉ 2009, Luke Faraone <luke@faraone.cc>
832+ Copyright ยฉ 2009 - 2010, Luke Faraone <luke@faraone.cc>
833
834 and is licensed under the GPL, see above.
835
836=== modified file 'debian/patches/00list'
837--- debian/patches/00list 2009-12-16 08:46:43 +0000
838+++ debian/patches/00list 2010-03-26 15:01:22 +0000
839@@ -1,2 +1,1 @@
840 # no comment
841-
842
843=== added file 'debian/patches/README'
844--- debian/patches/README 1970-01-01 00:00:00 +0000
845+++ debian/patches/README 2010-03-26 15:01:22 +0000
846@@ -0,0 +1,4 @@
847+0xxx: Grabbed from upstream development.
848+1xxx: Possibly relevant for upstream adoption.
849+2xxx: Only relevant for official Debian release.
850+
851
852=== removed file 'debian/postinst'
853--- debian/postinst 2009-07-20 23:19:40 +0000
854+++ debian/postinst 1970-01-01 00:00:00 +0000
855@@ -1,37 +0,0 @@
856-#!/bin/sh
857-# postinst script for test
858-#
859-# see: dh_installdeb(1)
860-
861-set -e
862-
863-# summary of how this script can be called:
864-# * <postinst> `configure' <most-recently-configured-version>
865-# * <old-postinst> `abort-upgrade' <new version>
866-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
867-# <new-version>
868-# * <postinst> `abort-remove'
869-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
870-# <failed-install-package> <version> `removing'
871-# <conflicting-package> <version>
872-# for details, see http://www.debian.org/doc/debian-policy/ or
873-# the debian-policy package
874-
875-
876-# dh_installdeb will replace this with shell code automatically
877-# generated by other debhelper scripts.
878-
879-#DEBHELPER#
880-
881-# Automatically added by dh_installinit
882-if [ -x "/etc/init.d/autokey" ]; then
883- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
884- invoke-rc.d autokey start || exit $?
885- else
886- /etc/init.d/autokey start || exit $?
887- fi
888-fi
889-# End automatically added section
890-
891-
892-exit 0
893
894=== removed file 'debian/prerm'
895--- debian/prerm 2009-07-20 23:19:40 +0000
896+++ debian/prerm 1970-01-01 00:00:00 +0000
897@@ -1,34 +0,0 @@
898-#!/bin/sh
899-# prerm script for test
900-#
901-# see: dh_installdeb(1)
902-
903-set -e
904-
905-# summary of how this script can be called:
906-# * <prerm> `remove'
907-# * <old-prerm> `upgrade' <new-version>
908-# * <new-prerm> `failed-upgrade' <old-version>
909-# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
910-# * <deconfigured's-prerm> `deconfigure' `in-favour'
911-# <package-being-installed> <version> `removing'
912-# <conflicting-package> <version>
913-# for details, see http://www.debian.org/doc/debian-policy/ or
914-# the debian-policy package
915-
916-# Automatically added by dh_installinit
917-if [ -x "/etc/init.d/autokey" ]; then
918- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
919- invoke-rc.d autokey stop || exit $?
920- else
921- /etc/init.d/autokey stop || exit $?
922- fi
923-fi
924-# End automatically added section
925-
926-# dh_installdeb will replace this with shell code automatically
927-# generated by other debhelper scripts.
928-
929-#DEBHELPER#
930-
931-exit 0
932
933=== modified file 'debian/rules'
934--- debian/rules 2009-12-06 14:21:22 +0000
935+++ debian/rules 2010-03-26 15:01:22 +0000
936@@ -5,11 +5,8 @@
937 include /usr/share/cdbs/1/rules/debhelper.mk
938 include /usr/share/cdbs/1/class/python-distutils.mk
939
940-include /usr/share/cdbs/1/rules/dpatch.mk
941-# needed to use the dpatch tools (like dpatch-edit-patch)
942-include /usr/share/dpatch/dpatch.make
943
944 # Add here any variable or target overrides you need.
945-DEB_INSTALL_MANPAGES_autokey = debian/autokey.1
946-DEB_DH_INSTALLINIT_ARGS := --no-start
947-
948+DEB_INSTALL_MANPAGES_autokey_qt = debian/autokey-qt.1
949+DEB_INSTALL_MANPAGES_autokey_gtk = debian/autokey-gtk.1
950+DEB_DH_INSTALLINIT_ARGS := --no-start --init-script=autokey --error-handler=true
951
952=== added directory 'doc/man'
953=== added file 'doc/man/autokey-gtk.1'
954--- doc/man/autokey-gtk.1 1970-01-01 00:00:00 +0000
955+++ doc/man/autokey-gtk.1 2010-03-26 15:01:22 +0000
956@@ -0,0 +1,54 @@
957+.\" Hey, EMACS: -*- nroff -*-
958+.\" First parameter, NAME, should be all caps
959+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
960+.\" other parameters are allowed: see man(7), man(1)
961+.TH AUTOKEY-GTK "1" "August 19, 2009"
962+.\" Please adjust this date whenever revising the manpage.
963+.\"
964+.\" Some roff macros, for reference:
965+.\" .nh disable hyphenation
966+.\" .hy enable hyphenation
967+.\" .ad l left justify
968+.\" .ad b justify to both left and right margins
969+.\" .nf disable filling
970+.\" .fi enable filling
971+.\" .br insert line break
972+.\" .sp <n> insert n+1 empty lines
973+.\" for manpage-specific macros, see man(7)
974+.SH NAME
975+autokey-gtk \- keyboard automation utility for GNOME and GTK
976+.SH SYNOPSIS
977+.B autokey-gtk
978+.RI [ options ]
979+.SH DESCRIPTION
980+This manual page briefly documents the
981+.B autokey-gtk
982+command.
983+.PP
984+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
985+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
986+.\" respectively.
987+\fBautokey-gtk\fP AutoKey is a desktop automation utility for Linux and X11. It allows
988+the automation of virtually any task by responding to typed abbreviations and hotkeys. It
989+offers a full-featured GUI that makes it highly accessible for novices, as well as a scripting
990+interface offering the full flexibility and power of the Python language.
991+.br
992+For more information refer to the online wiki at:
993+ http://code.google.com/p/autokey/w/list
994+.SH OPTIONS
995+This program follows the usual GNU command line syntax, with long
996+options starting with two dashes (`-').
997+A summary of options is included below.
998+.TP
999+.B \-\-help
1000+Show summary of options.
1001+.TP
1002+.B \-l, \-\-verbose
1003+Enable verbose (debug) logging.
1004+.TP
1005+.B \-c, \-\-configure
1006+Show the configuration window on startup, even if this is not the first run.
1007+.SH AUTHOR
1008+AutoKey was written by Chris Dekter, loosely based on a script by Sam Peterson.
1009+.PP
1010+This manual page was written by Chris Dekter <cdekter@gmail.com>.
1011
1012=== added file 'doc/man/autokey-qt.1'
1013--- doc/man/autokey-qt.1 1970-01-01 00:00:00 +0000
1014+++ doc/man/autokey-qt.1 2010-03-26 15:01:22 +0000
1015@@ -0,0 +1,54 @@
1016+.\" Hey, EMACS: -*- nroff -*-
1017+.\" First parameter, NAME, should be all caps
1018+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
1019+.\" other parameters are allowed: see man(7), man(1)
1020+.TH AUTOKEY-QT "1" "August 19, 2009"
1021+.\" Please adjust this date whenever revising the manpage.
1022+.\"
1023+.\" Some roff macros, for reference:
1024+.\" .nh disable hyphenation
1025+.\" .hy enable hyphenation
1026+.\" .ad l left justify
1027+.\" .ad b justify to both left and right margins
1028+.\" .nf disable filling
1029+.\" .fi enable filling
1030+.\" .br insert line break
1031+.\" .sp <n> insert n+1 empty lines
1032+.\" for manpage-specific macros, see man(7)
1033+.SH NAME
1034+autokey-qt \- keyboard automation utility for KDE and QT
1035+.SH SYNOPSIS
1036+.B autokey-qt
1037+.RI [ options ]
1038+.SH DESCRIPTION
1039+This manual page briefly documents the
1040+.B autokey-qt
1041+command.
1042+.PP
1043+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
1044+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
1045+.\" respectively.
1046+\fBautokey-qt\fP AutoKey is a desktop automation utility for Linux and X11. It allows
1047+the automation of virtually any task by responding to typed abbreviations and hotkeys. It
1048+offers a full-featured GUI that makes it highly accessible for novices, as well as a scripting
1049+interface offering the full flexibility and power of the Python language.
1050+.br
1051+For more information refer to the online wiki at:
1052+ http://code.google.com/p/autokey/w/list
1053+.SH OPTIONS
1054+This program follows the usual GNU command line syntax, with long
1055+options starting with two dashes (`-').
1056+A summary of options is included below.
1057+.TP
1058+.B \-\-help
1059+Show summary of options.
1060+.TP
1061+.B \-l, \-\-verbose
1062+Enable verbose (debug) logging.
1063+.TP
1064+.B \-c, \-\-configure
1065+Show the configuration window on startup, even if this is not the first run.
1066+.SH AUTHOR
1067+AutoKey was written by Chris Dekter, loosely based on a script by Sam Peterson.
1068+.PP
1069+This manual page was written by Chris Dekter <cdekter@gmail.com>.
1070
1071=== added directory 'glade'
1072=== added file 'glade/abbrselector.glade'
1073--- glade/abbrselector.glade 1970-01-01 00:00:00 +0000
1074+++ glade/abbrselector.glade 2010-03-26 15:01:22 +0000
1075@@ -0,0 +1,45 @@
1076+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1077+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
1078+<!--Generated with glade3 3.4.5 on Wed Sep 2 16:40:47 2009 -->
1079+<glade-interface>
1080+ <widget class="GtkDialog" id="abbrselector">
1081+ <property name="border_width">5</property>
1082+ <property name="title" translatable="yes">Enter Abbreviation</property>
1083+ <property name="resizable">False</property>
1084+ <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
1085+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
1086+ <property name="has_separator">False</property>
1087+ <signal name="hide" handler="on_close"/>
1088+ <child internal-child="vbox">
1089+ <widget class="GtkVBox" id="dialog-vbox1">
1090+ <property name="visible">True</property>
1091+ <property name="spacing">2</property>
1092+ <child>
1093+ <widget class="GtkVBox" id="vbox1">
1094+ <property name="visible">True</property>
1095+ <child>
1096+ <widget class="GtkEntry" id="entry">
1097+ <property name="visible">True</property>
1098+ <property name="can_focus">True</property>
1099+ <signal name="activate" handler="on_entry_activated"/>
1100+ </widget>
1101+ </child>
1102+ </widget>
1103+ <packing>
1104+ <property name="position">1</property>
1105+ </packing>
1106+ </child>
1107+ <child internal-child="action_area">
1108+ <widget class="GtkHButtonBox" id="dialog-action_area1">
1109+ <property name="visible">True</property>
1110+ <property name="layout_style">GTK_BUTTONBOX_END</property>
1111+ </widget>
1112+ <packing>
1113+ <property name="expand">False</property>
1114+ <property name="pack_type">GTK_PACK_END</property>
1115+ </packing>
1116+ </child>
1117+ </widget>
1118+ </child>
1119+ </widget>
1120+</glade-interface>
1121
1122=== added file 'glade/abbrsettings.glade'
1123--- glade/abbrsettings.glade 1970-01-01 00:00:00 +0000
1124+++ glade/abbrsettings.glade 2010-03-26 15:01:22 +0000
1125@@ -0,0 +1,189 @@
1126+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1127+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
1128+<!--Generated with glade3 3.4.5 on Fri Oct 2 11:21:20 2009 -->
1129+<glade-interface>
1130+ <widget class="GtkDialog" id="abbrsettings">
1131+ <property name="border_width">5</property>
1132+ <property name="title" translatable="yes">Set Abbreviation</property>
1133+ <property name="resizable">False</property>
1134+ <property name="modal">True</property>
1135+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
1136+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
1137+ <signal name="response" handler="on_response"/>
1138+ <child internal-child="vbox">
1139+ <widget class="GtkVBox" id="dialog-vbox1">
1140+ <property name="visible">True</property>
1141+ <property name="spacing">2</property>
1142+ <child>
1143+ <widget class="GtkVBox" id="vbox1">
1144+ <property name="visible">True</property>
1145+ <child>
1146+ <widget class="GtkHBox" id="hbox1">
1147+ <property name="visible">True</property>
1148+ <child>
1149+ <widget class="GtkLabel" id="label1">
1150+ <property name="visible">True</property>
1151+ <property name="label" translatable="yes">Abbreviation:</property>
1152+ </widget>
1153+ <packing>
1154+ <property name="padding">5</property>
1155+ </packing>
1156+ </child>
1157+ <child>
1158+ <widget class="GtkEntry" id="abbrEntry">
1159+ <property name="visible">True</property>
1160+ <property name="can_focus">True</property>
1161+ <property name="is_focus">True</property>
1162+ <property name="activates_default">True</property>
1163+ </widget>
1164+ <packing>
1165+ <property name="padding">5</property>
1166+ <property name="position">1</property>
1167+ </packing>
1168+ </child>
1169+ <child>
1170+ <widget class="GtkLabel" id="label2">
1171+ <property name="visible">True</property>
1172+ <property name="label" translatable="yes">Trigger on:</property>
1173+ </widget>
1174+ <packing>
1175+ <property name="padding">5</property>
1176+ <property name="position">2</property>
1177+ </packing>
1178+ </child>
1179+ <child>
1180+ <widget class="GtkComboBox" id="wordCharCombo">
1181+ <property name="visible">True</property>
1182+ <property name="active">1</property>
1183+ <property name="items" translatable="yes">Default
1184+Space and Enter</property>
1185+ </widget>
1186+ <packing>
1187+ <property name="fill">False</property>
1188+ <property name="padding">5</property>
1189+ <property name="position">3</property>
1190+ </packing>
1191+ </child>
1192+ </widget>
1193+ </child>
1194+ <child>
1195+ <widget class="GtkCheckButton" id="removeTypedCheckbox">
1196+ <property name="visible">True</property>
1197+ <property name="can_focus">True</property>
1198+ <property name="label" translatable="yes">Remove typed abbreviation</property>
1199+ <property name="response_id">0</property>
1200+ <property name="draw_indicator">True</property>
1201+ </widget>
1202+ <packing>
1203+ <property name="position">1</property>
1204+ </packing>
1205+ </child>
1206+ <child>
1207+ <widget class="GtkCheckButton" id="omitTriggerCheckbox">
1208+ <property name="visible">True</property>
1209+ <property name="can_focus">True</property>
1210+ <property name="label" translatable="yes">Omit trigger character</property>
1211+ <property name="response_id">0</property>
1212+ <property name="draw_indicator">True</property>
1213+ </widget>
1214+ <packing>
1215+ <property name="position">2</property>
1216+ </packing>
1217+ </child>
1218+ <child>
1219+ <widget class="GtkCheckButton" id="matchCaseCheckbox">
1220+ <property name="visible">True</property>
1221+ <property name="can_focus">True</property>
1222+ <property name="label" translatable="yes">Match phrase case to typed abbreviation</property>
1223+ <property name="response_id">0</property>
1224+ <property name="draw_indicator">True</property>
1225+ <signal name="toggled" handler="on_matchCaseCheckbox_stateChanged"/>
1226+ </widget>
1227+ <packing>
1228+ <property name="position">3</property>
1229+ </packing>
1230+ </child>
1231+ <child>
1232+ <widget class="GtkCheckButton" id="ignoreCaseCheckbox">
1233+ <property name="visible">True</property>
1234+ <property name="can_focus">True</property>
1235+ <property name="label" translatable="yes">Ignore case of typed abbreviation</property>
1236+ <property name="response_id">0</property>
1237+ <property name="draw_indicator">True</property>
1238+ <signal name="toggled" handler="on_ignoreCaseCheckbox_stateChanged"/>
1239+ </widget>
1240+ <packing>
1241+ <property name="position">4</property>
1242+ </packing>
1243+ </child>
1244+ <child>
1245+ <widget class="GtkCheckButton" id="triggerInsideCheckbox">
1246+ <property name="visible">True</property>
1247+ <property name="can_focus">True</property>
1248+ <property name="label" translatable="yes">Trigger when typed as part of a word</property>
1249+ <property name="response_id">0</property>
1250+ <property name="draw_indicator">True</property>
1251+ </widget>
1252+ <packing>
1253+ <property name="position">5</property>
1254+ </packing>
1255+ </child>
1256+ <child>
1257+ <widget class="GtkCheckButton" id="immediateCheckbox">
1258+ <property name="visible">True</property>
1259+ <property name="can_focus">True</property>
1260+ <property name="label" translatable="yes">Trigger immediately (don't require a trigger character)</property>
1261+ <property name="response_id">0</property>
1262+ <property name="draw_indicator">True</property>
1263+ <signal name="toggled" handler="on_immediateCheckbox_stateChanged"/>
1264+ </widget>
1265+ <packing>
1266+ <property name="position">6</property>
1267+ </packing>
1268+ </child>
1269+ </widget>
1270+ <packing>
1271+ <property name="position">2</property>
1272+ </packing>
1273+ </child>
1274+ <child internal-child="action_area">
1275+ <widget class="GtkHButtonBox" id="dialog-action_area1">
1276+ <property name="visible">True</property>
1277+ <property name="layout_style">GTK_BUTTONBOX_END</property>
1278+ <child>
1279+ <widget class="GtkButton" id="cancelButton">
1280+ <property name="visible">True</property>
1281+ <property name="can_focus">True</property>
1282+ <property name="receives_default">True</property>
1283+ <property name="label" translatable="yes">gtk-cancel</property>
1284+ <property name="use_stock">True</property>
1285+ <property name="response_id">0</property>
1286+ <signal name="clicked" handler="on_cancel"/>
1287+ </widget>
1288+ </child>
1289+ <child>
1290+ <widget class="GtkButton" id="okButton">
1291+ <property name="visible">True</property>
1292+ <property name="can_focus">True</property>
1293+ <property name="can_default">True</property>
1294+ <property name="has_default">True</property>
1295+ <property name="receives_default">True</property>
1296+ <property name="label" translatable="yes">gtk-ok</property>
1297+ <property name="use_stock">True</property>
1298+ <property name="response_id">0</property>
1299+ <signal name="clicked" handler="on_ok"/>
1300+ </widget>
1301+ <packing>
1302+ <property name="position">1</property>
1303+ </packing>
1304+ </child>
1305+ </widget>
1306+ <packing>
1307+ <property name="expand">False</property>
1308+ <property name="pack_type">GTK_PACK_END</property>
1309+ </packing>
1310+ </child>
1311+ </widget>
1312+ </child>
1313+ </widget>
1314+</glade-interface>
1315
1316=== added file 'glade/akicon.png'
1317Binary files glade/akicon.png 1970-01-01 00:00:00 +0000 and glade/akicon.png 2010-03-26 15:01:22 +0000 differ
1318=== added file 'glade/folderpage.glade'
1319--- glade/folderpage.glade 1970-01-01 00:00:00 +0000
1320+++ glade/folderpage.glade 2010-03-26 15:01:22 +0000
1321@@ -0,0 +1,70 @@
1322+<?xml version="1.0"?>
1323+<glade-interface>
1324+ <!-- interface-requires gtk+ 2.6 -->
1325+ <!-- interface-naming-policy toplevel-contextual -->
1326+ <widget class="GtkWindow" id="window1">
1327+ <child>
1328+ <widget class="GtkAlignment" id="folderpage">
1329+ <property name="visible">True</property>
1330+ <property name="yalign">0</property>
1331+ <property name="yscale">0</property>
1332+ <property name="top_padding">5</property>
1333+ <property name="bottom_padding">5</property>
1334+ <child>
1335+ <widget class="GtkFrame" id="frame1">
1336+ <property name="visible">True</property>
1337+ <property name="label_xalign">0</property>
1338+ <property name="shadow_type">none</property>
1339+ <child>
1340+ <widget class="GtkAlignment" id="alignment2">
1341+ <property name="visible">True</property>
1342+ <property name="top_padding">5</property>
1343+ <property name="bottom_padding">5</property>
1344+ <property name="left_padding">10</property>
1345+ <child>
1346+ <widget class="GtkVBox" id="settingsVbox">
1347+ <property name="visible">True</property>
1348+ <property name="orientation">vertical</property>
1349+ <property name="spacing">5</property>
1350+ <child>
1351+ <widget class="GtkCheckButton" id="showInTrayCheckbox">
1352+ <property name="label" translatable="yes">Show in tray menu </property>
1353+ <property name="visible">True</property>
1354+ <property name="can_focus">True</property>
1355+ <property name="receives_default">False</property>
1356+ <property name="draw_indicator">True</property>
1357+ <signal name="toggled" handler="on_modified"/>
1358+ </widget>
1359+ <packing>
1360+ <property name="position">0</property>
1361+ </packing>
1362+ </child>
1363+ <child>
1364+ <widget class="GtkHSeparator" id="hseparator1">
1365+ <property name="visible">True</property>
1366+ </widget>
1367+ <packing>
1368+ <property name="expand">False</property>
1369+ <property name="position">1</property>
1370+ </packing>
1371+ </child>
1372+ </widget>
1373+ </child>
1374+ </widget>
1375+ </child>
1376+ <child>
1377+ <widget class="GtkLabel" id="label2">
1378+ <property name="visible">True</property>
1379+ <property name="label" translatable="yes">&lt;b&gt;Folder Settings&lt;/b&gt;</property>
1380+ <property name="use_markup">True</property>
1381+ </widget>
1382+ <packing>
1383+ <property name="type">label_item</property>
1384+ </packing>
1385+ </child>
1386+ </widget>
1387+ </child>
1388+ </widget>
1389+ </child>
1390+ </widget>
1391+</glade-interface>
1392
1393=== added file 'glade/hotkeysettings.glade'
1394--- glade/hotkeysettings.glade 1970-01-01 00:00:00 +0000
1395+++ glade/hotkeysettings.glade 2010-03-26 15:01:22 +0000
1396@@ -0,0 +1,151 @@
1397+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1398+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
1399+<!--Generated with glade3 3.4.5 on Wed Sep 2 10:54:51 2009 -->
1400+<glade-interface>
1401+ <widget class="GtkDialog" id="hotkeysettings">
1402+ <property name="border_width">5</property>
1403+ <property name="title" translatable="yes">Set Hotkey</property>
1404+ <property name="resizable">False</property>
1405+ <property name="modal">True</property>
1406+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
1407+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
1408+ <signal name="response" handler="on_response"/>
1409+ <child internal-child="vbox">
1410+ <widget class="GtkVBox" id="dialog-vbox2">
1411+ <property name="visible">True</property>
1412+ <property name="spacing">5</property>
1413+ <child>
1414+ <widget class="GtkVBox" id="vbox2">
1415+ <property name="visible">True</property>
1416+ <property name="border_width">5</property>
1417+ <property name="spacing">10</property>
1418+ <child>
1419+ <widget class="GtkHBox" id="hbox2">
1420+ <property name="visible">True</property>
1421+ <property name="homogeneous">True</property>
1422+ <child>
1423+ <widget class="GtkToggleButton" id="controlButton">
1424+ <property name="visible">True</property>
1425+ <property name="can_focus">True</property>
1426+ <property name="label" translatable="yes">Control</property>
1427+ <property name="response_id">0</property>
1428+ </widget>
1429+ <packing>
1430+ <property name="expand">False</property>
1431+ <property name="padding">5</property>
1432+ </packing>
1433+ </child>
1434+ <child>
1435+ <widget class="GtkToggleButton" id="altButton">
1436+ <property name="visible">True</property>
1437+ <property name="can_focus">True</property>
1438+ <property name="label" translatable="yes">Alt</property>
1439+ <property name="response_id">0</property>
1440+ </widget>
1441+ <packing>
1442+ <property name="expand">False</property>
1443+ <property name="padding">5</property>
1444+ <property name="position">1</property>
1445+ </packing>
1446+ </child>
1447+ <child>
1448+ <widget class="GtkToggleButton" id="shiftButton">
1449+ <property name="visible">True</property>
1450+ <property name="can_focus">True</property>
1451+ <property name="label" translatable="yes">Shift</property>
1452+ <property name="response_id">0</property>
1453+ </widget>
1454+ <packing>
1455+ <property name="expand">False</property>
1456+ <property name="padding">5</property>
1457+ <property name="position">2</property>
1458+ </packing>
1459+ </child>
1460+ <child>
1461+ <widget class="GtkToggleButton" id="superButton">
1462+ <property name="visible">True</property>
1463+ <property name="can_focus">True</property>
1464+ <property name="label" translatable="yes">Super</property>
1465+ <property name="response_id">0</property>
1466+ </widget>
1467+ <packing>
1468+ <property name="expand">False</property>
1469+ <property name="padding">5</property>
1470+ <property name="position">3</property>
1471+ </packing>
1472+ </child>
1473+ </widget>
1474+ </child>
1475+ <child>
1476+ <widget class="GtkHBox" id="hbox3">
1477+ <property name="visible">True</property>
1478+ <child>
1479+ <widget class="GtkLabel" id="keyLabel">
1480+ <property name="visible">True</property>
1481+ <property name="xalign">0</property>
1482+ <property name="label" translatable="yes">Key: %s</property>
1483+ </widget>
1484+ </child>
1485+ <child>
1486+ <widget class="GtkButton" id="setButton">
1487+ <property name="visible">True</property>
1488+ <property name="can_focus">True</property>
1489+ <property name="label" translatable="yes">Press to Set</property>
1490+ <property name="response_id">0</property>
1491+ <signal name="clicked" handler="on_setButton_pressed"/>
1492+ </widget>
1493+ <packing>
1494+ <property name="expand">False</property>
1495+ <property name="position">1</property>
1496+ </packing>
1497+ </child>
1498+ </widget>
1499+ <packing>
1500+ <property name="position">1</property>
1501+ </packing>
1502+ </child>
1503+ </widget>
1504+ <packing>
1505+ <property name="fill">False</property>
1506+ <property name="position">2</property>
1507+ </packing>
1508+ </child>
1509+ <child internal-child="action_area">
1510+ <widget class="GtkHButtonBox" id="dialog-action_area2">
1511+ <property name="visible">True</property>
1512+ <property name="layout_style">GTK_BUTTONBOX_END</property>
1513+ <child>
1514+ <widget class="GtkButton" id="cancelButton">
1515+ <property name="visible">True</property>
1516+ <property name="can_focus">True</property>
1517+ <property name="receives_default">True</property>
1518+ <property name="label" translatable="yes">gtk-cancel</property>
1519+ <property name="use_stock">True</property>
1520+ <property name="response_id">0</property>
1521+ <signal name="clicked" handler="on_cancel"/>
1522+ </widget>
1523+ </child>
1524+ <child>
1525+ <widget class="GtkButton" id="okButton">
1526+ <property name="visible">True</property>
1527+ <property name="can_focus">True</property>
1528+ <property name="receives_default">True</property>
1529+ <property name="label" translatable="yes">gtk-ok</property>
1530+ <property name="use_stock">True</property>
1531+ <property name="response_id">0</property>
1532+ <signal name="clicked" handler="on_ok"/>
1533+ </widget>
1534+ <packing>
1535+ <property name="position">1</property>
1536+ </packing>
1537+ </child>
1538+ </widget>
1539+ <packing>
1540+ <property name="expand">False</property>
1541+ <property name="pack_type">GTK_PACK_END</property>
1542+ </packing>
1543+ </child>
1544+ </widget>
1545+ </child>
1546+ </widget>
1547+</glade-interface>
1548
1549=== added file 'glade/mainwindow.glade'
1550--- glade/mainwindow.glade 1970-01-01 00:00:00 +0000
1551+++ glade/mainwindow.glade 2010-03-26 15:01:22 +0000
1552@@ -0,0 +1,124 @@
1553+<?xml version="1.0"?>
1554+<glade-interface>
1555+ <!-- interface-requires gtk+ 2.6 -->
1556+ <!-- interface-naming-policy toplevel-contextual -->
1557+ <widget class="GtkWindow" id="mainwindow">
1558+ <property name="title" translatable="yes">AutoKey - Configuration</property>
1559+ <property name="default_width">600</property>
1560+ <property name="default_height">400</property>
1561+ <property name="icon">akicon.png</property>
1562+ <signal name="delete_event" handler="on_close"/>
1563+ <child>
1564+ <widget class="GtkVBox" id="vbox">
1565+ <property name="visible">True</property>
1566+ <child>
1567+ <widget class="GtkHPaned" id="hpaned">
1568+ <property name="visible">True</property>
1569+ <property name="can_focus">True</property>
1570+ <property name="position">150</property>
1571+ <property name="position_set">True</property>
1572+ <child>
1573+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
1574+ <property name="visible">True</property>
1575+ <property name="can_focus">True</property>
1576+ <property name="hscrollbar_policy">automatic</property>
1577+ <property name="vscrollbar_policy">automatic</property>
1578+ <property name="shadow_type">in</property>
1579+ <child>
1580+ <widget class="GtkTreeView" id="treeWidget">
1581+ <property name="visible">True</property>
1582+ <property name="can_focus">True</property>
1583+ <signal name="button_press_event" handler="on_treeview_buttonpress"/>
1584+ <signal name="row_activated" handler="on_treeWidget_row_activated"/>
1585+ <signal name="drag_drop" handler="on_drag_drop"/>
1586+ <signal name="button_release_event" handler="on_treeview_buttonrelease"/>
1587+ <signal name="drag_data_received" handler="on_drag_data_received"/>
1588+ <signal name="cursor_changed" handler="on_tree_selection_changed"/>
1589+ </widget>
1590+ </child>
1591+ </widget>
1592+ <packing>
1593+ <property name="resize">True</property>
1594+ <property name="shrink">True</property>
1595+ </packing>
1596+ </child>
1597+ <child>
1598+ <widget class="GtkAlignment" id="alignment1">
1599+ <property name="visible">True</property>
1600+ <property name="bottom_padding">5</property>
1601+ <property name="right_padding">5</property>
1602+ <child>
1603+ <widget class="GtkVBox" id="vbox2">
1604+ <property name="visible">True</property>
1605+ <property name="spacing">5</property>
1606+ <child>
1607+ <widget class="GtkNotebook" id="stack">
1608+ <property name="visible">True</property>
1609+ <property name="can_focus">True</property>
1610+ <property name="show_tabs">False</property>
1611+ <property name="show_border">False</property>
1612+ </widget>
1613+ <packing>
1614+ <property name="position">0</property>
1615+ </packing>
1616+ </child>
1617+ <child>
1618+ <widget class="GtkHButtonBox" id="hbuttonbox1">
1619+ <property name="visible">True</property>
1620+ <property name="spacing">5</property>
1621+ <property name="homogeneous">True</property>
1622+ <property name="layout_style">end</property>
1623+ <child>
1624+ <widget class="GtkButton" id="saveButton">
1625+ <property name="label">gtk-save</property>
1626+ <property name="visible">True</property>
1627+ <property name="can_focus">True</property>
1628+ <property name="receives_default">True</property>
1629+ <property name="use_stock">True</property>
1630+ <signal name="clicked" handler="on_save"/>
1631+ </widget>
1632+ <packing>
1633+ <property name="expand">False</property>
1634+ <property name="fill">False</property>
1635+ <property name="position">0</property>
1636+ </packing>
1637+ </child>
1638+ <child>
1639+ <widget class="GtkButton" id="revertButton">
1640+ <property name="label">gtk-revert-to-saved</property>
1641+ <property name="visible">True</property>
1642+ <property name="can_focus">True</property>
1643+ <property name="receives_default">True</property>
1644+ <property name="use_stock">True</property>
1645+ <signal name="clicked" handler="on_reset"/>
1646+ </widget>
1647+ <packing>
1648+ <property name="expand">False</property>
1649+ <property name="fill">False</property>
1650+ <property name="position">1</property>
1651+ </packing>
1652+ </child>
1653+ </widget>
1654+ <packing>
1655+ <property name="expand">False</property>
1656+ <property name="position">1</property>
1657+ </packing>
1658+ </child>
1659+ </widget>
1660+ </child>
1661+ </widget>
1662+ <packing>
1663+ <property name="resize">True</property>
1664+ <property name="shrink">True</property>
1665+ </packing>
1666+ </child>
1667+ </widget>
1668+ <packing>
1669+ <property name="pack_type">end</property>
1670+ <property name="position">0</property>
1671+ </packing>
1672+ </child>
1673+ </widget>
1674+ </child>
1675+ </widget>
1676+</glade-interface>
1677
1678=== added file 'glade/phrasepage-old.glade'
1679--- glade/phrasepage-old.glade 1970-01-01 00:00:00 +0000
1680+++ glade/phrasepage-old.glade 2010-03-26 15:01:22 +0000
1681@@ -0,0 +1,118 @@
1682+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1683+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
1684+<!--Generated with glade3 3.4.5 on Wed Sep 2 11:38:57 2009 -->
1685+<glade-interface>
1686+ <widget class="GtkWindow" id="window1">
1687+ <child>
1688+ <widget class="GtkAlignment" id="phrasepage">
1689+ <property name="visible">True</property>
1690+ <property name="top_padding">5</property>
1691+ <property name="bottom_padding">5</property>
1692+ <child>
1693+ <widget class="GtkVBox" id="vbox1">
1694+ <property name="visible">True</property>
1695+ <property name="spacing">5</property>
1696+ <child>
1697+ <widget class="GtkLabel" id="label1">
1698+ <property name="visible">True</property>
1699+ <property name="xalign">0</property>
1700+ <property name="label" translatable="yes">Description</property>
1701+ </widget>
1702+ <packing>
1703+ <property name="expand">False</property>
1704+ </packing>
1705+ </child>
1706+ <child>
1707+ <widget class="GtkEntry" id="descriptionEntry">
1708+ <property name="visible">True</property>
1709+ <property name="can_focus">True</property>
1710+ <signal name="changed" handler="on_modified"/>
1711+ </widget>
1712+ <packing>
1713+ <property name="expand">False</property>
1714+ <property name="position">1</property>
1715+ </packing>
1716+ </child>
1717+ <child>
1718+ <widget class="GtkScrolledWindow" id="scrolledwindow1">
1719+ <property name="visible">True</property>
1720+ <property name="can_focus">True</property>
1721+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
1722+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
1723+ <property name="shadow_type">GTK_SHADOW_IN</property>
1724+ <child>
1725+ <widget class="GtkTextView" id="phraseText">
1726+ <property name="visible">True</property>
1727+ <property name="can_focus">True</property>
1728+ <property name="accepts_tab">False</property>
1729+ </widget>
1730+ </child>
1731+ </widget>
1732+ <packing>
1733+ <property name="position">2</property>
1734+ </packing>
1735+ </child>
1736+ <child>
1737+ <widget class="GtkFrame" id="frame1">
1738+ <property name="visible">True</property>
1739+ <property name="label_xalign">0</property>
1740+ <property name="shadow_type">GTK_SHADOW_NONE</property>
1741+ <child>
1742+ <widget class="GtkAlignment" id="alignment2">
1743+ <property name="visible">True</property>
1744+ <property name="top_padding">5</property>
1745+ <property name="bottom_padding">5</property>
1746+ <property name="left_padding">10</property>
1747+ <child>
1748+ <widget class="GtkVBox" id="settingsVbox">
1749+ <property name="visible">True</property>
1750+ <property name="spacing">5</property>
1751+ <child>
1752+ <widget class="GtkCheckButton" id="promptCheckbox">
1753+ <property name="visible">True</property>
1754+ <property name="can_focus">True</property>
1755+ <property name="label" translatable="yes">Always prompt before pasting this phrase</property>
1756+ <property name="response_id">0</property>
1757+ <property name="draw_indicator">True</property>
1758+ <signal name="toggled" handler="on_modified"/>
1759+ </widget>
1760+ </child>
1761+ <child>
1762+ <widget class="GtkCheckButton" id="showInTrayCheckbox">
1763+ <property name="visible">True</property>
1764+ <property name="can_focus">True</property>
1765+ <property name="label" translatable="yes">Show in tray menu </property>
1766+ <property name="response_id">0</property>
1767+ <property name="draw_indicator">True</property>
1768+ <signal name="toggled" handler="on_modified"/>
1769+ </widget>
1770+ <packing>
1771+ <property name="position">1</property>
1772+ </packing>
1773+ </child>
1774+ </widget>
1775+ </child>
1776+ </widget>
1777+ </child>
1778+ <child>
1779+ <widget class="GtkLabel" id="label2">
1780+ <property name="visible">True</property>
1781+ <property name="label" translatable="yes">&lt;b&gt;Settings&lt;/b&gt;</property>
1782+ <property name="use_markup">True</property>
1783+ </widget>
1784+ <packing>
1785+ <property name="type">label_item</property>
1786+ </packing>
1787+ </child>
1788+ </widget>
1789+ <packing>
1790+ <property name="expand">False</property>
1791+ <property name="position">3</property>
1792+ </packing>
1793+ </child>
1794+ </widget>
1795+ </child>
1796+ </widget>
1797+ </child>
1798+ </widget>
1799+</glade-interface>
1800
1801=== added file 'glade/phrasepage.glade'
1802--- glade/phrasepage.glade 1970-01-01 00:00:00 +0000
1803+++ glade/phrasepage.glade 2010-03-26 15:01:22 +0000
1804@@ -0,0 +1,106 @@
1805+<?xml version="1.0"?>
1806+<glade-interface>
1807+ <!-- interface-requires gtk+ 2.6 -->
1808+ <!-- interface-naming-policy toplevel-contextual -->
1809+ <widget class="GtkWindow" id="window1">
1810+ <child>
1811+ <widget class="GtkAlignment" id="phrasepage">
1812+ <property name="visible">True</property>
1813+ <property name="top_padding">5</property>
1814+ <property name="bottom_padding">5</property>
1815+ <child>
1816+ <widget class="GtkVBox" id="vbox1">
1817+ <property name="visible">True</property>
1818+ <property name="orientation">vertical</property>
1819+ <property name="spacing">5</property>
1820+ <child>
1821+ <widget class="GtkScrolledWindow" id="scrolledWindow">
1822+ <property name="visible">True</property>
1823+ <property name="can_focus">True</property>
1824+ <property name="hscrollbar_policy">automatic</property>
1825+ <property name="vscrollbar_policy">automatic</property>
1826+ <property name="shadow_type">in</property>
1827+ <child>
1828+ <placeholder/>
1829+ </child>
1830+ </widget>
1831+ <packing>
1832+ <property name="position">0</property>
1833+ </packing>
1834+ </child>
1835+ <child>
1836+ <widget class="GtkFrame" id="frame1">
1837+ <property name="visible">True</property>
1838+ <property name="label_xalign">0</property>
1839+ <property name="shadow_type">none</property>
1840+ <child>
1841+ <widget class="GtkAlignment" id="alignment2">
1842+ <property name="visible">True</property>
1843+ <property name="top_padding">5</property>
1844+ <property name="bottom_padding">5</property>
1845+ <property name="left_padding">10</property>
1846+ <child>
1847+ <widget class="GtkVBox" id="settingsVbox">
1848+ <property name="visible">True</property>
1849+ <property name="orientation">vertical</property>
1850+ <child>
1851+ <widget class="GtkCheckButton" id="promptCheckbox">
1852+ <property name="label" translatable="yes">Always prompt before pasting this phrase</property>
1853+ <property name="visible">True</property>
1854+ <property name="can_focus">True</property>
1855+ <property name="receives_default">False</property>
1856+ <property name="draw_indicator">True</property>
1857+ <signal name="toggled" handler="on_modified"/>
1858+ </widget>
1859+ <packing>
1860+ <property name="position">0</property>
1861+ </packing>
1862+ </child>
1863+ <child>
1864+ <widget class="GtkCheckButton" id="showInTrayCheckbox">
1865+ <property name="label" translatable="yes">Show in tray menu </property>
1866+ <property name="visible">True</property>
1867+ <property name="can_focus">True</property>
1868+ <property name="receives_default">False</property>
1869+ <property name="draw_indicator">True</property>
1870+ <signal name="toggled" handler="on_modified"/>
1871+ </widget>
1872+ <packing>
1873+ <property name="position">1</property>
1874+ </packing>
1875+ </child>
1876+ <child>
1877+ <widget class="GtkHSeparator" id="hseparator1">
1878+ <property name="visible">True</property>
1879+ </widget>
1880+ <packing>
1881+ <property name="expand">False</property>
1882+ <property name="position">2</property>
1883+ </packing>
1884+ </child>
1885+ </widget>
1886+ </child>
1887+ </widget>
1888+ </child>
1889+ <child>
1890+ <widget class="GtkLabel" id="label2">
1891+ <property name="visible">True</property>
1892+ <property name="label" translatable="yes">&lt;b&gt;Phrase Settings&lt;/b&gt;</property>
1893+ <property name="use_markup">True</property>
1894+ </widget>
1895+ <packing>
1896+ <property name="type">label_item</property>
1897+ </packing>
1898+ </child>
1899+ </widget>
1900+ <packing>
1901+ <property name="expand">False</property>
1902+ <property name="position">1</property>
1903+ </packing>
1904+ </child>
1905+ </widget>
1906+ </child>
1907+ </widget>
1908+ </child>
1909+ </widget>
1910+</glade-interface>
1911
1912=== added file 'glade/recorddialog.glade'
1913--- glade/recorddialog.glade 1970-01-01 00:00:00 +0000
1914+++ glade/recorddialog.glade 2010-03-26 15:01:22 +0000
1915@@ -0,0 +1,145 @@
1916+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1917+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
1918+<!--Generated with glade3 3.4.5 on Fri Oct 30 16:24:33 2009 -->
1919+<glade-interface>
1920+ <widget class="GtkDialog" id="recorddialog">
1921+ <property name="border_width">5</property>
1922+ <property name="title" translatable="yes">Record Macro</property>
1923+ <property name="resizable">False</property>
1924+ <property name="modal">True</property>
1925+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
1926+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
1927+ <signal name="response" handler="on_response"/>
1928+ <child internal-child="vbox">
1929+ <widget class="GtkVBox" id="dialog-vbox1">
1930+ <property name="visible">True</property>
1931+ <property name="spacing">2</property>
1932+ <child>
1933+ <widget class="GtkVBox" id="vbox1">
1934+ <property name="visible">True</property>
1935+ <child>
1936+ <widget class="GtkLabel" id="label1">
1937+ <property name="visible">True</property>
1938+ <property name="xalign">0</property>
1939+ <property name="label" translatable="yes">&lt;b&gt;Record a keyboard/mouse macro&lt;/b&gt;</property>
1940+ <property name="use_markup">True</property>
1941+ </widget>
1942+ <packing>
1943+ <property name="padding">5</property>
1944+ </packing>
1945+ </child>
1946+ <child>
1947+ <widget class="GtkCheckButton" id="keyboardButton">
1948+ <property name="visible">True</property>
1949+ <property name="can_focus">True</property>
1950+ <property name="label" translatable="yes">Record keyboard events</property>
1951+ <property name="response_id">0</property>
1952+ <property name="active">True</property>
1953+ <property name="draw_indicator">True</property>
1954+ </widget>
1955+ <packing>
1956+ <property name="padding">3</property>
1957+ <property name="position">1</property>
1958+ </packing>
1959+ </child>
1960+ <child>
1961+ <widget class="GtkCheckButton" id="mouseButton">
1962+ <property name="visible">True</property>
1963+ <property name="can_focus">True</property>
1964+ <property name="label" translatable="yes">Record mouse events (experimental)</property>
1965+ <property name="response_id">0</property>
1966+ <property name="draw_indicator">True</property>
1967+ </widget>
1968+ <packing>
1969+ <property name="padding">3</property>
1970+ <property name="position">2</property>
1971+ </packing>
1972+ </child>
1973+ <child>
1974+ <widget class="GtkHBox" id="hbox1">
1975+ <property name="visible">True</property>
1976+ <property name="spacing">5</property>
1977+ <child>
1978+ <widget class="GtkLabel" id="label2">
1979+ <property name="visible">True</property>
1980+ <property name="label" translatable="yes">Start recording after</property>
1981+ </widget>
1982+ <packing>
1983+ <property name="expand">False</property>
1984+ </packing>
1985+ </child>
1986+ <child>
1987+ <widget class="GtkSpinButton" id="spinButton">
1988+ <property name="visible">True</property>
1989+ <property name="can_focus">True</property>
1990+ <property name="adjustment">5 1 20 1 10 10</property>
1991+ </widget>
1992+ <packing>
1993+ <property name="expand">False</property>
1994+ <property name="fill">False</property>
1995+ <property name="position">1</property>
1996+ </packing>
1997+ </child>
1998+ <child>
1999+ <widget class="GtkLabel" id="label3">
2000+ <property name="visible">True</property>
2001+ <property name="label" translatable="yes">seconds</property>
2002+ </widget>
2003+ <packing>
2004+ <property name="expand">False</property>
2005+ <property name="position">2</property>
2006+ </packing>
2007+ </child>
2008+ </widget>
2009+ <packing>
2010+ <property name="expand">False</property>
2011+ <property name="padding">5</property>
2012+ <property name="position">3</property>
2013+ </packing>
2014+ </child>
2015+ </widget>
2016+ <packing>
2017+ <property name="position">2</property>
2018+ </packing>
2019+ </child>
2020+ <child internal-child="action_area">
2021+ <widget class="GtkHButtonBox" id="dialog-action_area1">
2022+ <property name="visible">True</property>
2023+ <property name="layout_style">GTK_BUTTONBOX_END</property>
2024+ <child>
2025+ <widget class="GtkButton" id="cancelButton">
2026+ <property name="visible">True</property>
2027+ <property name="can_focus">True</property>
2028+ <property name="receives_default">True</property>
2029+ <property name="label" translatable="yes">gtk-cancel</property>
2030+ <property name="use_stock">True</property>
2031+ <property name="response_id">0</property>
2032+ <signal name="clicked" handler="on_cancel"/>
2033+ </widget>
2034+ </child>
2035+ <child>
2036+ <widget class="GtkButton" id="okButton">
2037+ <property name="visible">True</property>
2038+ <property name="can_focus">True</property>
2039+ <property name="can_default">True</property>
2040+ <property name="has_default">True</property>
2041+ <property name="receives_default">True</property>
2042+ <property name="label" translatable="yes">gtk-ok</property>
2043+ <property name="use_stock">True</property>
2044+ <property name="response_id">0</property>
2045+ <signal name="clicked" handler="on_ok"/>
2046+ </widget>
2047+ <packing>
2048+ <property name="position">1</property>
2049+ </packing>
2050+ </child>
2051+ </widget>
2052+ <packing>
2053+ <property name="expand">False</property>
2054+ <property name="pack_type">GTK_PACK_END</property>
2055+ </packing>
2056+ </child>
2057+ </widget>
2058+ </child>
2059+ </widget>
2060+</glade-interface>
2061
2062=== added file 'glade/scriptpage.glade'
2063--- glade/scriptpage.glade 1970-01-01 00:00:00 +0000
2064+++ glade/scriptpage.glade 2010-03-26 15:01:22 +0000
2065@@ -0,0 +1,106 @@
2066+<?xml version="1.0"?>
2067+<glade-interface>
2068+ <!-- interface-requires gtk+ 2.6 -->
2069+ <!-- interface-naming-policy toplevel-contextual -->
2070+ <widget class="GtkWindow" id="window1">
2071+ <child>
2072+ <widget class="GtkAlignment" id="scriptpage">
2073+ <property name="visible">True</property>
2074+ <property name="top_padding">5</property>
2075+ <property name="bottom_padding">5</property>
2076+ <child>
2077+ <widget class="GtkVBox" id="vbox1">
2078+ <property name="visible">True</property>
2079+ <property name="orientation">vertical</property>
2080+ <property name="spacing">5</property>
2081+ <child>
2082+ <widget class="GtkScrolledWindow" id="scrolledWindow">
2083+ <property name="visible">True</property>
2084+ <property name="can_focus">True</property>
2085+ <property name="hscrollbar_policy">automatic</property>
2086+ <property name="vscrollbar_policy">automatic</property>
2087+ <property name="shadow_type">in</property>
2088+ <child>
2089+ <placeholder/>
2090+ </child>
2091+ </widget>
2092+ <packing>
2093+ <property name="position">0</property>
2094+ </packing>
2095+ </child>
2096+ <child>
2097+ <widget class="GtkFrame" id="frame1">
2098+ <property name="visible">True</property>
2099+ <property name="label_xalign">0</property>
2100+ <property name="shadow_type">none</property>
2101+ <child>
2102+ <widget class="GtkAlignment" id="alignment2">
2103+ <property name="visible">True</property>
2104+ <property name="top_padding">5</property>
2105+ <property name="bottom_padding">5</property>
2106+ <property name="left_padding">10</property>
2107+ <child>
2108+ <widget class="GtkVBox" id="settingsVbox">
2109+ <property name="visible">True</property>
2110+ <property name="orientation">vertical</property>
2111+ <child>
2112+ <widget class="GtkCheckButton" id="promptCheckbox">
2113+ <property name="label" translatable="yes">Always prompt before executing this script</property>
2114+ <property name="visible">True</property>
2115+ <property name="can_focus">True</property>
2116+ <property name="receives_default">False</property>
2117+ <property name="draw_indicator">True</property>
2118+ <signal name="toggled" handler="on_modified"/>
2119+ </widget>
2120+ <packing>
2121+ <property name="position">0</property>
2122+ </packing>
2123+ </child>
2124+ <child>
2125+ <widget class="GtkCheckButton" id="showInTrayCheckbox">
2126+ <property name="label" translatable="yes">Show in tray menu </property>
2127+ <property name="visible">True</property>
2128+ <property name="can_focus">True</property>
2129+ <property name="receives_default">False</property>
2130+ <property name="draw_indicator">True</property>
2131+ <signal name="toggled" handler="on_modified"/>
2132+ </widget>
2133+ <packing>
2134+ <property name="position">1</property>
2135+ </packing>
2136+ </child>
2137+ <child>
2138+ <widget class="GtkHSeparator" id="hseparator1">
2139+ <property name="visible">True</property>
2140+ </widget>
2141+ <packing>
2142+ <property name="expand">False</property>
2143+ <property name="position">2</property>
2144+ </packing>
2145+ </child>
2146+ </widget>
2147+ </child>
2148+ </widget>
2149+ </child>
2150+ <child>
2151+ <widget class="GtkLabel" id="label2">
2152+ <property name="visible">True</property>
2153+ <property name="label" translatable="yes">&lt;b&gt;Script Settings&lt;/b&gt;</property>
2154+ <property name="use_markup">True</property>
2155+ </widget>
2156+ <packing>
2157+ <property name="type">label_item</property>
2158+ </packing>
2159+ </child>
2160+ </widget>
2161+ <packing>
2162+ <property name="expand">False</property>
2163+ <property name="position">1</property>
2164+ </packing>
2165+ </child>
2166+ </widget>
2167+ </child>
2168+ </widget>
2169+ </child>
2170+ </widget>
2171+</glade-interface>
2172
2173=== added file 'glade/settingsdialog.glade'
2174--- glade/settingsdialog.glade 1970-01-01 00:00:00 +0000
2175+++ glade/settingsdialog.glade 2010-03-26 15:01:22 +0000
2176@@ -0,0 +1,762 @@
2177+<?xml version="1.0"?>
2178+<glade-interface>
2179+ <!-- interface-requires gtk+ 2.16 -->
2180+ <!-- interface-naming-policy project-wide -->
2181+ <widget class="GtkDialog" id="settingsdialog">
2182+ <property name="border_width">5</property>
2183+ <property name="title" translatable="yes">AutoKey - Preferences</property>
2184+ <property name="modal">True</property>
2185+ <property name="window_position">center-on-parent</property>
2186+ <property name="type_hint">dialog</property>
2187+ <property name="has_separator">False</property>
2188+ <child internal-child="vbox">
2189+ <widget class="GtkVBox" id="dialog-vbox1">
2190+ <property name="visible">True</property>
2191+ <property name="orientation">vertical</property>
2192+ <property name="spacing">2</property>
2193+ <child>
2194+ <widget class="GtkNotebook" id="notebook1">
2195+ <property name="visible">True</property>
2196+ <property name="can_focus">True</property>
2197+ <child>
2198+ <widget class="GtkAlignment" id="alignment1">
2199+ <property name="visible">True</property>
2200+ <property name="yalign">0</property>
2201+ <property name="yscale">0</property>
2202+ <property name="top_padding">5</property>
2203+ <property name="bottom_padding">5</property>
2204+ <property name="left_padding">5</property>
2205+ <property name="right_padding">5</property>
2206+ <child>
2207+ <widget class="GtkVBox" id="vbox1">
2208+ <property name="visible">True</property>
2209+ <property name="orientation">vertical</property>
2210+ <property name="spacing">5</property>
2211+ <child>
2212+ <widget class="GtkFrame" id="frame8">
2213+ <property name="visible">True</property>
2214+ <property name="label_xalign">0</property>
2215+ <property name="shadow_type">none</property>
2216+ <child>
2217+ <widget class="GtkAlignment" id="alignment11">
2218+ <property name="visible">True</property>
2219+ <property name="left_padding">12</property>
2220+ <child>
2221+ <widget class="GtkVBox" id="vbox7">
2222+ <property name="visible">True</property>
2223+ <property name="orientation">vertical</property>
2224+ <child>
2225+ <widget class="GtkCheckButton" id="autoStartCheckbox">
2226+ <property name="label" translatable="yes">Automatically start AutoKey at login</property>
2227+ <property name="visible">True</property>
2228+ <property name="can_focus">True</property>
2229+ <property name="receives_default">False</property>
2230+ <property name="draw_indicator">True</property>
2231+ </widget>
2232+ <packing>
2233+ <property name="position">0</property>
2234+ </packing>
2235+ </child>
2236+ <child>
2237+ <widget class="GtkCheckButton" id="promptToSaveCheckbox">
2238+ <property name="label" translatable="yes">Prompt for unsaved changes</property>
2239+ <property name="visible">True</property>
2240+ <property name="can_focus">True</property>
2241+ <property name="receives_default">False</property>
2242+ <property name="draw_indicator">True</property>
2243+ </widget>
2244+ <packing>
2245+ <property name="position">1</property>
2246+ </packing>
2247+ </child>
2248+ <child>
2249+ <widget class="GtkCheckButton" id="showTrayCheckbox">
2250+ <property name="label" translatable="yes">Show a tray icon (requires restart)</property>
2251+ <property name="visible">True</property>
2252+ <property name="can_focus">True</property>
2253+ <property name="receives_default">False</property>
2254+ <property name="draw_indicator">True</property>
2255+ </widget>
2256+ <packing>
2257+ <property name="position">2</property>
2258+ </packing>
2259+ </child>
2260+ </widget>
2261+ </child>
2262+ </widget>
2263+ </child>
2264+ <child>
2265+ <widget class="GtkLabel" id="label">
2266+ <property name="visible">True</property>
2267+ <property name="label" translatable="yes">&lt;b&gt;Application&lt;/b&gt;</property>
2268+ <property name="use_markup">True</property>
2269+ </widget>
2270+ <packing>
2271+ <property name="type">label_item</property>
2272+ </packing>
2273+ </child>
2274+ </widget>
2275+ <packing>
2276+ <property name="position">0</property>
2277+ </packing>
2278+ </child>
2279+ <child>
2280+ <widget class="GtkFrame" id="frame2">
2281+ <property name="visible">True</property>
2282+ <property name="label_xalign">0</property>
2283+ <property name="shadow_type">none</property>
2284+ <child>
2285+ <widget class="GtkAlignment" id="alignment3">
2286+ <property name="visible">True</property>
2287+ <property name="left_padding">12</property>
2288+ <child>
2289+ <widget class="GtkVBox" id="vbox3">
2290+ <property name="visible">True</property>
2291+ <property name="orientation">vertical</property>
2292+ <child>
2293+ <widget class="GtkCheckButton" id="allowKbNavCheckbox">
2294+ <property name="label" translatable="yes">Allow keyboard navigation of popup menu</property>
2295+ <property name="visible">True</property>
2296+ <property name="can_focus">True</property>
2297+ <property name="receives_default">False</property>
2298+ <property name="draw_indicator">True</property>
2299+ </widget>
2300+ <packing>
2301+ <property name="position">0</property>
2302+ </packing>
2303+ </child>
2304+ <child>
2305+ <widget class="GtkCheckButton" id="sortByUsageCheckbox">
2306+ <property name="label" translatable="yes">Sort menu items with most frequently used first</property>
2307+ <property name="visible">True</property>
2308+ <property name="can_focus">True</property>
2309+ <property name="receives_default">False</property>
2310+ <property name="draw_indicator">True</property>
2311+ </widget>
2312+ <packing>
2313+ <property name="position">1</property>
2314+ </packing>
2315+ </child>
2316+ </widget>
2317+ </child>
2318+ </widget>
2319+ </child>
2320+ <child>
2321+ <widget class="GtkLabel" id="label5">
2322+ <property name="visible">True</property>
2323+ <property name="label" translatable="yes">&lt;b&gt;Popup Menu&lt;/b&gt;</property>
2324+ <property name="use_markup">True</property>
2325+ </widget>
2326+ <packing>
2327+ <property name="type">label_item</property>
2328+ </packing>
2329+ </child>
2330+ </widget>
2331+ <packing>
2332+ <property name="position">1</property>
2333+ </packing>
2334+ </child>
2335+ <child>
2336+ <widget class="GtkFrame" id="frame3">
2337+ <property name="visible">True</property>
2338+ <property name="label_xalign">0</property>
2339+ <property name="shadow_type">none</property>
2340+ <child>
2341+ <widget class="GtkAlignment" id="alignment4">
2342+ <property name="visible">True</property>
2343+ <property name="left_padding">12</property>
2344+ <child>
2345+ <widget class="GtkCheckButton" id="enableUndoCheckbox">
2346+ <property name="label" translatable="yes">Enable undo by pressing backspace</property>
2347+ <property name="visible">True</property>
2348+ <property name="can_focus">True</property>
2349+ <property name="receives_default">False</property>
2350+ <property name="draw_indicator">True</property>
2351+ </widget>
2352+ </child>
2353+ </widget>
2354+ </child>
2355+ <child>
2356+ <widget class="GtkLabel" id="label6">
2357+ <property name="visible">True</property>
2358+ <property name="label" translatable="yes">&lt;b&gt;Expansions&lt;/b&gt;</property>
2359+ <property name="use_markup">True</property>
2360+ </widget>
2361+ <packing>
2362+ <property name="type">label_item</property>
2363+ </packing>
2364+ </child>
2365+ </widget>
2366+ <packing>
2367+ <property name="position">2</property>
2368+ </packing>
2369+ </child>
2370+ </widget>
2371+ </child>
2372+ </widget>
2373+ </child>
2374+ <child>
2375+ <widget class="GtkLabel" id="label1">
2376+ <property name="visible">True</property>
2377+ <property name="label" translatable="yes">General</property>
2378+ </widget>
2379+ <packing>
2380+ <property name="tab_fill">False</property>
2381+ <property name="type">tab</property>
2382+ </packing>
2383+ </child>
2384+ <child>
2385+ <widget class="GtkAlignment" id="alignment5">
2386+ <property name="visible">True</property>
2387+ <property name="yalign">0</property>
2388+ <property name="yscale">0</property>
2389+ <property name="top_padding">5</property>
2390+ <property name="bottom_padding">5</property>
2391+ <property name="left_padding">5</property>
2392+ <property name="right_padding">5</property>
2393+ <child>
2394+ <widget class="GtkVBox" id="vbox4">
2395+ <property name="visible">True</property>
2396+ <property name="orientation">vertical</property>
2397+ <property name="spacing">10</property>
2398+ <child>
2399+ <widget class="GtkFrame" id="frame4">
2400+ <property name="visible">True</property>
2401+ <property name="label_xalign">0</property>
2402+ <property name="shadow_type">none</property>
2403+ <child>
2404+ <widget class="GtkAlignment" id="alignment6">
2405+ <property name="visible">True</property>
2406+ <property name="top_padding">5</property>
2407+ <property name="bottom_padding">5</property>
2408+ <property name="left_padding">12</property>
2409+ <child>
2410+ <widget class="GtkHBox" id="hbox1">
2411+ <property name="visible">True</property>
2412+ <property name="spacing">5</property>
2413+ <child>
2414+ <widget class="GtkLabel" id="label10">
2415+ <property name="visible">True</property>
2416+ <property name="xalign">0</property>
2417+ <property name="label" translatable="yes">Hotkey:</property>
2418+ </widget>
2419+ <packing>
2420+ <property name="expand">False</property>
2421+ <property name="position">0</property>
2422+ </packing>
2423+ </child>
2424+ <child>
2425+ <widget class="GtkLabel" id="monitorKeyLabel">
2426+ <property name="visible">True</property>
2427+ <property name="xalign">0</property>
2428+ <property name="label" translatable="yes">$hotkey</property>
2429+ </widget>
2430+ <packing>
2431+ <property name="position">1</property>
2432+ </packing>
2433+ </child>
2434+ <child>
2435+ <widget class="GtkButton" id="setMonitorButton">
2436+ <property name="label" translatable="yes">Set</property>
2437+ <property name="width_request">80</property>
2438+ <property name="visible">True</property>
2439+ <property name="can_focus">True</property>
2440+ <property name="receives_default">True</property>
2441+ <signal name="clicked" handler="on_setMonitorButton_pressed"/>
2442+ </widget>
2443+ <packing>
2444+ <property name="expand">False</property>
2445+ <property name="position">2</property>
2446+ </packing>
2447+ </child>
2448+ <child>
2449+ <widget class="GtkButton" id="clearMonitorButton">
2450+ <property name="label">gtk-clear</property>
2451+ <property name="width_request">80</property>
2452+ <property name="visible">True</property>
2453+ <property name="can_focus">True</property>
2454+ <property name="receives_default">True</property>
2455+ <property name="use_stock">True</property>
2456+ <signal name="clicked" handler="on_clearMonitorButton_pressed"/>
2457+ </widget>
2458+ <packing>
2459+ <property name="expand">False</property>
2460+ <property name="position">3</property>
2461+ </packing>
2462+ </child>
2463+ </widget>
2464+ </child>
2465+ </widget>
2466+ </child>
2467+ <child>
2468+ <widget class="GtkLabel" id="label7">
2469+ <property name="visible">True</property>
2470+ <property name="label" translatable="yes">&lt;b&gt;Toggle monitoring using a hotkey&lt;/b&gt;</property>
2471+ <property name="use_markup">True</property>
2472+ </widget>
2473+ <packing>
2474+ <property name="type">label_item</property>
2475+ </packing>
2476+ </child>
2477+ </widget>
2478+ <packing>
2479+ <property name="position">0</property>
2480+ </packing>
2481+ </child>
2482+ <child>
2483+ <widget class="GtkFrame" id="frame5">
2484+ <property name="visible">True</property>
2485+ <property name="label_xalign">0</property>
2486+ <property name="shadow_type">none</property>
2487+ <child>
2488+ <widget class="GtkAlignment" id="alignment7">
2489+ <property name="visible">True</property>
2490+ <property name="top_padding">5</property>
2491+ <property name="bottom_padding">5</property>
2492+ <property name="left_padding">12</property>
2493+ <child>
2494+ <widget class="GtkHBox" id="hbox2">
2495+ <property name="visible">True</property>
2496+ <property name="spacing">5</property>
2497+ <child>
2498+ <widget class="GtkLabel" id="label12">
2499+ <property name="visible">True</property>
2500+ <property name="xalign">0</property>
2501+ <property name="label" translatable="yes">Hotkey:</property>
2502+ </widget>
2503+ <packing>
2504+ <property name="expand">False</property>
2505+ <property name="position">0</property>
2506+ </packing>
2507+ </child>
2508+ <child>
2509+ <widget class="GtkLabel" id="configKeyLabel">
2510+ <property name="visible">True</property>
2511+ <property name="xalign">0</property>
2512+ <property name="label" translatable="yes">$hotkey</property>
2513+ </widget>
2514+ <packing>
2515+ <property name="position">1</property>
2516+ </packing>
2517+ </child>
2518+ <child>
2519+ <widget class="GtkButton" id="setConfigButton">
2520+ <property name="label" translatable="yes">Set</property>
2521+ <property name="width_request">80</property>
2522+ <property name="visible">True</property>
2523+ <property name="can_focus">True</property>
2524+ <property name="receives_default">True</property>
2525+ <signal name="clicked" handler="on_setConfigButton_pressed"/>
2526+ </widget>
2527+ <packing>
2528+ <property name="expand">False</property>
2529+ <property name="position">2</property>
2530+ </packing>
2531+ </child>
2532+ <child>
2533+ <widget class="GtkButton" id="clearConfigButton">
2534+ <property name="label">gtk-clear</property>
2535+ <property name="width_request">80</property>
2536+ <property name="visible">True</property>
2537+ <property name="can_focus">True</property>
2538+ <property name="receives_default">True</property>
2539+ <property name="use_stock">True</property>
2540+ <signal name="clicked" handler="on_clearConfigButton_pressed"/>
2541+ </widget>
2542+ <packing>
2543+ <property name="expand">False</property>
2544+ <property name="position">3</property>
2545+ </packing>
2546+ </child>
2547+ </widget>
2548+ </child>
2549+ </widget>
2550+ </child>
2551+ <child>
2552+ <widget class="GtkLabel" id="label8">
2553+ <property name="visible">True</property>
2554+ <property name="label" translatable="yes">&lt;b&gt;Show configuration window using a hotkey&lt;/b&gt;</property>
2555+ <property name="use_markup">True</property>
2556+ </widget>
2557+ <packing>
2558+ <property name="type">label_item</property>
2559+ </packing>
2560+ </child>
2561+ </widget>
2562+ <packing>
2563+ <property name="position">1</property>
2564+ </packing>
2565+ </child>
2566+ <child>
2567+ <widget class="GtkFrame" id="frame6">
2568+ <property name="visible">True</property>
2569+ <property name="label_xalign">0</property>
2570+ <property name="shadow_type">none</property>
2571+ <child>
2572+ <widget class="GtkAlignment" id="alignment8">
2573+ <property name="visible">True</property>
2574+ <property name="top_padding">5</property>
2575+ <property name="bottom_padding">5</property>
2576+ <property name="left_padding">12</property>
2577+ <child>
2578+ <widget class="GtkHBox" id="hbox3">
2579+ <property name="visible">True</property>
2580+ <property name="spacing">5</property>
2581+ <child>
2582+ <widget class="GtkLabel" id="label14">
2583+ <property name="visible">True</property>
2584+ <property name="xalign">0</property>
2585+ <property name="label" translatable="yes">Hotkey:</property>
2586+ </widget>
2587+ <packing>
2588+ <property name="expand">False</property>
2589+ <property name="position">0</property>
2590+ </packing>
2591+ </child>
2592+ <child>
2593+ <widget class="GtkLabel" id="popupKeyLabel">
2594+ <property name="visible">True</property>
2595+ <property name="xalign">0</property>
2596+ <property name="label" translatable="yes">$hotkey</property>
2597+ </widget>
2598+ <packing>
2599+ <property name="position">1</property>
2600+ </packing>
2601+ </child>
2602+ <child>
2603+ <widget class="GtkButton" id="setPopupButton">
2604+ <property name="label" translatable="yes">Set</property>
2605+ <property name="width_request">80</property>
2606+ <property name="visible">True</property>
2607+ <property name="can_focus">True</property>
2608+ <property name="receives_default">True</property>
2609+ <signal name="clicked" handler="on_setPopupButton_pressed"/>
2610+ </widget>
2611+ <packing>
2612+ <property name="expand">False</property>
2613+ <property name="position">2</property>
2614+ </packing>
2615+ </child>
2616+ <child>
2617+ <widget class="GtkButton" id="clearPopupButton">
2618+ <property name="label">gtk-clear</property>
2619+ <property name="width_request">80</property>
2620+ <property name="visible">True</property>
2621+ <property name="can_focus">True</property>
2622+ <property name="receives_default">True</property>
2623+ <property name="use_stock">True</property>
2624+ <signal name="clicked" handler="on_clearPopupButton_pressed"/>
2625+ </widget>
2626+ <packing>
2627+ <property name="expand">False</property>
2628+ <property name="position">3</property>
2629+ </packing>
2630+ </child>
2631+ </widget>
2632+ </child>
2633+ </widget>
2634+ </child>
2635+ <child>
2636+ <widget class="GtkLabel" id="label9">
2637+ <property name="visible">True</property>
2638+ <property name="label" translatable="yes">&lt;b&gt;Show abbreviation popup using a hotkey&lt;/b&gt;</property>
2639+ <property name="use_markup">True</property>
2640+ </widget>
2641+ <packing>
2642+ <property name="type">label_item</property>
2643+ </packing>
2644+ </child>
2645+ </widget>
2646+ <packing>
2647+ <property name="position">2</property>
2648+ </packing>
2649+ </child>
2650+ </widget>
2651+ </child>
2652+ </widget>
2653+ <packing>
2654+ <property name="position">1</property>
2655+ </packing>
2656+ </child>
2657+ <child>
2658+ <widget class="GtkLabel" id="label2">
2659+ <property name="visible">True</property>
2660+ <property name="label" translatable="yes">Special Hotkeys</property>
2661+ </widget>
2662+ <packing>
2663+ <property name="position">1</property>
2664+ <property name="tab_fill">False</property>
2665+ <property name="type">tab</property>
2666+ </packing>
2667+ </child>
2668+ <child>
2669+ <widget class="GtkAlignment" id="alignment2">
2670+ <property name="visible">True</property>
2671+ <property name="top_padding">5</property>
2672+ <property name="bottom_padding">5</property>
2673+ <property name="left_padding">5</property>
2674+ <property name="right_padding">5</property>
2675+ <child>
2676+ <widget class="GtkFrame" id="frame1">
2677+ <property name="visible">True</property>
2678+ <property name="label_xalign">0</property>
2679+ <property name="shadow_type">none</property>
2680+ <child>
2681+ <widget class="GtkAlignment" id="alignment12">
2682+ <property name="visible">True</property>
2683+ <property name="left_padding">12</property>
2684+ <child>
2685+ <widget class="GtkVBox" id="vbox2">
2686+ <property name="visible">True</property>
2687+ <property name="orientation">vertical</property>
2688+ <child>
2689+ <widget class="GtkLabel" id="label17">
2690+ <property name="visible">True</property>
2691+ <property name="xalign">0</property>
2692+ <property name="ypad">5</property>
2693+ <property name="label" translatable="yes">Any Python modules placed in this folder will be available for
2694+import by scripts.</property>
2695+ </widget>
2696+ <packing>
2697+ <property name="expand">False</property>
2698+ <property name="position">0</property>
2699+ </packing>
2700+ </child>
2701+ <child>
2702+ <widget class="GtkFileChooserButton" id="userModuleChooserButton">
2703+ <property name="visible">True</property>
2704+ <property name="action">select-folder</property>
2705+ <property name="title" translatable="yes">Select A Folder</property>
2706+ </widget>
2707+ <packing>
2708+ <property name="expand">False</property>
2709+ <property name="position">1</property>
2710+ </packing>
2711+ </child>
2712+ </widget>
2713+ </child>
2714+ </widget>
2715+ </child>
2716+ <child>
2717+ <widget class="GtkLabel" id="label16">
2718+ <property name="visible">True</property>
2719+ <property name="label" translatable="yes">&lt;b&gt;User Module Folder&lt;/b&gt;</property>
2720+ <property name="use_markup">True</property>
2721+ </widget>
2722+ <packing>
2723+ <property name="type">label_item</property>
2724+ </packing>
2725+ </child>
2726+ </widget>
2727+ </child>
2728+ </widget>
2729+ <packing>
2730+ <property name="position">2</property>
2731+ </packing>
2732+ </child>
2733+ <child>
2734+ <widget class="GtkLabel" id="label4">
2735+ <property name="visible">True</property>
2736+ <property name="label" translatable="yes">Script Engine</property>
2737+ </widget>
2738+ <packing>
2739+ <property name="position">3</property>
2740+ <property name="tab_fill">False</property>
2741+ <property name="type">tab</property>
2742+ </packing>
2743+ </child>
2744+ <child>
2745+ <widget class="GtkAlignment" id="alignment9">
2746+ <property name="visible">True</property>
2747+ <property name="yalign">0</property>
2748+ <property name="yscale">0</property>
2749+ <property name="top_padding">5</property>
2750+ <property name="bottom_padding">5</property>
2751+ <property name="left_padding">5</property>
2752+ <property name="right_padding">5</property>
2753+ <child>
2754+ <widget class="GtkVBox" id="vbox5">
2755+ <property name="visible">True</property>
2756+ <property name="orientation">vertical</property>
2757+ <property name="spacing">5</property>
2758+ <child>
2759+ <widget class="GtkFrame" id="frame7">
2760+ <property name="visible">True</property>
2761+ <property name="label_xalign">0</property>
2762+ <property name="shadow_type">none</property>
2763+ <child>
2764+ <widget class="GtkAlignment" id="alignment10">
2765+ <property name="visible">True</property>
2766+ <property name="top_padding">5</property>
2767+ <property name="bottom_padding">5</property>
2768+ <property name="right_padding">5</property>
2769+ <child>
2770+ <widget class="GtkVBox" id="vbox6">
2771+ <property name="visible">True</property>
2772+ <property name="orientation">vertical</property>
2773+ <property name="spacing">5</property>
2774+ <child>
2775+ <widget class="GtkLabel" id="label15">
2776+ <property name="visible">True</property>
2777+ <property name="xalign">0</property>
2778+ <property name="label" translatable="yes">Configure the method AutoKey uses to receive keyboard and
2779+mouse events. Only change this option if AutoKey is not
2780+responding to abbreviations and hotkeys.
2781+
2782+After changing this option, you will need to restart AutoKey for
2783+it to take effect.</property>
2784+ </widget>
2785+ <packing>
2786+ <property name="position">0</property>
2787+ </packing>
2788+ </child>
2789+ <child>
2790+ <widget class="GtkRadioButton" id="xRecordButton">
2791+ <property name="label" translatable="yes">X Record - Preferred option when using X.org server v1.5 or older</property>
2792+ <property name="visible">True</property>
2793+ <property name="can_focus">True</property>
2794+ <property name="receives_default">False</property>
2795+ <property name="active">True</property>
2796+ <property name="draw_indicator">True</property>
2797+ <property name="group">xEvdevButton</property>
2798+ </widget>
2799+ <packing>
2800+ <property name="position">1</property>
2801+ </packing>
2802+ </child>
2803+ <child>
2804+ <widget class="GtkRadioButton" id="xEvdevButton">
2805+ <property name="label" translatable="yes">X EvDev - Preferred option when using X.org server v1.6 or newer</property>
2806+ <property name="visible">True</property>
2807+ <property name="can_focus">True</property>
2808+ <property name="receives_default">False</property>
2809+ <property name="active">True</property>
2810+ <property name="draw_indicator">True</property>
2811+ </widget>
2812+ <packing>
2813+ <property name="position">2</property>
2814+ </packing>
2815+ </child>
2816+ <child>
2817+ <widget class="GtkRadioButton" id="atspiButton">
2818+ <property name="label" translatable="yes">AT-SPI - Fallback option for Gnome users when other methods fail</property>
2819+ <property name="visible">True</property>
2820+ <property name="can_focus">True</property>
2821+ <property name="receives_default">False</property>
2822+ <property name="active">True</property>
2823+ <property name="draw_indicator">True</property>
2824+ <property name="group">xEvdevButton</property>
2825+ </widget>
2826+ <packing>
2827+ <property name="position">3</property>
2828+ </packing>
2829+ </child>
2830+ </widget>
2831+ </child>
2832+ </widget>
2833+ </child>
2834+ <child>
2835+ <widget class="GtkLabel" id="label13">
2836+ <property name="visible">True</property>
2837+ <property name="label" translatable="yes">&lt;b&gt;Interface Type&lt;/b&gt;</property>
2838+ <property name="use_markup">True</property>
2839+ </widget>
2840+ <packing>
2841+ <property name="type">label_item</property>
2842+ </packing>
2843+ </child>
2844+ </widget>
2845+ <packing>
2846+ <property name="position">0</property>
2847+ </packing>
2848+ </child>
2849+ <child>
2850+ <widget class="GtkLabel" id="label11">
2851+ <property name="xalign">0</property>
2852+ <property name="label" translatable="yes">Enable this option only if you experience randomly garbled text in KDE4</property>
2853+ </widget>
2854+ <packing>
2855+ <property name="position">1</property>
2856+ </packing>
2857+ </child>
2858+ <child>
2859+ <widget class="GtkCheckButton" id="checkBox">
2860+ <property name="label" translatable="yes">Enable QT4 workaround</property>
2861+ <property name="can_focus">True</property>
2862+ <property name="receives_default">False</property>
2863+ <property name="draw_indicator">True</property>
2864+ </widget>
2865+ <packing>
2866+ <property name="position">2</property>
2867+ </packing>
2868+ </child>
2869+ </widget>
2870+ </child>
2871+ </widget>
2872+ <packing>
2873+ <property name="position">3</property>
2874+ </packing>
2875+ </child>
2876+ <child>
2877+ <widget class="GtkLabel" id="label3">
2878+ <property name="visible">True</property>
2879+ <property name="label" translatable="yes">Interface</property>
2880+ </widget>
2881+ <packing>
2882+ <property name="position">3</property>
2883+ <property name="tab_fill">False</property>
2884+ <property name="type">tab</property>
2885+ </packing>
2886+ </child>
2887+ </widget>
2888+ <packing>
2889+ <property name="position">2</property>
2890+ </packing>
2891+ </child>
2892+ <child internal-child="action_area">
2893+ <widget class="GtkHButtonBox" id="dialog-action_area1">
2894+ <property name="visible">True</property>
2895+ <property name="layout_style">end</property>
2896+ <child>
2897+ <widget class="GtkButton" id="button1">
2898+ <property name="label">gtk-cancel</property>
2899+ <property name="visible">True</property>
2900+ <property name="can_focus">True</property>
2901+ <property name="receives_default">True</property>
2902+ <property name="use_stock">True</property>
2903+ <signal name="clicked" handler="on_cancel"/>
2904+ </widget>
2905+ <packing>
2906+ <property name="expand">False</property>
2907+ <property name="fill">False</property>
2908+ <property name="position">0</property>
2909+ </packing>
2910+ </child>
2911+ <child>
2912+ <widget class="GtkButton" id="button2">
2913+ <property name="label">gtk-ok</property>
2914+ <property name="visible">True</property>
2915+ <property name="can_focus">True</property>
2916+ <property name="can_default">True</property>
2917+ <property name="has_default">True</property>
2918+ <property name="receives_default">True</property>
2919+ <property name="use_stock">True</property>
2920+ <signal name="clicked" handler="on_save"/>
2921+ </widget>
2922+ <packing>
2923+ <property name="expand">False</property>
2924+ <property name="fill">False</property>
2925+ <property name="position">1</property>
2926+ </packing>
2927+ </child>
2928+ </widget>
2929+ <packing>
2930+ <property name="expand">False</property>
2931+ <property name="pack_type">end</property>
2932+ <property name="position">0</property>
2933+ </packing>
2934+ </child>
2935+ </widget>
2936+ </child>
2937+ </widget>
2938+</glade-interface>
2939
2940=== added file 'glade/settingswidget.glade'
2941--- glade/settingswidget.glade 1970-01-01 00:00:00 +0000
2942+++ glade/settingswidget.glade 2010-03-26 15:01:22 +0000
2943@@ -0,0 +1,197 @@
2944+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2945+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
2946+<!--Generated with glade3 3.4.5 on Tue Sep 1 17:30:47 2009 -->
2947+<glade-interface>
2948+ <widget class="GtkWindow" id="window1">
2949+ <child>
2950+ <widget class="GtkAlignment" id="settingswidget">
2951+ <property name="visible">True</property>
2952+ <property name="top_padding">5</property>
2953+ <property name="bottom_padding">5</property>
2954+ <child>
2955+ <widget class="GtkTable" id="table1">
2956+ <property name="visible">True</property>
2957+ <property name="n_rows">3</property>
2958+ <property name="n_columns">4</property>
2959+ <property name="column_spacing">5</property>
2960+ <property name="row_spacing">5</property>
2961+ <child>
2962+ <widget class="GtkLabel" id="label1">
2963+ <property name="visible">True</property>
2964+ <property name="xalign">0</property>
2965+ <property name="label" translatable="yes">Abbreviation:</property>
2966+ </widget>
2967+ <packing>
2968+ <property name="x_options">GTK_FILL</property>
2969+ </packing>
2970+ </child>
2971+ <child>
2972+ <widget class="GtkLabel" id="label2">
2973+ <property name="visible">True</property>
2974+ <property name="xalign">0</property>
2975+ <property name="label" translatable="yes">Hotkey:</property>
2976+ </widget>
2977+ <packing>
2978+ <property name="top_attach">1</property>
2979+ <property name="bottom_attach">2</property>
2980+ <property name="x_options">GTK_FILL</property>
2981+ </packing>
2982+ </child>
2983+ <child>
2984+ <widget class="GtkLabel" id="label3">
2985+ <property name="visible">True</property>
2986+ <property name="xalign">0</property>
2987+ <property name="label" translatable="yes">Window Filter:</property>
2988+ </widget>
2989+ <packing>
2990+ <property name="top_attach">2</property>
2991+ <property name="bottom_attach">3</property>
2992+ <property name="x_options">GTK_FILL</property>
2993+ </packing>
2994+ </child>
2995+ <child>
2996+ <widget class="GtkLabel" id="abbrLabel">
2997+ <property name="visible">True</property>
2998+ <property name="xalign">0</property>
2999+ <property name="label" translatable="yes">$abbr</property>
3000+ </widget>
3001+ <packing>
3002+ <property name="left_attach">1</property>
3003+ <property name="right_attach">2</property>
3004+ </packing>
3005+ </child>
3006+ <child>
3007+ <widget class="GtkLabel" id="hotkeyLabel">
3008+ <property name="visible">True</property>
3009+ <property name="xalign">0</property>
3010+ <property name="label" translatable="yes">$hotkey</property>
3011+ </widget>
3012+ <packing>
3013+ <property name="left_attach">1</property>
3014+ <property name="right_attach">2</property>
3015+ <property name="top_attach">1</property>
3016+ <property name="bottom_attach">2</property>
3017+ </packing>
3018+ </child>
3019+ <child>
3020+ <widget class="GtkLabel" id="windowFilterLabel">
3021+ <property name="visible">True</property>
3022+ <property name="xalign">0</property>
3023+ <property name="label" translatable="yes">$filter</property>
3024+ </widget>
3025+ <packing>
3026+ <property name="left_attach">1</property>
3027+ <property name="right_attach">2</property>
3028+ <property name="top_attach">2</property>
3029+ <property name="bottom_attach">3</property>
3030+ </packing>
3031+ </child>
3032+ <child>
3033+ <widget class="GtkButton" id="setAbbrButton">
3034+ <property name="width_request">80</property>
3035+ <property name="visible">True</property>
3036+ <property name="can_focus">True</property>
3037+ <property name="receives_default">True</property>
3038+ <property name="label" translatable="yes">Set</property>
3039+ <property name="response_id">0</property>
3040+ <signal name="clicked" handler="on_setAbbrButton_clicked"/>
3041+ </widget>
3042+ <packing>
3043+ <property name="left_attach">2</property>
3044+ <property name="right_attach">3</property>
3045+ <property name="x_options">GTK_FILL</property>
3046+ </packing>
3047+ </child>
3048+ <child>
3049+ <widget class="GtkButton" id="clearAbbrButton">
3050+ <property name="width_request">80</property>
3051+ <property name="visible">True</property>
3052+ <property name="can_focus">True</property>
3053+ <property name="receives_default">True</property>
3054+ <property name="label" translatable="yes">gtk-clear</property>
3055+ <property name="use_stock">True</property>
3056+ <property name="response_id">0</property>
3057+ <signal name="clicked" handler="on_clearAbbrButton_clicked"/>
3058+ </widget>
3059+ <packing>
3060+ <property name="left_attach">3</property>
3061+ <property name="right_attach">4</property>
3062+ <property name="x_options">GTK_FILL</property>
3063+ </packing>
3064+ </child>
3065+ <child>
3066+ <widget class="GtkButton" id="setHotkeyButton">
3067+ <property name="visible">True</property>
3068+ <property name="can_focus">True</property>
3069+ <property name="receives_default">True</property>
3070+ <property name="label" translatable="yes">Set</property>
3071+ <property name="response_id">0</property>
3072+ <signal name="clicked" handler="on_setHotkeyButton_clicked"/>
3073+ </widget>
3074+ <packing>
3075+ <property name="left_attach">2</property>
3076+ <property name="right_attach">3</property>
3077+ <property name="top_attach">1</property>
3078+ <property name="bottom_attach">2</property>
3079+ <property name="x_options">GTK_FILL</property>
3080+ </packing>
3081+ </child>
3082+ <child>
3083+ <widget class="GtkButton" id="setFilterButton">
3084+ <property name="visible">True</property>
3085+ <property name="can_focus">True</property>
3086+ <property name="receives_default">True</property>
3087+ <property name="label" translatable="yes">Set</property>
3088+ <property name="response_id">0</property>
3089+ <signal name="clicked" handler="on_setFilterButton_clicked"/>
3090+ </widget>
3091+ <packing>
3092+ <property name="left_attach">2</property>
3093+ <property name="right_attach">3</property>
3094+ <property name="top_attach">2</property>
3095+ <property name="bottom_attach">3</property>
3096+ <property name="x_options">GTK_FILL</property>
3097+ </packing>
3098+ </child>
3099+ <child>
3100+ <widget class="GtkButton" id="clearHotkeyButton">
3101+ <property name="visible">True</property>
3102+ <property name="can_focus">True</property>
3103+ <property name="receives_default">True</property>
3104+ <property name="label" translatable="yes">gtk-clear</property>
3105+ <property name="use_stock">True</property>
3106+ <property name="response_id">0</property>
3107+ <signal name="clicked" handler="on_clearHotkeyButton_clicked"/>
3108+ </widget>
3109+ <packing>
3110+ <property name="left_attach">3</property>
3111+ <property name="right_attach">4</property>
3112+ <property name="top_attach">1</property>
3113+ <property name="bottom_attach">2</property>
3114+ <property name="x_options">GTK_FILL</property>
3115+ </packing>
3116+ </child>
3117+ <child>
3118+ <widget class="GtkButton" id="clearFilterButton">
3119+ <property name="visible">True</property>
3120+ <property name="can_focus">True</property>
3121+ <property name="receives_default">True</property>
3122+ <property name="label" translatable="yes">gtk-clear</property>
3123+ <property name="use_stock">True</property>
3124+ <property name="response_id">0</property>
3125+ <signal name="clicked" handler="on_clearFilterButton_clicked"/>
3126+ </widget>
3127+ <packing>
3128+ <property name="left_attach">3</property>
3129+ <property name="right_attach">4</property>
3130+ <property name="top_attach">2</property>
3131+ <property name="bottom_attach">3</property>
3132+ <property name="x_options">GTK_FILL</property>
3133+ </packing>
3134+ </child>
3135+ </widget>
3136+ </child>
3137+ </widget>
3138+ </child>
3139+ </widget>
3140+</glade-interface>
3141
3142=== added file 'glade/windowfiltersettings.glade'
3143--- glade/windowfiltersettings.glade 1970-01-01 00:00:00 +0000
3144+++ glade/windowfiltersettings.glade 2010-03-26 15:01:22 +0000
3145@@ -0,0 +1,87 @@
3146+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
3147+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
3148+<!--Generated with glade3 3.4.5 on Fri Oct 2 11:17:13 2009 -->
3149+<glade-interface>
3150+ <widget class="GtkDialog" id="windowfiltersettings">
3151+ <property name="border_width">5</property>
3152+ <property name="title" translatable="yes">Set Window Filter</property>
3153+ <property name="resizable">False</property>
3154+ <property name="modal">True</property>
3155+ <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
3156+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
3157+ <child internal-child="vbox">
3158+ <widget class="GtkVBox" id="dialog-vbox2">
3159+ <property name="visible">True</property>
3160+ <property name="spacing">5</property>
3161+ <child>
3162+ <widget class="GtkVBox" id="vbox2">
3163+ <property name="visible">True</property>
3164+ <property name="spacing">5</property>
3165+ <child>
3166+ <widget class="GtkLabel" id="label1">
3167+ <property name="visible">True</property>
3168+ <property name="xalign">0</property>
3169+ <property name="label" translatable="yes">Only trigger in windows with title matching:</property>
3170+ </widget>
3171+ </child>
3172+ <child>
3173+ <widget class="GtkEntry" id="triggerRegexEntry">
3174+ <property name="visible">True</property>
3175+ <property name="can_focus">True</property>
3176+ <property name="is_focus">True</property>
3177+ <property name="tooltip" translatable="yes">Enter a regular expression that matches the title of windows in which you want this item to trigger.</property>
3178+ <property name="activates_default">True</property>
3179+ <property name="truncate_multiline">True</property>
3180+ </widget>
3181+ <packing>
3182+ <property name="position">1</property>
3183+ </packing>
3184+ </child>
3185+ </widget>
3186+ <packing>
3187+ <property name="fill">False</property>
3188+ <property name="padding">5</property>
3189+ <property name="position">2</property>
3190+ </packing>
3191+ </child>
3192+ <child internal-child="action_area">
3193+ <widget class="GtkHButtonBox" id="dialog-action_area2">
3194+ <property name="visible">True</property>
3195+ <property name="layout_style">GTK_BUTTONBOX_END</property>
3196+ <child>
3197+ <widget class="GtkButton" id="cancelButton">
3198+ <property name="visible">True</property>
3199+ <property name="can_focus">True</property>
3200+ <property name="receives_default">True</property>
3201+ <property name="label" translatable="yes">gtk-cancel</property>
3202+ <property name="use_stock">True</property>
3203+ <property name="response_id">0</property>
3204+ <signal name="clicked" handler="on_cancel"/>
3205+ </widget>
3206+ </child>
3207+ <child>
3208+ <widget class="GtkButton" id="okButton">
3209+ <property name="visible">True</property>
3210+ <property name="can_focus">True</property>
3211+ <property name="can_default">True</property>
3212+ <property name="has_default">True</property>
3213+ <property name="receives_default">True</property>
3214+ <property name="label" translatable="yes">gtk-ok</property>
3215+ <property name="use_stock">True</property>
3216+ <property name="response_id">0</property>
3217+ <signal name="clicked" handler="on_ok"/>
3218+ </widget>
3219+ <packing>
3220+ <property name="position">1</property>
3221+ </packing>
3222+ </child>
3223+ </widget>
3224+ <packing>
3225+ <property name="expand">False</property>
3226+ <property name="pack_type">GTK_PACK_END</property>
3227+ </packing>
3228+ </child>
3229+ </widget>
3230+ </child>
3231+ </widget>
3232+</glade-interface>
3233
3234=== modified file 'setup.py'
3235--- setup.py 2010-01-08 08:52:58 +0000
3236+++ setup.py 2010-03-26 15:01:22 +0000
3237@@ -20,7 +20,7 @@
3238
3239 setup(
3240 name="autokey",
3241- version="0.61.2",
3242+ version="0.61.5",
3243 author="Chris Dekter",
3244 author_email="cdekter@gmail.com",
3245 url="http://autokey.googlecode.com/",
3246@@ -33,10 +33,12 @@
3247 #py_modules=["autokey", "configurationmanager", "expansionservice", "interface",
3248 # "iomediator", "phrase", "phrasemenu", "ui"],
3249 package_dir={"autokey": "src/lib"},
3250- packages=["autokey", "autokey.ui"],
3251- package_data={"autokey.ui" : ["data/gui.xml", "data/api.txt"]},
3252- data_files=[("/usr/share/pixmaps", ["config/akicon.png"]),
3253- ("/usr/share/applications", ["config/autokey.desktop"])],
3254- scripts=['autokey']
3255+ packages=["autokey", "autokey.gtkui", "autokey.qtui"],
3256+ package_data={"autokey.qtui" : ["data/*"],
3257+ "autokey.gtkui" : ["data/*"]},
3258+ data_files=[("/usr/share/pixmaps", ["config/akicon.png", "config/akicon-status.png"]),
3259+ ("/usr/share/applications", ["config/autokey-qt.desktop", "config/autokey-gtk.desktop"]),
3260+ ('share/man/man1/', ['doc/man/autokey-qt.1', 'doc/man/autokey-gtk.1'])],
3261+ scripts=['autokey-qt', 'autokey-gtk']
3262 #packages=["plugin"]
3263 )
3264
3265=== removed file 'src/lib/autokey.py'
3266--- src/lib/autokey.py 2010-01-08 08:52:58 +0000
3267+++ src/lib/autokey.py 1970-01-01 00:00:00 +0000
3268@@ -1,280 +0,0 @@
3269-#!/usr/bin/env python
3270-# -*- coding: utf-8 -*-
3271-
3272-# Copyright (C) 2008 Chris Dekter
3273-
3274-# This program is free software; you can redistribute it and/or modify
3275-# it under the terms of the GNU General Public License as published by
3276-# the Free Software Foundation; either version 2 of the License, or
3277-# (at your option) any later version.
3278-#
3279-# This program is distributed in the hope that it will be useful, but
3280-# WITHOUT ANY WARRANTY; without even the implied warranty of
3281-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3282-# General Public License for more details.
3283-#
3284-# You should have received a copy of the GNU General Public License
3285-# along with this program; if not, write to the Free Software
3286-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3287-
3288-
3289-import sys, traceback, os.path, signal, logging, logging.handlers, subprocess, Queue
3290-from PyKDE4.kdecore import KCmdLineArgs, KCmdLineOptions, KAboutData, ki18n, i18n
3291-from PyKDE4.kdeui import KMessageBox, KApplication
3292-from PyQt4.QtCore import SIGNAL, Qt, QObject, QEvent
3293-from PyQt4.QtGui import QCursor
3294-
3295-import service, ui.notifier, ui.popupmenu
3296-from configmanager import *
3297-
3298-CONFIG_DIR = os.path.expanduser("~/.config/autokey")
3299-LOCK_FILE = CONFIG_DIR + "/autokey.pid"
3300-LOG_FILE = CONFIG_DIR + "/autokey.log"
3301-MAX_LOG_SIZE = 5 * 1024 * 1024 # 5 megabytes
3302-MAX_LOG_COUNT = 3
3303-LOG_FORMAT = "%(levelname)s - %(name)s - %(message)s"
3304-
3305-APP_NAME = "AutoKey"
3306-CATALOG = ""
3307-PROGRAM_NAME = ki18n("AutoKey")
3308-VERSION = "0.61.2"
3309-DESCRIPTION = ki18n("Desktop automation utility")
3310-LICENSE = KAboutData.License_GPL_V3
3311-COPYRIGHT = ki18n("(c) 2009 Chris Dekter")
3312-TEXT = ki18n("")
3313-HOMEPAGE = "http://autokey.sourceforge.net/"
3314-BUG_EMAIL = "cdekter@gmail.com"
3315-
3316-
3317-
3318-class Application:
3319- """
3320- Main application class; starting and stopping of the application is controlled
3321- from here, together with some interactions from the tray icon.
3322- """
3323-
3324- def __init__(self):
3325-
3326- aboutData = KAboutData(APP_NAME, CATALOG, PROGRAM_NAME, VERSION, DESCRIPTION,
3327- LICENSE, COPYRIGHT, TEXT, HOMEPAGE, BUG_EMAIL)
3328-
3329- aboutData.addAuthor(ki18n("Chris Dekter"), ki18n("Developer"), "cdekter@gmail.com", "")
3330- aboutData.addAuthor(ki18n("Sam Peterson"), ki18n("Original developer"), "peabodyenator@gmail.com", "")
3331- aboutData.setProgramIconName(ui.notifier.ICON_FILE)
3332-
3333- KCmdLineArgs.init(sys.argv, aboutData)
3334- options = KCmdLineOptions()
3335- options.add("l").add("verbose", ki18n("Enable verbose logging"))
3336- options.add("c").add("configure", ki18n("Show the configuration window on startup"))
3337- KCmdLineArgs.addCmdLineOptions(options)
3338- args = KCmdLineArgs.parsedArgs()
3339-
3340-
3341- self.app = KApplication()
3342-
3343- try:
3344- # Create configuration directory
3345- if not os.path.exists(CONFIG_DIR):
3346- os.makedirs(CONFIG_DIR)
3347- # Initialise logger
3348- rootLogger = logging.getLogger()
3349-
3350- if args.isSet("verbose"):
3351- rootLogger.setLevel(logging.DEBUG)
3352- handler = logging.StreamHandler(sys.stdout)
3353- else:
3354- rootLogger.setLevel(logging.INFO)
3355- handler = logging.handlers.RotatingFileHandler(LOG_FILE,
3356- maxBytes=MAX_LOG_SIZE, backupCount=MAX_LOG_COUNT)
3357-
3358- handler.setFormatter(logging.Formatter(LOG_FORMAT))
3359- rootLogger.addHandler(handler)
3360-
3361-
3362- if self.__verifyNotRunning():
3363- self.__createLockFile()
3364-
3365- self.initialise(args.isSet("configure"))
3366-
3367- except Exception, e:
3368- self.show_error_dialog(i18n("Fatal error starting AutoKey.\n") + str(e))
3369- logging.exception("Fatal error starting AutoKey: " + str(e))
3370- sys.exit(1)
3371-
3372-
3373- def __createLockFile(self):
3374- f = open(LOCK_FILE, 'w')
3375- f.write(str(os.getpid()))
3376- f.close()
3377-
3378- def __verifyNotRunning(self):
3379- if os.path.exists(LOCK_FILE):
3380- f = open(LOCK_FILE, 'r')
3381- pid = f.read()
3382- f.close()
3383-
3384- # Check that the found PID is running and is autokey
3385- p = subprocess.Popen(["ps", "-p", pid, "-o", "command"], stdout=subprocess.PIPE)
3386- p.wait()
3387- output = p.stdout.readlines()
3388- if len(output) > 1:
3389- # process exists
3390- if "autokey" in output[1]:
3391- logging.error("AutoKey is already running - exiting")
3392- self.show_error_dialog(i18n("AutoKey is already running as pid: ") + pid)
3393- sys.exit(1)
3394-
3395- return True
3396-
3397- def main(self):
3398- self.app.exec_()
3399-
3400- def initialise(self, configure):
3401- logging.info("Initialising application")
3402- self.configManager = get_config_manager(self)
3403- self.service = service.Service(self)
3404- self.serviceDisabled = False
3405-
3406- # Initialise user code dir
3407- if self.configManager.userCodeDir is not None:
3408- sys.path.append(self.configManager.userCodeDir)
3409-
3410- try:
3411- self.service.start()
3412- except Exception, e:
3413- logging.exception("Error starting interface: " + str(e))
3414- self.serviceDisabled = True
3415- self.show_error_dialog(i18n("Error starting interface. Keyboard monitoring will be disabled.\n" +
3416- "Check your system/configuration."), str(e))
3417-
3418- self.notifier = ui.notifier.Notifier(self)
3419- self.configWindow = None
3420-
3421- if ConfigManager.SETTINGS[IS_FIRST_RUN] or configure:
3422- ConfigManager.SETTINGS[IS_FIRST_RUN] = False
3423- self.show_configure()
3424-
3425- self.handler = CallbackEventHandler()
3426-
3427- def init_global_hotkeys(self, configManager):
3428- logging.info("Initialise global hotkeys")
3429- configManager.toggleServiceHotkey.set_closure(self.toggle_service)
3430- configManager.configHotkey.set_closure(self.show_configure_async)
3431-
3432- def config_altered(self):
3433- self.configManager.config_altered()
3434- self.notifier.build_menu()
3435-
3436- def unpause_service(self):
3437- """
3438- Unpause the expansion service (start responding to keyboard and mouse events).
3439- """
3440- self.service.unpause()
3441- self.notifier.update_tool_tip()
3442-
3443- def pause_service(self):
3444- """
3445- Pause the expansion service (stop responding to keyboard and mouse events).
3446- """
3447- self.service.pause()
3448- self.notifier.update_tool_tip()
3449-
3450- def toggle_service(self):
3451- """
3452- Convenience method for toggling the expansion service on or off.
3453- """
3454- if self.service.is_running():
3455- self.pause_service()
3456- else:
3457- self.unpause_service()
3458-
3459- def shutdown(self):
3460- """
3461- Shut down the entire application.
3462- """
3463- logging.info("Shutting down")
3464- self.app.closeAllWindows()
3465- self.service.shutdown()
3466- self.app.quit()
3467- os.remove(LOCK_FILE)
3468-
3469- def show_notify(self, message, isError=False, details=''):
3470- """
3471- Show a notification popup.
3472-
3473- @param message: Message to show in the popup
3474- @param isError: Whether the message is an error (shows with an error icon)
3475- @param details: Error details, which the user can view in a dialog by clicking
3476- the "View Details" button.
3477- """
3478- self.notifier.show_notify(message, isError, details)
3479-
3480- def show_configure(self):
3481- """
3482- Show the configuration window, or deiconify (un-minimise) it if it's already open.
3483- """
3484- logging.info("Displaying configuration window")
3485- try:
3486- self.configWindow.showNormal()
3487- self.configWindow.activateWindow()
3488- except:
3489- self.configWindow = ui.configwindow.ConfigWindow(self)
3490- self.configWindow.show()
3491-
3492- def show_configure_async(self):
3493- self.exec_in_main(self.show_configure)
3494-
3495- def show_error_dialog(self, message, details=None):
3496- """
3497- Convenience method for showing an error dialog.
3498- """
3499- if details is None:
3500- KMessageBox.error(None, message)
3501- else:
3502- KMessageBox.detailedError(None, message, details)
3503-
3504- def show_script_error(self):
3505- """
3506- Show the last script error (if any)
3507- """
3508- if self.service.scriptRunner.error != '':
3509- KMessageBox.information(None, self.service.scriptRunner.error, i18n("View Script Error Details"))
3510- self.service.scriptRunner.error = ''
3511- else:
3512- KMessageBox.information(None, i18n("No error information available"), i18n("View Script Error Details"))
3513-
3514- def show_popup_menu(self, folders=[], items=[], onDesktop=True, title=None):
3515- self.exec_in_main(self.__createMenu, folders, items, onDesktop, title)
3516-
3517- def hide_menu(self):
3518- self.exec_in_main(self.menu.hide)
3519-
3520- def __createMenu(self, folders, items, onDesktop, title):
3521- self.menu = ui.popupmenu.PopupMenu(self.service, folders, items, onDesktop, title)
3522- self.menu.popup(QCursor.pos())
3523-
3524- def exec_in_main(self, callback, *args):
3525- self.handler.postEventWithCallback(callback, *args)
3526-
3527-
3528-class CallbackEventHandler(QObject):
3529-
3530- def __init__(self):
3531- QObject.__init__(self)
3532- self.queue = Queue.Queue()
3533-
3534- def customEvent(self, event):
3535- while True:
3536- try:
3537- callback, args = self.queue.get_nowait()
3538- except Queue.Empty:
3539- break
3540- try:
3541- callback(*args)
3542- except Exception:
3543- logging.warn("callback event failed: %r %r", callback, args, exc_info=True)
3544-
3545- def postEventWithCallback(self, callback, *args):
3546- self.queue.put((callback, args))
3547- app = KApplication.kApplication()
3548- app.postEvent(self, QEvent(QEvent.User))
3549
3550=== added file 'src/lib/common.py'
3551--- src/lib/common.py 1970-01-01 00:00:00 +0000
3552+++ src/lib/common.py 2010-03-26 15:01:22 +0000
3553@@ -0,0 +1,48 @@
3554+#!/usr/bin/env python
3555+# -*- coding: utf-8 -*-
3556+
3557+# Copyright (C) 2008 Chris Dekter
3558+
3559+# This program is free software; you can redistribute it and/or modify
3560+# it under the terms of the GNU General Public License as published by
3561+# the Free Software Foundation; either version 2 of the License, or
3562+# (at your option) any later version.
3563+#
3564+# This program is distributed in the hope that it will be useful, but
3565+# WITHOUT ANY WARRANTY; without even the implied warranty of
3566+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3567+# General Public License for more details.
3568+#
3569+# You should have received a copy of the GNU General Public License
3570+# along with this program; if not, write to the Free Software
3571+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3572+
3573+import os.path
3574+CONFIG_DIR = os.path.expanduser("~/.config/autokey")
3575+LOCK_FILE = CONFIG_DIR + "/autokey.pid"
3576+LOG_FILE = CONFIG_DIR + "/autokey.log"
3577+MAX_LOG_SIZE = 5 * 1024 * 1024 # 5 megabytes
3578+MAX_LOG_COUNT = 3
3579+LOG_FORMAT = "%(levelname)s - %(name)s - %(message)s"
3580+
3581+APP_NAME = "AutoKey"
3582+CATALOG = ""
3583+VERSION = "0.61.5"
3584+HOMEPAGE = "http://autokey.sourceforge.net/"
3585+BUG_EMAIL = "cdekter@gmail.com"
3586+
3587+FAQ_URL = "http://code.google.com/p/autokey/wiki/FAQ"
3588+HELP_URL = "http://code.google.com/p/autokey/w/list"
3589+DONATE_URL = "https://sourceforge.net/donate/index.php?group_id=216191"
3590+
3591+CONFIG_WINDOW_TITLE = "Configuration"
3592+
3593+ICON_FILE = "/usr/share/pixmaps/akicon.png"
3594+
3595+USING_QT = True
3596+
3597+# Misc
3598+DOMAIN_SOCKET_PATH = "/var/run/autokey-daemon"
3599+PACKET_SIZE = 32
3600+
3601+
3602
3603=== modified file 'src/lib/configmanager.py'
3604--- src/lib/configmanager.py 2010-01-08 08:52:58 +0000
3605+++ src/lib/configmanager.py 2010-03-26 15:01:22 +0000
3606@@ -19,7 +19,7 @@
3607 import os, os.path, shutil, logging, pickle
3608 import iomediator, interface
3609
3610-APP_VERSION = "0.61.2"
3611+APP_VERSION = "0.61.5"
3612
3613 _logger = logging.getLogger("config-manager")
3614
3615
3616=== modified file 'src/lib/daemon.py'
3617--- src/lib/daemon.py 2009-12-16 08:46:43 +0000
3618+++ src/lib/daemon.py 2010-03-26 15:01:22 +0000
3619@@ -62,18 +62,27 @@
3620
3621 def delpid(self):
3622 os.remove(self.pidfile)
3623-
3624+ def checkpid(self):
3625+ """Check for a pidfile to see if the daemon already runs
3626+
3627+ @references self.pidfile
3628+ @returns pid, an int representing the running daemon or None"""
3629+ try:
3630+ pf = file(self.pidfile,'r')
3631+ pid = int(pf.read().strip())
3632+ pf.close()
3633+ except IOError:
3634+ pid = None
3635+ except ValueError:
3636+ # the pidfile doesn't match our syntax, ignore it
3637+ pid = None
3638+ return pid
3639+
3640 def start(self):
3641 """
3642 Start the daemon
3643 """
3644- # Check for a pidfile to see if the daemon already runs
3645- try:
3646- pf = file(self.pidfile,'r')
3647- pid = int(pf.read().strip())
3648- pf.close()
3649- except IOError:
3650- pid = None
3651+ pid = self.checkpid()
3652
3653 if pid:
3654 message = "pidfile %s already exist. Daemon already running?\n"
3655@@ -89,13 +98,8 @@
3656 Stop the daemon
3657 """
3658 # Get the pid from the pidfile
3659- try:
3660- pf = file(self.pidfile,'r')
3661- pid = int(pf.read().strip())
3662- pf.close()
3663- except IOError:
3664- pid = None
3665-
3666+ pid = self.checkpid()
3667+
3668 if not pid:
3669 message = "pidfile %s does not exist. Daemon not running?\n"
3670 sys.stderr.write(message % self.pidfile)
3671
3672=== added file 'src/lib/gtkapp.py'
3673--- src/lib/gtkapp.py 1970-01-01 00:00:00 +0000
3674+++ src/lib/gtkapp.py 2010-03-26 15:01:22 +0000
3675@@ -0,0 +1,262 @@
3676+#!/usr/bin/env python
3677+# -*- coding: utf-8 -*-
3678+
3679+# Copyright (C) 2008 Chris Dekter
3680+
3681+# This program is free software; you can redistribute it and/or modify
3682+# it under the terms of the GNU General Public License as published by
3683+# the Free Software Foundation; either version 2 of the License, or
3684+# (at your option) any later version.
3685+#
3686+# This program is distributed in the hope that it will be useful, but
3687+# WITHOUT ANY WARRANTY; without even the implied warranty of
3688+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3689+# General Public License for more details.
3690+#
3691+# You should have received a copy of the GNU General Public License
3692+# along with this program; if not, write to the Free Software
3693+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3694+
3695+import common
3696+common.USING_QT = False
3697+
3698+import sys, traceback, os.path, signal, logging, logging.handlers, subprocess, Queue, optparse
3699+import gettext, gtk
3700+gettext.install("autokey")
3701+
3702+import service
3703+from gtkui.notifier import Notifier
3704+from gtkui.popupmenu import PopupMenu
3705+from gtkui.configwindow import ConfigWindow
3706+from gtkui.abbrselector import AbbrSelectorDialog
3707+from configmanager import *
3708+from common import *
3709+
3710+PROGRAM_NAME = _("AutoKey")
3711+DESCRIPTION = _("Desktop automation utility")
3712+#LICENSE = KAboutData.License_GPL_V3
3713+COPYRIGHT = _("(c) 2009 Chris Dekter")
3714+#TEXT = _("")
3715+
3716+
3717+class Application:
3718+ """
3719+ Main application class; starting and stopping of the application is controlled
3720+ from here, together with some interactions from the tray icon.
3721+ """
3722+
3723+ def __init__(self):
3724+ gtk.gdk.threads_init()
3725+
3726+ p = optparse.OptionParser()
3727+ p.add_option("-l", "--verbose", help="Enable verbose logging", action="store_true", default=False)
3728+ p.add_option("-c", "--configure", help="Show the configuration window on startup", action="store_true", default=False)
3729+ options, args = p.parse_args()
3730+
3731+ try:
3732+ # Create configuration directory
3733+ if not os.path.exists(CONFIG_DIR):
3734+ os.makedirs(CONFIG_DIR)
3735+
3736+ # Initialise logger
3737+ rootLogger = logging.getLogger()
3738+
3739+ if options.verbose:
3740+ rootLogger.setLevel(logging.DEBUG)
3741+ handler = logging.StreamHandler(sys.stdout)
3742+ else:
3743+ rootLogger.setLevel(logging.INFO)
3744+ handler = logging.handlers.RotatingFileHandler(LOG_FILE,
3745+ maxBytes=MAX_LOG_SIZE, backupCount=MAX_LOG_COUNT)
3746+
3747+ handler.setFormatter(logging.Formatter(LOG_FORMAT))
3748+ rootLogger.addHandler(handler)
3749+
3750+
3751+ if self.__verifyNotRunning():
3752+ self.__createLockFile()
3753+
3754+ self.initialise(options.configure)
3755+
3756+ except Exception, e:
3757+ self.show_error_dialog(_("Fatal error starting AutoKey.\n") + str(e))
3758+ logging.exception("Fatal error starting AutoKey: " + str(e))
3759+ sys.exit(1)
3760+
3761+
3762+ def __createLockFile(self):
3763+ f = open(LOCK_FILE, 'w')
3764+ f.write(str(os.getpid()))
3765+ f.close()
3766+
3767+ def __verifyNotRunning(self):
3768+ if os.path.exists(LOCK_FILE):
3769+ f = open(LOCK_FILE, 'r')
3770+ pid = f.read()
3771+ f.close()
3772+
3773+ # Check that the found PID is running and is autokey
3774+ p = subprocess.Popen(["ps", "-p", pid, "-o", "command"], stdout=subprocess.PIPE)
3775+ p.wait()
3776+ output = p.stdout.readlines()
3777+ if len(output) > 1:
3778+ # process exists
3779+ if "autokey" in output[1]:
3780+ logging.error("AutoKey is already running - exiting")
3781+ self.show_error_dialog(_("AutoKey is already running as pid: ") + pid)
3782+ sys.exit(1)
3783+
3784+ return True
3785+
3786+ def main(self):
3787+ gtk.main()
3788+
3789+ def initialise(self, configure):
3790+ logging.info("Initialising application")
3791+ self.configManager = get_config_manager(self)
3792+ self.service = service.Service(self)
3793+ self.serviceDisabled = False
3794+
3795+ # Initialise user code dir
3796+ if self.configManager.userCodeDir is not None:
3797+ sys.path.append(self.configManager.userCodeDir)
3798+
3799+ try:
3800+ self.service.start()
3801+ except Exception, e:
3802+ logging.exception("Error starting interface: " + str(e))
3803+ self.serviceDisabled = True
3804+ self.show_error_dialog(_("Error starting interface. Keyboard monitoring will be disabled.\n" +
3805+ "Check your system/configuration."), str(e))
3806+
3807+ self.notifier = Notifier(self)
3808+ self.configWindow = None
3809+ self.abbrPopup = None
3810+
3811+ if ConfigManager.SETTINGS[IS_FIRST_RUN] or configure:
3812+ ConfigManager.SETTINGS[IS_FIRST_RUN] = False
3813+ self.show_configure()
3814+
3815+ def init_global_hotkeys(self, configManager):
3816+ logging.info("Initialise global hotkeys")
3817+ configManager.toggleServiceHotkey.set_closure(self.toggle_service)
3818+ configManager.configHotkey.set_closure(self.show_configure_async)
3819+ configManager.showPopupHotkey.set_closure(self.show_abbr_async)
3820+
3821+ def config_altered(self):
3822+ self.configManager.config_altered()
3823+ #self.notifier.build_menu()
3824+
3825+ def unpause_service(self):
3826+ """
3827+ Unpause the expansion service (start responding to keyboard and mouse events).
3828+ """
3829+ self.service.unpause()
3830+ self.notifier.update_tool_tip()
3831+
3832+ def pause_service(self):
3833+ """
3834+ Pause the expansion service (stop responding to keyboard and mouse events).
3835+ """
3836+ self.service.pause()
3837+ self.notifier.update_tool_tip()
3838+
3839+ def toggle_service(self):
3840+ """
3841+ Convenience method for toggling the expansion service on or off.
3842+ """
3843+ if self.service.is_running():
3844+ self.pause_service()
3845+ else:
3846+ self.unpause_service()
3847+
3848+ def shutdown(self):
3849+ """
3850+ Shut down the entire application.
3851+ """
3852+ if self.configWindow is not None:
3853+ if self.configWindow.promptToSave():
3854+ return
3855+
3856+ logging.info("Shutting down")
3857+ self.service.shutdown()
3858+ gtk.main_quit()
3859+ os.remove(LOCK_FILE)
3860+
3861+ def show_notify(self, message, isError=False, details=''):
3862+ """
3863+ Show a notification popup.
3864+
3865+ @param message: Message to show in the popup
3866+ @param isError: Whether the message is an error (shows with an error icon)
3867+ @param details: Error details, which the user can view in a dialog by clicking
3868+ the "View Details" button.
3869+ """
3870+ self.notifier.show_notify(message, isError, details)
3871+
3872+ def show_configure(self):
3873+ """
3874+ Show the configuration window, or deiconify (un-minimise) it if it's already open.
3875+ """
3876+ logging.info("Displaying configuration window")
3877+ if self.configWindow is None:
3878+ self.configWindow = ConfigWindow(self)
3879+ self.configWindow.show()
3880+ else:
3881+ self.configWindow.deiconify()
3882+
3883+ def show_configure_async(self):
3884+ gtk.gdk.threads_enter()
3885+ self.show_configure()
3886+ gtk.gdk.threads_leave()
3887+
3888+ def show_abbr_selector(self):
3889+ """
3890+ Show the abbreviation autocompletion popup.
3891+ """
3892+ if self.abbrPopup is None:
3893+ logging.info("Displaying abbreviation popup")
3894+ self.abbrPopup = AbbrSelectorDialog(self)
3895+ self.abbrPopup.present()
3896+
3897+ def show_abbr_async(self):
3898+ gtk.gdk.threads_enter()
3899+ self.show_abbr_selector()
3900+ gtk.gdk.threads_leave()
3901+
3902+ def main(self):
3903+ logging.info("Entering main()")
3904+ gtk.main()
3905+
3906+ def show_error_dialog(self, message, details=None):
3907+ """
3908+ Convenience method for showing an error dialog.
3909+ """
3910+ dlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR, buttons=gtk.BUTTONS_OK,
3911+ message_format=message)
3912+ if details is not None:
3913+ dlg.format_secondary_text(details)
3914+ dlg.run()
3915+ dlg.destroy()
3916+
3917+ def show_script_error(self):
3918+ """
3919+ Show the last script error (if any)
3920+ """
3921+ if self.service.scriptRunner.error != '':
3922+ dlg = gtk.MessageDialog(type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK,
3923+ message_format=self.service.scriptRunner.error)
3924+ self.service.scriptRunner.error = ''
3925+ else:
3926+ dlg = gtk.MessageDialog(type=gtk.MESSAGE_INFO, buttons=gtk.BUTTONS_OK,
3927+ message_format=_("No error information available"))
3928+
3929+ dlg.run()
3930+ dlg.destroy()
3931+
3932+ def show_popup_menu(self, folders=[], items=[], onDesktop=True, title=None):
3933+ self.menu = PopupMenu(self.service, folders, items, onDesktop, title)
3934+ self.menu.show_on_desktop()
3935+
3936+ def hide_menu(self):
3937+ self.menu.remove_from_desktop()
3938
3939=== added directory 'src/lib/gtkui'
3940=== added file 'src/lib/gtkui/__init__.py'
3941=== added file 'src/lib/gtkui/abbrselector.py'
3942--- src/lib/gtkui/abbrselector.py 1970-01-01 00:00:00 +0000
3943+++ src/lib/gtkui/abbrselector.py 2010-03-26 15:01:22 +0000
3944@@ -0,0 +1,93 @@
3945+# -*- coding: utf-8 -*-
3946+
3947+# Copyright (C) 2008 Chris Dekter
3948+
3949+# This program is free software; you can redistribute it and/or modify
3950+# it under the terms of the GNU General Public License as published by
3951+# the Free Software Foundation; either version 2 of the License, or
3952+# (at your option) any later version.
3953+#
3954+# This program is distributed in the hope that it will be useful, but
3955+# WITHOUT ANY WARRANTY; without even the implied warranty of
3956+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3957+# General Public License for more details.
3958+#
3959+# You should have received a copy of the GNU General Public License
3960+# along with this program; if not, write to the Free Software
3961+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
3962+
3963+import gtk
3964+
3965+from autokey.configmanager import *
3966+import configwindow
3967+
3968+
3969+class AbbrSelectorDialog:
3970+
3971+ def __init__(self, app):
3972+ builder = configwindow.get_ui("abbrselector.xml")
3973+ self.ui = builder.get_object("abbrselector")
3974+ builder.connect_signals(self)
3975+ self.entry = builder.get_object("entry")
3976+
3977+ self.service = app.service
3978+ self.app = app
3979+ self.abbreviations = self.service.configManager.abbreviations
3980+
3981+ self.completion = gtk.EntryCompletion()
3982+ self.entry.set_completion(self.completion)
3983+ model = AbbreviationModel(self.abbreviations)
3984+ self.completion.set_model(model)
3985+ self.completion.set_text_column(0)
3986+
3987+ descriptionCell = gtk.CellRendererText()
3988+ self.completion.pack_start(descriptionCell)
3989+ self.completion.add_attribute(descriptionCell, "text", 1)
3990+ self.completion.set_inline_completion(True)
3991+ self.completion.set_inline_selection(True)
3992+ self.completion.connect("match-selected", self.on_match_selected)
3993+
3994+ self.set_keep_above(True)
3995+
3996+
3997+ def on_match_selected(self, completion, model, iter, data=None):
3998+ theItem = model.get_value(iter, AbbreviationModel.OBJECT_COLUMN)
3999+ self.service.item_selected(theItem)
4000+ self.hide()
4001+
4002+ def on_entry_activated(self, widget, data=None):
4003+ entered = self.entry.get_text()
4004+ for thePhrase in self.abbreviations:
4005+ if theItem.abbreviation == entered:
4006+ self.service.phrase_selected(None, theItem)
4007+ self.hide()
4008+
4009+ def on_close(self, widget, data=None):
4010+ self.destroy()
4011+ self.app.abbrPopup = None
4012+
4013+ def __getattr__(self, attr):
4014+ # Magic fudge to allow us to pretend to be the ui class we encapsulate
4015+ return getattr(self.ui, attr)
4016+
4017+
4018+class AbbreviationModel(gtk.ListStore):
4019+
4020+ OBJECT_COLUMN = 2
4021+
4022+ def __init__(self, abbreviations):
4023+ gtk.ListStore.__init__(self, str, str, object)
4024+
4025+ for item in abbreviations:
4026+ self.append((item.abbreviation, item.description, item))
4027+
4028+ def match(self, completion, keyString, iter, data=None):
4029+ abbreviation = self.get_value(iter, 0)
4030+ description = self.get_value(iter, 1)
4031+ if abbreviation.startswith(keyString):
4032+ return True
4033+ elif len(keyString) > 1:
4034+ if keyString in description:
4035+ return True
4036+
4037+ return False
4038
4039=== added file 'src/lib/gtkui/configwindow.py'
4040--- src/lib/gtkui/configwindow.py 1970-01-01 00:00:00 +0000
4041+++ src/lib/gtkui/configwindow.py 2010-03-26 15:01:22 +0000
4042@@ -0,0 +1,1120 @@
4043+# -*- coding: utf-8 -*-
4044+
4045+# Copyright (C) 2009 Chris Dekter
4046+
4047+# This program is free software; you can redistribute it and/or modify
4048+# it under the terms of the GNU General Public License as published by
4049+# the Free Software Foundation; either version 2 of the License, or
4050+# (at your option) any later version.
4051+#
4052+# This program is distributed in the hope that it will be useful, but
4053+# WITHOUT ANY WARRANTY; without even the implied warranty of
4054+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4055+# General Public License for more details.
4056+#
4057+# You should have received a copy of the GNU General Public License
4058+# along with this program; if not, write to the Free Software
4059+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
4060+
4061+import logging, sys, os, webbrowser, re
4062+import gtk, gtk.glade, gtksourceview2
4063+
4064+from dialogs import *
4065+from settingsdialog import SettingsDialog
4066+from autokey.configmanager import *
4067+from autokey.iomediator import Recorder
4068+from autokey import model, common
4069+
4070+CONFIG_WINDOW_TITLE = _(common.CONFIG_WINDOW_TITLE + " - AutoKey")
4071+
4072+
4073+WEBSITE = "http://code.google.com/p/autokey"
4074+
4075+UI_DESCRIPTION_FILE = os.path.join(os.path.dirname(__file__), "data/menus.xml")
4076+
4077+def get_ui(fileName):
4078+ builder = gtk.Builder()
4079+ uiFile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data/" + fileName)
4080+ builder.add_from_file(uiFile)
4081+ return builder
4082+
4083+class SettingsWidget:
4084+
4085+ KEY_MAP = HotkeySettingsDialog.KEY_MAP
4086+ REVERSE_KEY_MAP = HotkeySettingsDialog.REVERSE_KEY_MAP
4087+
4088+ def __init__(self, parentWindow):
4089+ self.parentWindow = parentWindow
4090+ builder = get_ui("settingswidget.xml")
4091+ self.ui = builder.get_object("settingswidget")
4092+ builder.connect_signals(self)
4093+
4094+ self.abbrDialog = AbbrSettingsDialog(parentWindow.ui, parentWindow.app.configManager, self.on_abbr_response)
4095+ self.hotkeyDialog = HotkeySettingsDialog(parentWindow.ui, parentWindow.app.configManager, self.on_hotkey_response)
4096+ self.filterDialog = WindowFilterSettingsDialog(parentWindow.ui)
4097+
4098+ self.abbrLabel = builder.get_object("abbrLabel")
4099+ self.clearAbbrButton = builder.get_object("clearAbbrButton")
4100+ self.hotkeyLabel = builder.get_object("hotkeyLabel")
4101+ self.clearHotkeyButton = builder.get_object("clearHotkeyButton")
4102+ self.windowFilterLabel = builder.get_object("windowFilterLabel")
4103+ self.clearFilterButton = builder.get_object("clearFilterButton")
4104+
4105+ def load(self, item):
4106+ self.currentItem = item
4107+
4108+ self.abbrDialog.load(self.currentItem)
4109+ if model.TriggerMode.ABBREVIATION in item.modes:
4110+ self.abbrLabel.set_text(item.abbreviation)
4111+ self.clearAbbrButton.set_sensitive(True)
4112+ self.abbrEnabled = True
4113+ else:
4114+ self.abbrLabel.set_text(_("(None configured)"))
4115+ self.clearAbbrButton.set_sensitive(False)
4116+ self.abbrEnabled = False
4117+
4118+ self.hotkeyDialog.load(self.currentItem)
4119+ if model.TriggerMode.HOTKEY in item.modes:
4120+ key = item.hotKey
4121+ self.hotkeyLabel.set_text(self.build_hotkey_string(key, item.modifiers))
4122+ self.clearHotkeyButton.set_sensitive(True)
4123+ self.hotkeyEnabled = True
4124+ else:
4125+ self.hotkeyLabel.set_text(_("(None configured)"))
4126+ self.clearHotkeyButton.set_sensitive(False)
4127+ self.hotkeyEnabled = False
4128+
4129+ self.filterDialog.load(self.currentItem)
4130+ if item.uses_default_filter():
4131+ self.windowFilterLabel.set_text(_("(None configured)"))
4132+ self.clearFilterButton.set_sensitive(False)
4133+ self.filterEnabled = False
4134+ else:
4135+ self.windowFilterLabel.set_text(item.get_filter_regex())
4136+ self.clearFilterButton.set_sensitive(True)
4137+ self.filterEnabled = True
4138+
4139+ def save(self):
4140+ self.currentItem.set_modes([])
4141+ if self.abbrEnabled:
4142+ self.abbrDialog.save(self.currentItem)
4143+ if self.hotkeyEnabled:
4144+ self.hotkeyDialog.save(self.currentItem)
4145+ if self.filterEnabled:
4146+ self.filterDialog.save(self.currentItem)
4147+ else:
4148+ self.currentItem.set_window_titles(None)
4149+
4150+ def set_dirty(self):
4151+ self.parentWindow.set_dirty(True)
4152+
4153+ # ---- Signal handlers
4154+
4155+ def on_setAbbrButton_clicked(self, widget, data=None):
4156+ self.abbrDialog.run()
4157+
4158+ def on_abbr_response(self, res):
4159+ if res == gtk.RESPONSE_OK:
4160+ self.set_dirty()
4161+ self.abbrEnabled = True
4162+ self.abbrLabel.set_text(self.abbrDialog.get_abbr())
4163+ self.clearAbbrButton.set_sensitive(True)
4164+
4165+ def on_clearAbbrButton_clicked(self, widget, data=None):
4166+ self.set_dirty()
4167+ self.abbrEnabled = False
4168+ self.clearAbbrButton.set_sensitive(False)
4169+ self.abbrLabel.set_text(_("(None configured)"))
4170+ self.abbrDialog.reset()
4171+
4172+ def on_setHotkeyButton_clicked(self, widget, data=None):
4173+ self.hotkeyDialog.run()
4174+
4175+ def on_hotkey_response(self, res):
4176+ if res == gtk.RESPONSE_OK:
4177+ self.set_dirty()
4178+ self.hotkeyEnabled = True
4179+ key = self.hotkeyDialog.key
4180+ modifiers = self.hotkeyDialog.build_modifiers()
4181+ self.hotkeyLabel.set_text(self.build_hotkey_string(key, modifiers))
4182+ self.clearHotkeyButton.set_sensitive(True)
4183+
4184+ def on_clearHotkeyButton_clicked(self, widget, data=None):
4185+ self.set_dirty()
4186+ self.hotkeyEnabled = False
4187+ self.clearHotkeyButton.set_sensitive(False)
4188+ self.hotkeyLabel.set_text(_("(None configured)"))
4189+ self.hotkeyDialog.reset()
4190+
4191+ def on_setFilterButton_clicked(self, widget, data=None):
4192+ if self.filterDialog.run() == gtk.RESPONSE_OK:
4193+ self.set_dirty()
4194+ filterText = self.filterDialog.get_filter_text()
4195+ if filterText != "":
4196+ self.filterEnabled = True
4197+ self.clearFilterButton.set_sensitive(True)
4198+ self.windowFilterLabel.set_text(filterText)
4199+ else:
4200+ self.filterEnabled = False
4201+ self.clearFilterButton.set_sensitive(False)
4202+ self.windowFilterLabel.set_text(_("(None configured)"))
4203+
4204+ def on_clearFilterButton_clicked(self, widget, data=None):
4205+ self.set_dirty()
4206+ self.filterEnabled = False
4207+ self.clearFilterButton.set_sensitive(False)
4208+ self.windowFilterLabel.set_text(_("(None configured)"))
4209+ self.filterDialog.reset()
4210+
4211+ def build_hotkey_string(self, key, modifiers):
4212+ hotkey = ""
4213+
4214+ for modifier in modifiers:
4215+ hotkey += modifier
4216+ hotkey += "+"
4217+
4218+ if key in self.KEY_MAP:
4219+ keyText = self.KEY_MAP[key]
4220+ else:
4221+ keyText = key
4222+ hotkey += keyText
4223+
4224+ return hotkey
4225+
4226+ def __getattr__(self, attr):
4227+ # Magic fudge to allow us to pretend to be the ui class we encapsulate
4228+ return getattr(self.ui, attr)
4229+
4230+
4231+class FolderPage:
4232+
4233+ def __init__(self, parentWindow):
4234+ self.parentWindow = parentWindow
4235+ builder = get_ui("folderpage.xml")
4236+ self.ui = builder.get_object("folderpage")
4237+ builder.connect_signals(self)
4238+
4239+ self.showInTrayCheckbox = builder.get_object("showInTrayCheckbox")
4240+
4241+ vbox = builder.get_object("settingsVbox")
4242+ self.settingsWidget = SettingsWidget(parentWindow)
4243+ vbox.pack_start(self.settingsWidget.ui)
4244+
4245+ def load(self, theFolder):
4246+ self.currentFolder = theFolder
4247+ self.showInTrayCheckbox.set_active(theFolder.showInTrayMenu)
4248+ self.settingsWidget.load(theFolder)
4249+
4250+ def save(self):
4251+ self.currentFolder.showInTrayMenu = self.showInTrayCheckbox.get_active()
4252+ self.settingsWidget.save()
4253+
4254+ def set_item_title(self, newTitle):
4255+ self.currentFolder.title = newTitle.decode("utf-8")
4256+ #self.titleEntry.set_text(newTitle) # TODO testing remove me later
4257+
4258+ def reset(self):
4259+ self.load(self.currentFolder)
4260+
4261+ def validate(self):
4262+ return True
4263+
4264+ def on_modified(self, widget, data=None):
4265+ self.set_dirty()
4266+
4267+ def set_dirty(self):
4268+ self.parentWindow.set_dirty(True)
4269+
4270+
4271+class OldPhrasePage:
4272+
4273+ def __init__(self, parentWindow):
4274+ self.parentWindow = parentWindow
4275+ builder = get_ui("phrasepage.xml")
4276+ self.ui = builder.get_object("phrasepage")
4277+ builder.connect_signals(self)
4278+
4279+ self.descriptionEntry = builder.get_object("descriptionEntry")
4280+ self.phraseText = builder.get_object("phraseText")
4281+ self.promptCheckbox = builder.get_object("promptCheckbox")
4282+ self.showInTrayCheckbox = builder.get_object("showInTrayCheckbox")
4283+
4284+ vbox = builder.get_object("settingsVbox")
4285+ self.settingsWidget = SettingsWidget(parentWindow)
4286+ vbox.pack_start(self.settingsWidget.ui)
4287+
4288+ def load(self, thePhrase):
4289+ self.currentPhrase = thePhrase
4290+ self.descriptionEntry.set_text(thePhrase.description.encode("utf-8"))
4291+ buffer = gtk.TextBuffer()
4292+ buffer.set_text(thePhrase.phrase.encode("utf-8"))
4293+ buffer.connect("changed", self.on_modified)
4294+ self.phraseText.set_buffer(buffer)
4295+ self.promptCheckbox.set_active(thePhrase.prompt)
4296+ self.showInTrayCheckbox.set_active(thePhrase.showInTrayMenu)
4297+ self.settingsWidget.load(thePhrase)
4298+
4299+ def save(self):
4300+ self.currentPhrase.description = self.descriptionEntry.get_text().decode("utf-8")
4301+
4302+ buffer = self.phraseText.get_buffer()
4303+ self.currentPhrase.phrase = buffer.get_text(buffer.get_start_iter(),
4304+ buffer.get_end_iter()).decode("utf-8")
4305+
4306+ self.currentPhrase.prompt = self.promptCheckbox.get_active()
4307+ self.currentPhrase.showInTrayMenu = self.showInTrayCheckbox.get_active()
4308+
4309+ self.settingsWidget.save()
4310+
4311+ def reset(self):
4312+ self.load(self.currentPhrase)
4313+
4314+ def validate(self):
4315+ if not validate(not EMPTY_FIELD_REGEX.match(self.descriptionEntry.get_text()),
4316+ _("The phrase description can't be empty"), self.descriptionEntry, self.parentWindow.ui):
4317+ return False
4318+
4319+ buffer = self.phraseText.get_buffer()
4320+ text = buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
4321+ if not validate(not EMPTY_FIELD_REGEX.match(text), _("The phrase content can't be empty"), self.phraseText,
4322+ self.parentWindow.ui):
4323+ return False
4324+
4325+ return True
4326+
4327+ def on_modified(self, widget, data=None):
4328+ self.set_dirty()
4329+
4330+ def set_dirty(self):
4331+ self.parentWindow.set_dirty(True)
4332+
4333+
4334+class ScriptPage:
4335+
4336+ def __init__(self, parentWindow):
4337+ self.parentWindow = parentWindow
4338+ builder = get_ui("scriptpage.xml")
4339+ self.ui = builder.get_object("scriptpage")
4340+ builder.connect_signals(self)
4341+
4342+ self.buffer = gtksourceview2.Buffer()
4343+ self.buffer.connect("changed", self.on_modified)
4344+ self.editor = gtksourceview2.View(self.buffer)
4345+ scrolledWindow = builder.get_object("scrolledWindow")
4346+ scrolledWindow.add(self.editor)
4347+ self.promptCheckbox = builder.get_object("promptCheckbox")
4348+ self.showInTrayCheckbox = builder.get_object("showInTrayCheckbox")
4349+
4350+ vbox = builder.get_object("settingsVbox")
4351+ self.settingsWidget = SettingsWidget(parentWindow)
4352+ vbox.pack_start(self.settingsWidget.ui)
4353+
4354+ # Configure script editor
4355+ self.__m = gtksourceview2.LanguageManager()
4356+ self.__sm = gtksourceview2.StyleSchemeManager()
4357+ self.buffer.set_language(self.__m.get_language("python"))
4358+ self.buffer.set_style_scheme(self.__sm.get_scheme("kate"))
4359+ self.editor.set_auto_indent(True)
4360+ self.editor.set_smart_home_end(True)
4361+ self.editor.set_insert_spaces_instead_of_tabs(True)
4362+ self.editor.set_tab_width(4)
4363+
4364+ self.ui.show_all()
4365+
4366+ def load(self, theScript):
4367+ self.currentItem = theScript
4368+
4369+ self.buffer.begin_not_undoable_action()
4370+ self.buffer.set_text(theScript.code.encode("utf-8"))
4371+ self.buffer.end_not_undoable_action()
4372+ self.buffer.place_cursor(self.buffer.get_start_iter())
4373+
4374+ self.promptCheckbox.set_active(theScript.prompt)
4375+ self.showInTrayCheckbox.set_active(theScript.showInTrayMenu)
4376+ self.settingsWidget.load(theScript)
4377+
4378+ def save(self):
4379+ self.currentItem.code = self.buffer.get_text(self.buffer.get_start_iter(),
4380+ self.buffer.get_end_iter()).decode("utf-8")
4381+
4382+ self.currentItem.prompt = self.promptCheckbox.get_active()
4383+ self.currentItem.showInTrayMenu = self.showInTrayCheckbox.get_active()
4384+
4385+ self.settingsWidget.save()
4386+
4387+ def set_item_title(self, newTitle):
4388+ self.currentItem.description = newTitle.decode("utf-8")
4389+
4390+
4391+ def reset(self):
4392+ self.load(self.currentItem)
4393+ self.parentWindow.set_undo_available(False)
4394+ self.parentWindow.set_redo_available(False)
4395+
4396+ def validate(self):
4397+ text = self.buffer.get_text(self.buffer.get_start_iter(), self.buffer.get_end_iter())
4398+ if not validate(not EMPTY_FIELD_REGEX.match(text), _("The script code can't be empty"), self.editor,
4399+ self.parentWindow.ui):
4400+ return False
4401+
4402+ return True
4403+
4404+ def start_record(self):
4405+ self.buffer.insert(self.buffer.get_end_iter(), "\n")
4406+
4407+ def start_key_sequence(self):
4408+ self.buffer.insert(self.buffer.get_end_iter(), "keyboard.send_keys(\"")
4409+
4410+ def end_key_sequence(self):
4411+ self.buffer.insert(self.buffer.get_end_iter(), "\")\n")
4412+
4413+ def append_key(self, key):
4414+ #line, pos = self.buffer.getCursorPosition()
4415+ self.buffer.insert(self.buffer.get_end_iter(), key)
4416+ #self.scriptCodeEditor.setCursorPosition(line, pos + len(key))
4417+
4418+ def append_hotkey(self, key, modifiers):
4419+ #line, pos = self.scriptCodeEditor.getCursorPosition()
4420+ keyString = self.settingsWidget.build_hotkey_string(key, modifiers)
4421+ self.buffer.insert(self.buffer.get_end_iter(), keyString)
4422+ #self.scriptCodeEditor.setCursorPosition(line, pos + len(keyString))
4423+
4424+ def append_mouseclick(self, xCoord, yCoord, button, windowTitle):
4425+ self.buffer.insert(self.buffer.get_end_iter(), "mouse.click_relative(%d, %d, %d) # %s\n" % (xCoord, yCoord, int(button), windowTitle))
4426+
4427+ def undo(self):
4428+ self.buffer.undo()
4429+ self.parentWindow.set_undo_available(self.buffer.can_undo())
4430+ self.parentWindow.set_redo_available(self.buffer.can_redo())
4431+
4432+ def redo(self):
4433+ self.buffer.redo()
4434+ self.parentWindow.set_undo_available(self.buffer.can_undo())
4435+ self.parentWindow.set_redo_available(self.buffer.can_redo())
4436+
4437+ def on_modified(self, widget, data=None):
4438+ self.set_dirty()
4439+ self.parentWindow.set_undo_available(self.buffer.can_undo())
4440+ self.parentWindow.set_redo_available(self.buffer.can_redo())
4441+
4442+ def set_dirty(self):
4443+ self.parentWindow.set_dirty(True)
4444+
4445+
4446+class PhrasePage(ScriptPage):
4447+
4448+ def __init__(self, parentWindow):
4449+ self.parentWindow = parentWindow
4450+ builder = get_ui("phrasepage.xml")
4451+ self.ui = builder.get_object("phrasepage")
4452+ builder.connect_signals(self)
4453+
4454+ self.buffer = gtksourceview2.Buffer()
4455+ self.buffer.connect("changed", self.on_modified)
4456+ self.editor = gtksourceview2.View(self.buffer)
4457+ scrolledWindow = builder.get_object("scrolledWindow")
4458+ scrolledWindow.add(self.editor)
4459+ self.promptCheckbox = builder.get_object("promptCheckbox")
4460+ self.showInTrayCheckbox = builder.get_object("showInTrayCheckbox")
4461+
4462+ vbox = builder.get_object("settingsVbox")
4463+ self.settingsWidget = SettingsWidget(parentWindow)
4464+ vbox.pack_start(self.settingsWidget.ui)
4465+
4466+ # Configure script editor
4467+ #self.__m = gtksourceview2.LanguageManager()
4468+ self.__sm = gtksourceview2.StyleSchemeManager()
4469+ self.buffer.set_language(None)
4470+ self.buffer.set_style_scheme(self.__sm.get_scheme("kate"))
4471+ self.buffer.set_highlight_matching_brackets(False)
4472+ self.editor.set_auto_indent(False)
4473+ self.editor.set_smart_home_end(False)
4474+ self.editor.set_insert_spaces_instead_of_tabs(True)
4475+ self.editor.set_tab_width(4)
4476+
4477+ self.ui.show_all()
4478+
4479+ def load(self, thePhrase):
4480+ self.currentItem = thePhrase
4481+
4482+ self.buffer.begin_not_undoable_action()
4483+ self.buffer.set_text(thePhrase.phrase.encode("utf-8"))
4484+ self.buffer.end_not_undoable_action()
4485+ self.buffer.place_cursor(self.buffer.get_start_iter())
4486+
4487+ self.promptCheckbox.set_active(thePhrase.prompt)
4488+ self.showInTrayCheckbox.set_active(thePhrase.showInTrayMenu)
4489+ self.settingsWidget.load(thePhrase)
4490+
4491+ def save(self):
4492+ self.currentItem.phrase = self.buffer.get_text(self.buffer.get_start_iter(),
4493+ self.buffer.get_end_iter()).decode("utf-8")
4494+
4495+ self.currentItem.prompt = self.promptCheckbox.get_active()
4496+ self.currentItem.showInTrayMenu = self.showInTrayCheckbox.get_active()
4497+
4498+ self.settingsWidget.save()
4499+
4500+class ConfigWindow:
4501+
4502+ def __init__(self, app):
4503+ self.app = app
4504+ self.cutCopiedItems = []
4505+
4506+ builder = get_ui("mainwindow.xml")
4507+ self.ui = builder.get_object("mainwindow")
4508+ builder.connect_signals(self)
4509+
4510+ # Menus and Actions
4511+ self.uiManager = gtk.UIManager()
4512+ self.add_accel_group(self.uiManager.get_accel_group())
4513+
4514+ # Menu Bar
4515+ actionGroup = gtk.ActionGroup("menu")
4516+ actions = [
4517+ ("File", None, "_File"),
4518+ ("create", None, "Create..."),
4519+ ("new-top-folder", "folder-new", "New _Top-Level Folder", "", "Create a new top-level phrase folder", self.on_new_topfolder),
4520+ ("new-folder", "folder-new", "New _Folder", "", "Create a new phrase folder in the current folder", self.on_new_folder),
4521+ ("new-phrase", gtk.STOCK_NEW, "New _Phrase", "<control>n", "Create a new phrase in the current folder", self.on_new_phrase),
4522+ ("new-script", gtk.STOCK_NEW, "New _Script", "<control><shift>n", "Create a new script in the current folder", self.on_new_script),
4523+ ("save", gtk.STOCK_SAVE, "_Save", None, "Save changes to current item", self.on_save),
4524+ ("close-window", gtk.STOCK_CLOSE, "_Close window", None, "Close the configuration window", self.on_close),
4525+ ("quit", gtk.STOCK_QUIT, "_Quit", None, "Completely exit AutoKey", self.on_quit),
4526+ ("Edit", None, "_Edit"),
4527+ ("cut-item", gtk.STOCK_CUT, "Cu_t Item(s)", "<control><shift>x", "Cut the selected item", self.on_cut_item),
4528+ ("copy-item", gtk.STOCK_COPY, "_Copy Item(s)", "<control><shift>c", "Copy the selected item", self.on_copy_item),
4529+ ("paste-item", gtk.STOCK_PASTE, "_Paste Item(s)", "<control><shift>v", "Paste the last cut/copied item", self.on_paste_item),
4530+ ("delete-item", gtk.STOCK_DELETE, "_Delete Item(s)", "<control>d", "Delete the selected item", self.on_delete_item),
4531+ ("rename", None, "_Rename", "", "Rename the selected item", self.on_rename),
4532+ ("undo", gtk.STOCK_UNDO, "_Undo", "<control>z", "Undo the last edit", self.on_undo),
4533+ ("redo", gtk.STOCK_REDO, "_Redo", "<control><shift>z", "Redo the last undone edit", self.on_redo),
4534+ ("preferences", gtk.STOCK_PREFERENCES, "_Preferences", "", "Additional options", self.on_advanced_settings),
4535+ ("View", None, "_View"),
4536+ ("script-error", gtk.STOCK_DIALOG_ERROR, "Vie_w script error", None, "View script error information", self.on_show_error),
4537+ #("Settings", None, "_Settings", None, None, None),
4538+ #("advanced", gtk.STOCK_PREFERENCES, "_Advanced Settings", "", "Advanced configuration options", self.on_advanced_settings),
4539+ ("Help", None, "_Help"),
4540+ ("faq", None, "_F.A.Q.", None, "Display Frequently Asked Questions", self.on_show_faq),
4541+ ("help", gtk.STOCK_HELP, "Online _Help", None, "Display Online Help", self.on_show_help),
4542+ ("donate", gtk.STOCK_YES, "Donate", "", "Make A Donation", self.on_donate),
4543+ ("about", gtk.STOCK_ABOUT, "About AutoKey", None, "Show program information", self.on_show_about)
4544+ ]
4545+ actionGroup.add_actions(actions)
4546+
4547+ toggleActions = [
4548+ #("enable-monitoring", None, "_Enable Monitoring", None, "Toggle monitoring on/off", self.on_enable_toggled),
4549+ ("toolbar", None, "_Show Toolbar", None, "Show/hide the toolbar", self.on_toggle_toolbar),
4550+ ("record", gtk.STOCK_MEDIA_RECORD, "R_ecord Macro", None, "Record a keyboard/mouse macro", self.on_record_keystrokes),
4551+ ]
4552+ actionGroup.add_toggle_actions(toggleActions)
4553+
4554+ self.uiManager.insert_action_group(actionGroup, 0)
4555+ self.uiManager.add_ui_from_file(UI_DESCRIPTION_FILE)
4556+ self.vbox = builder.get_object("vbox")
4557+ self.vbox.pack_end(self.uiManager.get_widget("/MenuBar"), False, False)
4558+
4559+ # Toolbar 'create' button
4560+ create = gtk.MenuToolButton(gtk.STOCK_NEW)
4561+ create.show()
4562+ menu = self.uiManager.get_widget('/MenuBar/File/create').get_submenu()
4563+ create.set_menu(menu)
4564+ toolbar = self.uiManager.get_widget('/Toolbar')
4565+ s = gtk.SeparatorToolItem()
4566+ s.show()
4567+ toolbar.insert(s, 0)
4568+ toolbar.insert(create, 0)
4569+ #if ConfigManager.SETTINGS[SHOW_TOOLBAR]:
4570+ # self.__addToolbar()
4571+ self.uiManager.get_action("/MenuBar/View/toolbar").set_active(ConfigManager.SETTINGS[SHOW_TOOLBAR])
4572+
4573+ self.treeView = builder.get_object("treeWidget")
4574+ self.__initTreeWidget()
4575+
4576+ self.stack = builder.get_object("stack")
4577+ self.__initStack()
4578+
4579+ self.saveButton = builder.get_object("saveButton")
4580+ self.revertButton = builder.get_object("revertButton")
4581+ self.hpaned = builder.get_object("hpaned")
4582+
4583+ #self.uiManager.get_action("/MenuBar/Settings/enable-monitoring").set_active(app.service.is_running())
4584+ #self.uiManager.get_action("/MenuBar/Settings/enable-monitoring").set_sensitive(not app.serviceDisabled)
4585+
4586+ rootIter = self.treeView.get_model().get_iter_root()
4587+ self.treeView.get_selection().select_iter(rootIter)
4588+ self.on_tree_selection_changed(self.treeView)
4589+
4590+ width, height = ConfigManager.SETTINGS[WINDOW_DEFAULT_SIZE]
4591+ self.set_default_size(width, height)
4592+ self.hpaned.set_position(ConfigManager.SETTINGS[HPANE_POSITION])
4593+
4594+ self.recorder = Recorder(self.scriptPage)
4595+
4596+ def __addToolbar(self):
4597+ toolbar = self.uiManager.get_widget('/Toolbar')
4598+ self.vbox.pack_end(toolbar, False, False)
4599+ self.vbox.reorder_child(toolbar, 1)
4600+
4601+ def cancel_record(self):
4602+ if self.uiManager.get_widget("/MenuBar/Edit/record").get_active():
4603+ self.uiManager.get_widget("/MenuBar/Edit/record").set_active(False)
4604+ self.recorder.stop()
4605+
4606+ def save_completed(self):
4607+ self.saveButton.set_sensitive(False)
4608+ self.uiManager.get_action("/MenuBar/File/save").set_sensitive(False)
4609+ self.app.config_altered()
4610+
4611+ def set_dirty(self, dirty):
4612+ self.dirty = dirty
4613+ self.uiManager.get_action("/MenuBar/File/save").set_sensitive(dirty)
4614+ self.saveButton.set_sensitive(dirty)
4615+ self.revertButton.set_sensitive(dirty)
4616+
4617+ def update_actions(self, items, changed):
4618+ canCreate = isinstance(items[0], model.Folder) and len(items) == 1
4619+ canCopy = True
4620+ for item in items:
4621+ if isinstance(item, model.Folder):
4622+ canCopy = False
4623+ break
4624+
4625+ self.uiManager.get_action("/MenuBar/File/create").set_sensitive(True)
4626+ self.uiManager.get_action("/MenuBar/File/create/new-top-folder").set_sensitive(True)
4627+ self.uiManager.get_action("/MenuBar/File/create/new-folder").set_sensitive(canCreate)
4628+ self.uiManager.get_action("/MenuBar/File/create/new-phrase").set_sensitive(canCreate)
4629+ self.uiManager.get_action("/MenuBar/File/create/new-script").set_sensitive(canCreate)
4630+
4631+ self.uiManager.get_action("/MenuBar/Edit/copy-item").set_sensitive(canCopy)
4632+ self.uiManager.get_action("/MenuBar/Edit/paste-item").set_sensitive(canCreate and len(self.cutCopiedItems) > 0)
4633+ self.uiManager.get_action("/MenuBar/Edit/record").set_sensitive(isinstance(items[0], model.Script) and len(items) == 1)
4634+
4635+ if changed:
4636+ self.uiManager.get_action("/MenuBar/File/save").set_sensitive(False)
4637+ self.saveButton.set_sensitive(False)
4638+ self.uiManager.get_action("/MenuBar/Edit/undo").set_sensitive(False)
4639+ self.uiManager.get_action("/MenuBar/Edit/redo").set_sensitive(False)
4640+
4641+ def set_undo_available(self, state):
4642+ self.uiManager.get_action("/MenuBar/Edit/undo").set_sensitive(state)
4643+
4644+ def set_redo_available(self, state):
4645+ self.uiManager.get_action("/MenuBar/Edit/redo").set_sensitive(state)
4646+
4647+ def refresh_tree(self):
4648+ model, selectedPaths = self.treeView.get_selection().get_selected_rows()
4649+ for path in selectedPaths:
4650+ model.update_item(model[path].iter, self.__getTreeSelection())
4651+
4652+ # ---- Signal handlers ----
4653+
4654+ def on_save(self, widget, data=None):
4655+ if self.__getCurrentPage().validate():
4656+ self.__getCurrentPage().save()
4657+ self.save_completed()
4658+ self.set_dirty(False)
4659+
4660+ self.refresh_tree()
4661+
4662+ def on_reset(self, widget, data=None):
4663+ self.__getCurrentPage().reset()
4664+ self.set_dirty(False)
4665+ self.cancel_record()
4666+
4667+ def queryClose(self):
4668+ if self.dirty:
4669+ return self.promptToSave()
4670+
4671+ return False
4672+
4673+ def on_close(self, widget, data=None):
4674+ ConfigManager.SETTINGS[WINDOW_DEFAULT_SIZE] = self.get_size()
4675+ ConfigManager.SETTINGS[HPANE_POSITION] = self.hpaned.get_position()
4676+ self.cancel_record()
4677+ if self.queryClose():
4678+ return True
4679+ else:
4680+ self.hide()
4681+ self.destroy()
4682+ self.app.configWindow = None
4683+ self.app.config_altered()
4684+
4685+ def on_quit(self, widget, data=None):
4686+ #if not self.queryClose():
4687+ ConfigManager.SETTINGS[WINDOW_DEFAULT_SIZE] = self.get_size()
4688+ ConfigManager.SETTINGS[HPANE_POSITION] = self.hpaned.get_position()
4689+ self.app.shutdown()
4690+
4691+ # File Menu
4692+
4693+ def on_new_topfolder(self, widget, data=None):
4694+ self.__createFolder(None)
4695+
4696+ def on_new_folder(self, widget, data=None):
4697+ theModel, selectedPaths = self.treeView.get_selection().get_selected_rows()
4698+ parentIter = theModel[selectedPaths[0]].iter
4699+ self.__createFolder(parentIter)
4700+
4701+ def __createFolder(self, parentIter):
4702+ theModel = self.treeView.get_model()
4703+ newFolder = model.Folder("New Folder")
4704+ newIter = theModel.append_item(newFolder, parentIter)
4705+ self.treeView.expand_to_path(theModel.get_path(newIter))
4706+ self.treeView.get_selection().unselect_all()
4707+ self.treeView.get_selection().select_iter(newIter)
4708+ self.on_tree_selection_changed(self.treeView)
4709+ self.on_rename(self.treeView)
4710+
4711+ def on_new_phrase(self, widget, data=None):
4712+ theModel, selectedPaths = self.treeView.get_selection().get_selected_rows()
4713+ parentIter = theModel[selectedPaths[0]].iter
4714+ newPhrase = model.Phrase("New Phrase", "Enter phrase contents")
4715+ newIter = theModel.append_item(newPhrase, parentIter)
4716+ self.treeView.expand_to_path(theModel.get_path(newIter))
4717+ self.treeView.get_selection().unselect_all()
4718+ self.treeView.get_selection().select_iter(newIter)
4719+ self.on_tree_selection_changed(self.treeView)
4720+ self.on_rename(self.treeView)
4721+
4722+ def on_new_script(self, widget, data=None):
4723+ theModel, selectedPaths = self.treeView.get_selection().get_selected_rows()
4724+ parentIter = theModel[selectedPaths[0]].iter
4725+ newScript = model.Script("New Script", "# Enter script code")
4726+ newIter = theModel.append_item(newScript, parentIter)
4727+ self.treeView.expand_to_path(theModel.get_path(newIter))
4728+ self.treeView.get_selection().unselect_all()
4729+ self.treeView.get_selection().select_iter(newIter)
4730+ self.on_tree_selection_changed(self.treeView)
4731+ self.on_rename(self.treeView)
4732+
4733+ # Edit Menu
4734+
4735+ def on_cut_item(self, widget, data=None):
4736+ self.cutCopiedItems = self.__getTreeSelection()
4737+ selection = self.treeView.get_selection()
4738+ model, selectedPaths = selection.get_selected_rows()
4739+ refs = []
4740+ for path in selectedPaths:
4741+ refs.append(gtk.TreeRowReference(model, path))
4742+
4743+ for ref in refs:
4744+ if ref.valid():
4745+ self.__removeItem(model, model[ref.get_path()].iter)
4746+
4747+ if len(selectedPaths) > 1:
4748+ self.treeView.get_selection().unselect_all()
4749+ self.treeView.get_selection().select_iter(model.get_iter_root())
4750+ self.on_tree_selection_changed(self.treeView)
4751+
4752+ self.app.config_altered()
4753+
4754+ def on_copy_item(self, widget, data=None):
4755+ sourceObjects = self.__getTreeSelection()
4756+
4757+ for source in sourceObjects:
4758+ if isinstance(source, model.Phrase):
4759+ newObj = model.Phrase('', '')
4760+ else:
4761+ newObj = model.Script('', '')
4762+ newObj.copy(source)
4763+ self.cutCopiedItems.append(newObj)
4764+
4765+ def on_paste_item(self, widget, data=None):
4766+ theModel, selectedPaths = self.treeView.get_selection().get_selected_rows()
4767+ parentIter = theModel[selectedPaths[0]].iter
4768+
4769+ newIters = []
4770+ for item in self.cutCopiedItems:
4771+ newIter = theModel.append_item(item, parentIter)
4772+ if isinstance(item, model.Folder):
4773+ theModel.populate_store(newIter, item)
4774+ newIters.append(newIter)
4775+
4776+ self.treeView.expand_to_path(theModel.get_path(newIters[-1]))
4777+ self.treeView.get_selection().unselect_all()
4778+ self.treeView.get_selection().select_iter(newIters[0])
4779+ self.cutCopiedItems = []
4780+ self.on_tree_selection_changed(self.treeView)
4781+ for iter in newIters:
4782+ self.treeView.get_selection().select_iter(iter)
4783+ self.app.config_altered()
4784+
4785+ def on_delete_item(self, widget, data=None):
4786+ selection = self.treeView.get_selection()
4787+ model, selectedPaths = selection.get_selected_rows()
4788+ refs = []
4789+ for path in selectedPaths:
4790+ refs.append(gtk.TreeRowReference(model, path))
4791+
4792+ for ref in refs:
4793+ if ref.valid():
4794+ # Prompt for removal of a folder with phrases
4795+ item = model[ref.get_path()].iter
4796+
4797+ if model.iter_n_children(item) > 0:
4798+ title = model.get_value(item, AkTreeModel.OBJECT_COLUMN).title
4799+ dlg = gtk.MessageDialog(self.ui, gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO,
4800+ _("Are you sure you want to delete the %s folder and all the items in it?") % title)
4801+ if dlg.run() == gtk.RESPONSE_YES:
4802+ self.__removeItem(model, item)
4803+ dlg.destroy()
4804+
4805+ else:
4806+ self.__removeItem(model, item)
4807+
4808+ if len(selectedPaths) > 1:
4809+ self.treeView.get_selection().unselect_all()
4810+ self.treeView.get_selection().select_iter(model.get_iter_root())
4811+ self.on_tree_selection_changed(self.treeView)
4812+
4813+ self.app.config_altered()
4814+
4815+ def __removeItem(self, model, item):
4816+ selection = self.treeView.get_selection()
4817+ model, selectedPaths = selection.get_selected_rows()
4818+ newSelectionIter = model.iter_parent(model[selectedPaths[0]].iter)
4819+ if newSelectionIter is None:
4820+ newSelectionIter = model.get_iter_root()
4821+
4822+ model.remove_item(item)
4823+ self.treeView.get_selection().select_iter(newSelectionIter)
4824+ self.on_tree_selection_changed(self.treeView)
4825+
4826+ def on_undo(self, widget, data=None):
4827+ self.__getCurrentPage().undo()
4828+
4829+ def on_redo(self, widget, data=None):
4830+ self.__getCurrentPage().redo()
4831+
4832+ def on_record_keystrokes(self, widget, data=None):
4833+ if widget.get_active():
4834+ dlg = RecordDialog(self.ui, self.on_rec_response)
4835+ dlg.run()
4836+ else:
4837+ self.recorder.stop()
4838+
4839+ def on_rec_response(self, response, recKb, recMouse, delay):
4840+ if response == gtk.RESPONSE_OK:
4841+ self.recorder.set_record_keyboard(recKb)
4842+ self.recorder.set_record_mouse(recMouse)
4843+ self.recorder.start(delay)
4844+ elif response == gtk.RESPONSE_CANCEL:
4845+ self.uiManager.get_widget("/MenuBar/Edit/record").set_active(False)
4846+
4847+ # View Menu
4848+
4849+ def on_toggle_toolbar(self, widget, data=None):
4850+ if widget.get_active():
4851+ self.__addToolbar()
4852+ else:
4853+ self.vbox.remove(self.uiManager.get_widget('/Toolbar'))
4854+
4855+ ConfigManager.SETTINGS[SHOW_TOOLBAR] = widget.get_active()
4856+
4857+ def on_show_error(self, widget, data=None):
4858+ self.app.show_script_error()
4859+
4860+ # Settings Menu
4861+
4862+ def on_enable_toggled(self, widget, data=None):
4863+ if widget.get_active():
4864+ self.app.unpause_service()
4865+ else:
4866+ self.app.pause_service()
4867+
4868+ def on_advanced_settings(self, widget, data=None):
4869+ s = SettingsDialog(self.ui, self.app.configManager)
4870+ s.show()
4871+
4872+ # Help Menu
4873+
4874+ def on_show_faq(self, widget, data=None):
4875+ webbrowser.open(common.FAQ_URL, False, True)
4876+
4877+ def on_show_help(self, widget, data=None):
4878+ webbrowser.open(common.HELP_URL, False, True)
4879+
4880+ def on_donate(self, widget, data=None):
4881+ webbrowser.open(common.DONATE_URL, False, True)
4882+
4883+ def on_show_about(self, widget, data=None):
4884+ dlg = gtk.AboutDialog()
4885+ dlg.set_name("AutoKey (GTK UI)")
4886+ dlg.set_comments("A desktop automation utility for Linux and X11.")
4887+ dlg.set_version(common.VERSION)
4888+ p = gtk.gdk.pixbuf_new_from_file(common.ICON_FILE)
4889+ p = p.scale_simple(100, 100, gtk.gdk.INTERP_BILINEAR)
4890+ dlg.set_logo(p)
4891+ dlg.set_website(WEBSITE)
4892+ dlg.set_authors(["Chris Dekter (Developer) <cdekter@gmail.com>",
4893+ "Sam Peterson (Original developer) <peabodyenator@gmail.com>"])
4894+ dlg.run()
4895+ dlg.destroy()
4896+
4897+ # Tree widget
4898+
4899+ def on_rename(self, widget, data=None):
4900+ selection = self.treeView.get_selection()
4901+ theModel, selectedPaths = selection.get_selected_rows()
4902+ self.treeView.set_cursor(selectedPaths[0], self.treeView.get_column(0), True)
4903+
4904+ def on_treeWidget_row_activated(self, widget, path, viewColumn, data=None):
4905+ widget.expand_row(path, False)
4906+
4907+ def on_treeview_buttonpress(self, widget, event, data=None):
4908+ return self.dirty
4909+
4910+ def on_treeview_buttonrelease(self, widget, event, data=None):
4911+ if self.promptToSave():
4912+ # True result indicates user selected Cancel. Stop event propagation
4913+ return True
4914+ else:
4915+ x = int(event.x)
4916+ y = int(event.y)
4917+ time = event.time
4918+ pthinfo = widget.get_path_at_pos(x, y)
4919+ if pthinfo is not None:
4920+ path, col, cellx, celly = pthinfo
4921+ currentPath, currentCol = widget.get_cursor()
4922+ if currentPath != path and currentCol != col:
4923+ widget.set_cursor(path, col, 0)
4924+ if event.button == 3:
4925+ self.__popupMenu(event)
4926+ return False
4927+
4928+ def on_tree_selection_changed(self, widget, data=None):
4929+ selectedObjects = self.__getTreeSelection()
4930+ if len(selectedObjects) == 1:
4931+ selectedObject = selectedObjects[0]
4932+
4933+ if isinstance(selectedObject, model.Folder):
4934+ self.stack.set_current_page(0)
4935+ self.folderPage.load(selectedObject)
4936+ elif isinstance(selectedObject, model.Phrase):
4937+ self.stack.set_current_page(1)
4938+ self.phrasePage.load(selectedObject)
4939+ else:
4940+ self.stack.set_current_page(2)
4941+ self.scriptPage.load(selectedObject)
4942+
4943+ self.set_dirty(False)
4944+ self.cancel_record()
4945+ self.update_actions(selectedObjects, True)
4946+ self.selectedObject = selectedObject
4947+
4948+ else:
4949+ self.update_actions(selectedObjects, False)
4950+
4951+ def on_drag_data_received(self, treeview, context, x, y, selection, info, etime):
4952+ selection = self.treeView.get_selection()
4953+ theModel, sourcePaths = selection.get_selected_rows()
4954+ drop_info = treeview.get_dest_row_at_pos(x, y)
4955+ if drop_info:
4956+ path, position = drop_info
4957+ targetIter = theModel.get_iter(path)
4958+
4959+ sourceModelItems = self.__getTreeSelection()
4960+ #sourceModelItem = theModel.get_value(sourceIter, AkTreeModel.OBJECT_COLUMN)
4961+ targetModelItem = theModel.get_value(targetIter, AkTreeModel.OBJECT_COLUMN)
4962+
4963+ for path in sourcePaths:
4964+ self.__removeItem(theModel, theModel[path].iter)
4965+
4966+ newIters = []
4967+ for item in sourceModelItems:
4968+ newIter = theModel.append_item(item, targetIter)
4969+ if isinstance(item, model.Folder):
4970+ theModel.populate_store(newIter, item)
4971+ newIters.append(newIter)
4972+
4973+ self.treeView.expand_to_path(theModel.get_path(newIters[-1]))
4974+ selection.unselect_all()
4975+ for iter in newIters:
4976+ selection.select_iter(iter)
4977+ self.on_tree_selection_changed(self.treeView)
4978+ self.app.config_altered()
4979+
4980+ def on_drag_drop(self, widget, drag_context, x, y, timestamp):
4981+ drop_info = widget.get_dest_row_at_pos(x, y)
4982+ if drop_info:
4983+ selection = widget.get_selection()
4984+ theModel, sourcePaths = selection.get_selected_rows()
4985+ path, position = drop_info
4986+
4987+ if position not in (gtk.TREE_VIEW_DROP_INTO_OR_BEFORE, gtk.TREE_VIEW_DROP_INTO_OR_AFTER):
4988+ return True
4989+
4990+ targetIter = theModel.get_iter(path)
4991+ targetModelItem = theModel.get_value(targetIter, AkTreeModel.OBJECT_COLUMN)
4992+ if isinstance(targetModelItem, model.Folder) and path not in sourcePaths:
4993+ # checking path prevents dropping a folder onto itself
4994+ return False
4995+ else:
4996+ return True
4997+
4998+ return True
4999+
5000+ def on_cell_modified(self, renderer, path, newText, data=None):
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: