summaryrefslogtreecommitdiffstats
path: root/src/tabwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tabwidget.cpp')
-rw-r--r--src/tabwidget.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp
index a001fb2..92bd8aa 100644
--- a/src/tabwidget.cpp
+++ b/src/tabwidget.cpp
@@ -14,11 +14,8 @@
#include <ktabbar.h>
#include <tdepopupmenu.h>
#include <tdelocale.h>
-#include <tdehtmlview.h>
-#include <tdehtml_part.h>
#include <kiconloader.h>
-//#include "akregatorconfig.h"
using namespace KlamAV;
@@ -152,41 +149,14 @@ void TabWidget::contextMenu(int i, const TQPoint &p)
{
currentItem = page(i);
TDEPopupMenu popup;
- //popup.insertTitle(tabLabel(currentItem));
- //int detachTab = popup.insertItem( SmallIcon("tab_breakoff"), i18n("Detach Tab"), this, SLOT( slotDetachTab() ) );
- //int copyLink = popup.insertItem( i18n("Copy Link Address"), this, SLOT( slotCopyLinkAddress() ) );
- //popup.insertSeparator();
+
int closeTab = popup.insertItem( SmallIcon("tab_remove"), i18n("Close Tab"), this, SLOT( slotCloseTab() ) );
if(indexOf(currentItem) == 0) { // you can't detach or close articles tab..
- // popup.setItemEnabled(detachTab, false);
popup.setItemEnabled(closeTab, false);
- //popup.setItemEnabled(copyLink, false);
}
popup.exec(p);
}
-void TabWidget::slotDetachTab()
-{
- if(!currentItem) return;
- KURL url;
- if (TDEHTMLView *view = dynamic_cast<TDEHTMLView*>(currentItem)) url = view->part()->url();
- else return;
- kapp->invokeBrowser(url.url(), "0");
- removePage(currentItem);
- delete currentItem;
- currentItem = 0;
-}
-
-void TabWidget::slotCopyLinkAddress()
-{
- if(!currentItem) return;
- KURL url;
- if (TDEHTMLView *view = dynamic_cast<TDEHTMLView*>(currentItem)) url = view->part()->url();
- else return;
- TQClipboard *cb = TQApplication::clipboard();
- if(cb) cb->setText(url.prettyURL());
-}
-
void TabWidget::slotCloseTab()
{
if(!currentItem) return;