# HG changeset patch # User Erik Grinaker # Date 1111428284 0 # Node ID 5a85d838a653f61bb80e73475032730fbc5ce06e # Parent 13a32d3a5428adb9b5c8ab6d0d53e858bb06d454 don't steal clipboard events from widgets in main window diff -r 13a32d3a5428adb9b5c8ab6d0d53e858bb06d454 -r 5a85d838a653f61bb80e73475032730fbc5ce06e ChangeLog --- a/ChangeLog Mon Mar 21 17:34:51 2005 +0000 +++ b/ChangeLog Mon Mar 21 18:04:44 2005 +0000 @@ -6,6 +6,8 @@ * don't crash when closing non-modal dialog with escape + * don't steal clipboard events from widgets in main window + 2005-03-18 Erik Grinaker * left-align labels in link-buttons (for URLs etc) diff -r 13a32d3a5428adb9b5c8ab6d0d53e858bb06d454 -r 5a85d838a653f61bb80e73475032730fbc5ce06e NEWS --- a/NEWS Mon Mar 21 17:34:51 2005 +0000 +++ b/NEWS Mon Mar 21 18:04:44 2005 +0000 @@ -27,6 +27,7 @@ - display non-ascii characters in filenames correctly - use fallback folder icons when not found in theme - hide any open dialogs when locking the file +- don't steal clipboard events from widgets in main window - update icons on theme change - use better lock icon - use better stock icons for dialog buttons diff -r 13a32d3a5428adb9b5c8ab6d0d53e858bb06d454 -r 5a85d838a653f61bb80e73475032730fbc5ce06e TODO --- a/TODO Mon Mar 21 17:34:51 2005 +0000 +++ b/TODO Mon Mar 21 18:04:44 2005 +0000 @@ -9,8 +9,6 @@ - show complete account tree as a popup-submenu of the applet - make library modules more independent, so only a few are imported - run unit tests on built libraries instead of installed ones -- only copy/paste entries with keyboard shortcut when tree has focus - (ctrl-c should copy selected label in dataview when focused) 0.5.x: - ensure complete UTF-8 support diff -r 13a32d3a5428adb9b5c8ab6d0d53e858bb06d454 -r 5a85d838a653f61bb80e73475032730fbc5ce06e configure.ac --- a/configure.ac Mon Mar 21 17:34:51 2005 +0000 +++ b/configure.ac Mon Mar 21 18:04:44 2005 +0000 @@ -12,7 +12,6 @@ dnl check for dependencies AC_PROG_CC() - RVL_PYTHON_PATH(2.3) RVL_PYTHON_MODULE(Crypto, yes) PKG_CHECK_MODULES(PYGTK, pygtk-2.0 >= 2.3.90) diff -r 13a32d3a5428adb9b5c8ab6d0d53e858bb06d454 -r 5a85d838a653f61bb80e73475032730fbc5ce06e src/revelation.in --- a/src/revelation.in Mon Mar 21 17:34:51 2005 +0000 +++ b/src/revelation.in Mon Mar 21 18:04:44 2005 +0000 @@ -170,9 +170,9 @@ # set up callbacks for actions callbacks = { "clip-chain" : lambda w: self.clip_chain(self.entrystore.get_entry(self.tree.get_active())), - "clip-copy" : lambda w: self.clip_copy(self.tree.get_selected()), - "clip-cut" : lambda w: self.clip_cut(self.tree.get_selected()), - "clip-paste" : lambda w: self.clip_paste(self.entryclipboard.get(), self.tree.get_active()), + "clip-copy" : self.__cb_clip_copy, + "clip-cut" : self.__cb_clip_cut, + "clip-paste" : self.__cb_clip_paste, "entry-add" : lambda w: self.entry_add(None, self.tree.get_active()), "entry-edit" : lambda w: self.entry_edit(self.tree.get_active()), "entry-goto" : lambda w: self.entry_goto(self.tree.get_selected()), @@ -362,6 +362,42 @@ ##### MISC CALLBACKS ##### + def __cb_clip_copy(self, widget, data = None): + "Handles copying to the clipboard" + + focuswidget = self.get_focus() + + if focuswidget is self.tree: + self.clip_copy(self.tree.get_selected()) + + elif isinstance(focuswidget, gtk.Label) or isinstance(focuswidget, gtk.Entry): + focuswidget.emit("copy-clipboard") + + + def __cb_clip_cut(self, widget, data = None): + "Handles cutting to clipboard" + + focuswidget = self.get_focus() + + if focuswidget is self.tree: + self.clip_cut(self.tree.get_selected()) + + elif isinstance(focuswidget, gtk.Entry): + focuswidget.emit("cut-clipboard") + + + def __cb_clip_paste(self, widget, data = None): + "Handles pasting from clipboard" + + focuswidget = self.get_focus() + + if focuswidget is self.tree: + self.clip_paste(self.entryclipboard.get(), self.tree.get_active()) + + elif isinstance(focuswidget, gtk.Entry): + focuswidget.emit("paste-clipboard") + + def __cb_clip_set(self, widget, data): "Sets data on the clipboars"