From c617562d9e1112d98b4301b44872844fc76e9215 Mon Sep 17 00:00:00 2001 From: Anders Nordby Date: Mon, 18 Jun 2007 20:10:06 +0000 Subject: Improve clipboard support, copy to/clear from mouse selection also, not only clipboard. This makes it possible to paste data to a stock X.org xterm. Approved by: skv (maintainer timeout, 10 days) --- security/keepassx/files/patch-src-mainwindow.cpp | 32 ++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 security/keepassx/files/patch-src-mainwindow.cpp (limited to 'security/keepassx/files/patch-src-mainwindow.cpp') diff --git a/security/keepassx/files/patch-src-mainwindow.cpp b/security/keepassx/files/patch-src-mainwindow.cpp new file mode 100644 index 000000000000..9291974e0546 --- /dev/null +++ b/security/keepassx/files/patch-src-mainwindow.cpp @@ -0,0 +1,32 @@ +--- src/mainwindow.cpp.orig Wed Jun 7 12:54:20 2006 ++++ src/mainwindow.cpp Mon Jun 4 08:56:25 2007 +@@ -879,6 +879,9 @@ + + void KeepassMainWindow::OnEditUsernameToClipboard(){ + Clipboard->setText(currentEntry()->UserName, QClipboard::Clipboard); ++if(Clipboard->supportsSelection()){ ++ Clipboard->setText(currentEntry()->UserName, QClipboard::Selection); ++} + ClipboardTimer.setSingleShot(true); + ClipboardTimer.start(config.ClipboardTimeOut*1000); + } +@@ -886,6 +889,9 @@ + void KeepassMainWindow::OnEditPasswordToClipboard(){ + currentEntry()->Password.unlock(); + Clipboard->setText(currentEntry()->Password.string(),QClipboard::Clipboard); ++if(Clipboard->supportsSelection()){ ++ Clipboard->setText(currentEntry()->Password.string(),QClipboard::Selection); ++} + ClipboardTimer.setSingleShot(true); + ClipboardTimer.start(config.ClipboardTimeOut*1000); + currentEntry()->Password.lock(); +@@ -894,6 +900,9 @@ + + void KeepassMainWindow::OnClipboardTimeOut(){ + Clipboard->clear(QClipboard::Clipboard); ++if(Clipboard->supportsSelection()){ ++ Clipboard->clear(QClipboard::Selection); ++} + } + + void KeepassMainWindow::OnEditSaveAttachment(){ -- cgit v1.2.3