Mercurial > hg > Feedworm
diff MainWindow.py @ 113:04f8cf1558c1
Add a menu item to copy the selected article's link to the clipboard
author | Dirk Olmes <dirk@xanthippe.ping.de> |
---|---|
date | Fri, 29 Apr 2011 12:15:57 +0200 |
parents | 863599e84269 |
children | e9145e8dd698 |
line wrap: on
line diff
--- a/MainWindow.py Thu Mar 31 03:50:46 2011 +0200 +++ b/MainWindow.py Fri Apr 29 12:15:57 2011 +0200 @@ -8,6 +8,7 @@ from Preferences import Preferences from PreferencesDialog import PreferencesDialog from PyQt4.QtCore import QUrl +from PyQt4.QtGui import QApplication from PyQt4.QtGui import QMainWindow from PyQt4.QtGui import QWidget from Ui_MainWindow import Ui_MainWindow @@ -179,3 +180,7 @@ # save all uncommitted state, just in case self.session.commit() QMainWindow.close(self) + + def copyArticleURLToClipboard(self): + clipboard = QApplication.clipboard() + clipboard.setText(self.selectedEntry.link)