diff --git a/lookit.desktop b/lookit.desktop
index 8c876c9..502c817 100755
--- a/lookit.desktop
+++ b/lookit.desktop
@@ -9,7 +9,7 @@ Terminal=false
Type=Application
Categories=Utility;
MimeType=image/gif;image/jpeg;image/png;
-X-Ayatana-Desktop-Shortcuts=CaptureArea;CaptureScreen;CaptureActiveWindow;DelayCapture;Preferences;About;
+X-Ayatana-Desktop-Shortcuts=CaptureArea;CaptureScreen;CaptureActiveWindow;Preferences;About;
[CaptureArea Shortcut Group]
Name=Capture Area
@@ -26,11 +26,6 @@ Name=Capture Window
Exec=/usr/bin/lookit --capture-window
TargetEnvironment=Unity
-[DelayCapture Shortcut Group]
-Name=Delayed Capture
-Exec=/usr/bin/lookit --delay-ui
-TargetEnvironment=Unity
-
[Preferences Shortcut Group]
Name=Preferences
Exec=/usr/bin/lookit --preferences
diff --git a/src/data/delay.xml b/src/data/delay.xml
deleted file mode 100644
index 6d15544..0000000
--- a/src/data/delay.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
diff --git a/src/data/pref.xml b/src/data/pref.xml
index 11e9c12..166c5f9 100644
--- a/src/data/pref.xml
+++ b/src/data/pref.xml
@@ -7,6 +7,11 @@
1
10
+
+ 10
+ 1
+ 1
+
400
360
@@ -158,6 +163,43 @@
3
+
+
+ True
+ False
+
+
+ True
+ False
+ Delay:
+
+
+ False
+ False
+ 0
+
+
+
+
+ True
+ True
+ adjustment2
+ 1
+ 0
+
+
+ True
+ True
+ 1
+
+
+
+
+ False
+ True
+ 4
+
+
@@ -232,12 +274,6 @@
-
-
-
-
-
-
True
@@ -269,6 +305,12 @@
+
+
+
+
+
+
1
diff --git a/src/delay.py b/src/delay.py
deleted file mode 100644
index b97153c..0000000
--- a/src/delay.py
+++ /dev/null
@@ -1,44 +0,0 @@
-import gtk
-import sys
-import time
-import os
-
-import liblookit
-import lookitconfig
-
-class DelayDialog:
- def __init__(self):
- self.config = lookitconfig.LookitConfig()
- try:
- self.config.read(liblookit.CONFIG_FILE)
- except:
- pass
-
- try:
- self.builder = gtk.Builder()
- datadir = liblookit.get_data_dir()
- xmlfile = os.path.join(datadir, 'delay.xml')
- self.builder.add_from_file(xmlfile)
- except Exception as e:
- print 'Error loading XML file', e.message
- sys.exit(1)
-
- self.dialog = self.builder.get_object('dialog')
- self.dialog.connect('response', self.on_response)
-
- self.builder.get_object('hscale').set_value(self.config.getint('General', 'delay'))
-
- def run(self):
- self.dialog.run()
-
- def on_response(self, widget, data=None):
- self.dialog.hide_all()
- if data != 0:
- return
- delay_value = int(self.builder.get_object('hscale').get_value())
- print delay_value
- self.config.set('General', 'delay', delay_value)
- self.config.write(open(liblookit.CONFIG_FILE, 'w'))
-
-if __name__ == '__main__':
- DelayDialog().run()
diff --git a/src/gnome-shell/extensions/lookit@extensions.zachtib.com/extension.js b/src/gnome-shell/extensions/lookit@extensions.zachtib.com/extension.js
index a0d1656..91c91d7 100644
--- a/src/gnome-shell/extensions/lookit@extensions.zachtib.com/extension.js
+++ b/src/gnome-shell/extensions/lookit@extensions.zachtib.com/extension.js
@@ -44,10 +44,6 @@ LookitButton.prototype = {
this._menuItem.connect('activate', Lang.bind(this, _captureActive));
this.menu.addMenuItem(this._menuItem)
- this._menuItem = new PopupMenu.PopupMenuItem('Delay Capture');
- this._menuItem.connect('activate', Lang.bind(this, _captureDelay));
- this.menu.addMenuItem(this._menuItem)
-
this._menuItem = new PopupMenu.PopupMenuItem('Preferences');
this._menuItem.connect('activate', Lang.bind(this, _preferences));
this.menu.addMenuItem(this._menuItem)
@@ -74,10 +70,6 @@ function _captureScreen() {
GLib.spawn_command_line_async('lookit --capture-screen')
}
-function _captureDelay() {
- GLib.spawn_command_line_async('lookit --delay-ui')
-}
-
function _preferences() {
GLib.spawn_command_line_async('lookit --preferences')
}
diff --git a/src/liblookit.py b/src/liblookit.py
index feca3bb..17a546a 100644
--- a/src/liblookit.py
+++ b/src/liblookit.py
@@ -3,7 +3,6 @@
import time
import about
-import delay
import lookitconfig
import preferences
import screencapper
@@ -63,9 +62,6 @@ def do_capture_screen():
pb = screencapper.capture_screen()
uploader.upload_pixbuf(pb)
-def do_delay_ui():
- delay.DelayDialog().run()
-
def do_preferences():
preferences.PrefDialog().run()
diff --git a/src/lookit b/src/lookit
index 9836442..d313cf7 100755
--- a/src/lookit
+++ b/src/lookit
@@ -47,9 +47,6 @@ if __name__ == '__main__':
parser.add_argument('--capture-screen', action='store_const',
const='CAPTURE_SCREEN', dest='command',
help='Capture and upload the entire screen')
- parser.add_argument('--delay-ui', action='store_const',
- const='DELAY_UI', dest='command',
- help='Show the delayed capture dialog')
parser.add_argument('--preferences', action='store_const',
const='SHOW_PREFERENCES', dest='command',
help='Configure Lookit')
@@ -78,8 +75,6 @@ if __name__ == '__main__':
liblookit.do_capture_window()
elif args.command == 'CAPTURE_SCREEN':
liblookit.do_capture_screen()
- elif args.command == 'DELAY_UI':
- liblookit.do_delay_ui()
elif args.command == 'SHOW_PREFERENCES':
liblookit.do_preferences()
elif args.command == 'SHOW_ABOUT':
diff --git a/src/lookitindicator.py b/src/lookitindicator.py
index 5a5cddb..daac3ed 100644
--- a/src/lookitindicator.py
+++ b/src/lookitindicator.py
@@ -6,7 +6,7 @@
from liblookit import enum
cmd = enum('CAPTURE_AREA', 'CAPTURE_ACTIVE_WINDOW', 'CAPTURE_SCREEN',
- 'DELAY_UI', 'SHOW_PREFERENCES', 'SHOW_ABOUT', 'EXIT')
+ 'SHOW_PREFERENCES', 'SHOW_ABOUT', 'EXIT')
class LookitIndicator:
@@ -21,7 +21,6 @@ def __init__(self):
self.add_menu_item('Capture Area', cmd.CAPTURE_AREA)
self.add_menu_item('Capture Entire Screen', cmd.CAPTURE_SCREEN)
self.add_menu_item('Capture Active Window', cmd.CAPTURE_ACTIVE_WINDOW)
- self.add_menu_item('Adjust Delay', cmd.DELAY_UI)
self.add_menu_separator()
self.add_menu_item('Preferences', cmd.SHOW_PREFERENCES)
self.add_menu_item('About', cmd.SHOW_ABOUT)
@@ -48,8 +47,6 @@ def handle_menu_item(self, widget=None, command=None):
liblookit.do_capture_window()
elif command == cmd.CAPTURE_SCREEN:
liblookit.do_capture_screen()
- elif command == cmd.DELAY_UI:
- liblookit.do_delay_ui()
elif command == cmd.SHOW_PREFERENCES:
liblookit.do_preferences()
elif command == cmd.SHOW_ABOUT:
diff --git a/src/preferences.py b/src/preferences.py
index 752dfb6..13c6abd 100644
--- a/src/preferences.py
+++ b/src/preferences.py
@@ -33,6 +33,7 @@ def __init__(self):
self.shortenurl = builder.get_object("shortenurl")
self.savedir = builder.get_object("savedir")
self.autostart = builder.get_object("autostart")
+ self.delayscale = builder.get_object("delayscale")
self.combobox = builder.get_object("combobox")
connections = gtk.ListStore(str)
@@ -63,6 +64,7 @@ def run(self):
self.shortenurl.set_active(self.config.getboolean('General', 'shortenurl'))
self.savedir.set_filename(self.config.get('General', 'savedir'))
self.autostart.set_active(self.config.getboolean('General', 'autostart'))
+ self.delayscale.set_value(self.config.getint('General', 'delay'))
self.capturearea.set_text(self.config.get('Hotkeys', 'capturearea'))
self.capturescreen.set_text(self.config.get('Hotkeys', 'capturescreen'))
self.capturewindow.set_text(self.config.get('Hotkeys', 'capturewindow'))
@@ -115,6 +117,7 @@ def on_pref_dialog_response(self, widget, data=None):
self.config.set('General', 'shortenurl', self.shortenurl.get_active())
self.config.set('General', 'savedir', self.savedir.get_filename())
self.config.set('General', 'autostart', self.autostart.get_active())
+ self.config.set('General', 'delay', int(self.delayscale.get_value()))
self.config.set('Hotkeys', 'capturearea', self.capturearea.get_text())
self.config.set('Hotkeys', 'capturescreen', self.capturescreen.get_text())
self.config.set('Hotkeys', 'capturewindow', self.capturewindow.get_text())