diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-12-07 07:24:05 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2007-12-07 07:24:05 +0000 |
commit | 89716cd5074959f90ec5eb26c0783324e68f028f (patch) | |
tree | e91429b3d3e83022ee3b7adeb14231bc9ebc3372 /gtk-recordmydesktop/src/rmdPrefsWidget.py | |
parent | d8a27fbd874c1b639eedb7c1635d79b06cd2ae60 (diff) |
rmdPrefsWidget.py, rmdSimple.py: added shortcuts for common actions
ctr+r,ctr+s,ctr+h,ctr+q,,ctr+p,esc
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@464 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'gtk-recordmydesktop/src/rmdPrefsWidget.py')
-rw-r--r-- | gtk-recordmydesktop/src/rmdPrefsWidget.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gtk-recordmydesktop/src/rmdPrefsWidget.py b/gtk-recordmydesktop/src/rmdPrefsWidget.py index 49257f8..76d2faf 100644 --- a/gtk-recordmydesktop/src/rmdPrefsWidget.py +++ b/gtk-recordmydesktop/src/rmdPrefsWidget.py @@ -337,6 +337,14 @@ class prefsWidget(object): self.jack_button.connect("clicked",self.__jack_enabled_check__) self.jack_lsp_refresh.connect("clicked",self.__runJackLSP__) + def __register_shortcuts__(self): + self.parent.advanced_button.add_accelerator("clicked",self.accel_group, + ord('P'), gtk.gdk.CONTROL_MASK, + gtk.ACCEL_VISIBLE) + self.parent.advanced_button.add_accelerator("clicked",self.accel_group, + gtk.gdk.keyval_from_name("Escape"),0, + gtk.ACCEL_VISIBLE) + def __jack_enabled_check__(self,widget): self.channelsSpinButton.set_sensitive(not widget.get_active()) self.freqSpinButton.set_sensitive(not widget.get_active()) @@ -344,16 +352,21 @@ class prefsWidget(object): self.jack_lsp_listview.set_sensitive(widget.get_active()) self.jack_lsp_refresh.set_sensitive(widget.get_active()) - def __init__(self,values,optionsOpen): + def __init__(self,parent,values,optionsOpen): self.values=values self.ports=[] + self.parent=parent self.optionsOpen=optionsOpen self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("destroy", self.destroy) self.window.set_border_width(10) self.window.set_title("recordMyDesktop: "+smplButtonStrings[0]) + self.accel_group = gtk.AccelGroup() + self.window.add_accel_group(self.accel_group) + self.__subWidgets__() self.__makeCons__() + self.__register_shortcuts__() self.__runJackLSP__() self.__jack_enabled_check__(self.jack_button) if self.values[24]==0: |