ctrl+s -> kee -> keepp

This commit is contained in:
Marco Pesenti Gritti 2007-11-06 15:14:18 +01:00
parent 477c37fca4
commit 306d32832f
2 changed files with 10 additions and 0 deletions

2
NEWS
View File

@ -1,3 +1,5 @@
* Associate ctrl+s to keep. (rwh)
Snapshot 73cae198f5
* Remove the startup sound for now, to not break audio

View File

@ -408,6 +408,7 @@ class Activity(Window, gtk.Container):
self.connect('realize', self.__realize_cb)
self.connect('delete-event', self.__delete_event_cb)
self.connect("key_press_event", self.__key_press_event_cb)
self._active = False
self._activity_id = handle.activity_id
@ -850,6 +851,13 @@ class Activity(Window, gtk.Container):
metadata = property(get_metadata, None)
def __key_press_event_cb(self, widget, event):
key = gtk.gdk.keyval_name(event.keyval)
if key == 's' and (event.state & gtk.gdk.CONTROL_MASK):
logging.debug('Keep requested')
self.copy()
return True
def get_bundle_name():
"""Return the bundle name for the current process' bundle"""
return os.environ['SUGAR_BUNDLE_NAME']