# HG changeset patch # User Dirk Olmes # Date 1304072157 -7200 # Node ID 04f8cf1558c14ad360a20e629ac847929e55e8a4 # Parent e4038dd8cc0ea5d76d4c661590759334978467ca Add a menu item to copy the selected article's link to the clipboard diff -r e4038dd8cc0e -r 04f8cf1558c1 MainWindow.py --- 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) diff -r e4038dd8cc0e -r 04f8cf1558c1 Ui_MainWindow.ui --- a/Ui_MainWindow.ui Thu Mar 31 03:50:46 2011 +0200 +++ b/Ui_MainWindow.ui Fri Apr 29 12:15:57 2011 +0200 @@ -95,6 +95,7 @@ + @@ -229,6 +230,14 @@ Mark selected read + + + Copy article URL + + + Ctrl+Shift+C + + @@ -449,6 +458,22 @@ + + actionCopyArticleURL + activated() + MainWindow + copyArticleURLToClipboard() + + + -1 + -1 + + + 495 + 374 + + + addFeed() @@ -463,5 +488,6 @@ deleteFeed() feedEntryDoubleClicked() markSelectedEntriesRead() + copyArticleURLToClipboard()