|
From: Martynas J. <mj...@us...> - 2006-03-20 20:37:31
|
Update of /cvsroot/opendict/opendict/lib/gui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8970/lib/gui Modified Files: mainwin.py Log Message: Clipboard is not cleared after doing search. Index: mainwin.py =================================================================== RCS file: /cvsroot/opendict/opendict/lib/gui/mainwin.py,v retrieving revision 1.94 retrieving revision 1.95 diff -u -d -r1.94 -r1.95 --- mainwin.py 18 Feb 2006 22:54:47 -0000 1.94 +++ mainwin.py 20 Mar 2006 20:37:24 -0000 1.95 @@ -693,19 +693,14 @@ wxTheClipboard.Close() return enc.toWX(text) - - def clear(): - do = wxTextDataObject() - do.SetText('') - wxTheClipboard.Open() - wxTheClipboard.SetData(do) - wxTheClipboard.Close() - text = getText() - if text: + old_text = '' + if hasattr(self, 'old_clipboard_text'): + old_text = self.old_clipboard_text + if text and text != old_text: self.entry.SetValue(text) self.onSearch(None) - clear() + self.old_clipboard_text = text def onUseScanClipboard(self, event): |