diff options
author | Mavridis Philippe <[email protected]> | 2021-01-14 19:25:52 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2021-01-14 19:25:52 +0200 |
commit | 64816b38dabe0bb0b2424c45146460122a203715 (patch) | |
tree | 9db2365e7e468b1fba8cc90939381ee6090c834e /src | |
parent | 677a0585e03bf9728c873ef42b01426a5c87e9f6 (diff) | |
download | klamav-64816b38dabe0bb0b2424c45146460122a203715.tar.gz klamav-64816b38dabe0bb0b2424c45146460122a203715.zip |
TabWidget: code cleanup
Most of the removed code relates to Akregator and is unused by KlamAV.
Signed-off-by: Mavridis Philippe <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/tabwidget.cpp | 32 | ||||
-rw-r--r-- | src/tabwidget.h | 2 |
2 files changed, 1 insertions, 33 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; diff --git a/src/tabwidget.h b/src/tabwidget.h index 37bd4b4..c16a2f8 100644 --- a/src/tabwidget.h +++ b/src/tabwidget.h @@ -42,8 +42,6 @@ class TabWidget:public KTabWidget private slots: - void slotDetachTab(); - void slotCopyLinkAddress(); void slotCloseTab(); void slotCloseRequest(TQWidget* widget); void contextMenu (int item, const TQPoint &p); |