summaryrefslogtreecommitdiff
path: root/security/keepassx/files/patch-src-mainwindow.cpp
diff options
context:
space:
mode:
authorAnders Nordby <anders@FreeBSD.org>2007-06-18 20:10:06 +0000
committerAnders Nordby <anders@FreeBSD.org>2007-06-18 20:10:06 +0000
commitc617562d9e1112d98b4301b44872844fc76e9215 (patch)
tree4adb5dfb70ab920cc4e0c6d7d7950d42126f0204 /security/keepassx/files/patch-src-mainwindow.cpp
parentFix the build with GCC 4.2 and thus unbreak. (diff)
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)
Diffstat (limited to 'security/keepassx/files/patch-src-mainwindow.cpp')
-rw-r--r--security/keepassx/files/patch-src-mainwindow.cpp32
1 files changed, 32 insertions, 0 deletions
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(){