From c4a5206dc6bf6206e45780c8a4703ce0e65cda5a Mon Sep 17 00:00:00 2001 From: ikemo Date: Tue, 29 Jul 2003 15:02:37 +0000 Subject: [PATCH] impl 'copy title & url' git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/kita/kita/trunk@424 56b19765-1e22-0410-a548-a0f45d66c51a --- kita/src/kitasubjectview.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kita/src/kitasubjectview.cpp b/kita/src/kitasubjectview.cpp index 3f0bb8d..2d92650 100644 --- a/kita/src/kitasubjectview.cpp +++ b/kita/src/kitasubjectview.cpp @@ -14,6 +14,7 @@ #include #include #include +#include // kdelibs/kio #include @@ -264,7 +265,8 @@ void KitaSubjectView::slotContextMenuRequested( QListViewItem* item, const QPoin KPopupMenu popup( 0 ); popup.insertItem( i18n("Open with Web Browser"), 0 ); - popup.insertItem( i18n("Open with new tab (broken)"), 1 ); + popup.insertItem( i18n("Open with new tab"), 1 ); + popup.insertItem( i18n("Copy title and URL"), 2 ); QString datName = item->text(Row_DatName); KURL datURL = m_board.url(); @@ -274,6 +276,8 @@ void KitaSubjectView::slotContextMenuRequested( QListViewItem* item, const QPoin thread.setName( item->text( Row_Subject ) ); thread.setResNum( item->text( Row_Vested ).toInt() ); + QClipboard* clipboard = QApplication::clipboard(); + switch( popup.exec( point ) ) { case 0: KRun::runURL( thread.url(), "text/html" ); @@ -281,6 +285,9 @@ void KitaSubjectView::slotContextMenuRequested( QListViewItem* item, const QPoin case 1: emit signalShowThreadWithTab( thread ); break; + case 2: + clipboard->setText( thread.name() + "\n" + thread.url().url() ); + break; default: break; } -- 2.11.0