summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainview.cpp54
-rw-r--r--src/mainview.h11
-rw-r--r--src/mainwindow.cpp1
3 files changed, 2 insertions, 64 deletions
diff --git a/src/mainview.cpp b/src/mainview.cpp
index ce43cbc2..d6c97511 100644
--- a/src/mainview.cpp
+++ b/src/mainview.cpp
@@ -61,8 +61,6 @@
MainView::MainView(QWidget *parent)
: KTabWidget(parent)
- , m_recentlyClosedTabsAction(0)
- , m_recentlyClosedTabsMenu(new KMenu(this))
, m_urlBars(new StackedUrlBar(this))
, m_tabBar(new TabBar(this))
, m_addTabButton(new QToolButton(this))
@@ -101,14 +99,6 @@ void MainView::postLaunch()
m_addTabButton->setDefaultAction(Application::instance()->mainWindow()->actionByName("new_tab"));
m_addTabButton->setAutoRaise(true);
m_addTabButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
-
-
- // Recently Closed Tab Action
- connect(m_recentlyClosedTabsMenu, SIGNAL(aboutToShow()), this, SLOT(aboutToShowRecentTabsMenu()));
- connect(m_recentlyClosedTabsMenu, SIGNAL(triggered(QAction *)), this, SLOT(aboutToShowRecentTriggeredAction(QAction *)));
- m_recentlyClosedTabsAction = new KAction(i18n("Recently Closed Tabs"), this);
- m_recentlyClosedTabsAction->setMenu(m_recentlyClosedTabsMenu);
- m_recentlyClosedTabsAction->setEnabled(false);
}
@@ -173,12 +163,6 @@ int MainView::webViewIndex(WebView *webView) const
}
-KAction *MainView::recentlyClosedTabsAction() const
-{
- return m_recentlyClosedTabsAction;
-}
-
-
void MainView::setMakeBackTab(bool b)
{
m_makeBackTab = b;
@@ -284,8 +268,6 @@ void MainView::slotWebPaste()
void MainView::clear()
{
- // clear the recently closed tabs
- m_recentlyClosedTabs.clear();
// clear the line edit history
for (int i = 0; i < m_urlBars->count(); ++i)
{
@@ -529,20 +511,6 @@ void MainView::slotCloseTab(int index)
return;
}
hasFocus = tab->hasFocus();
-
- m_recentlyClosedTabsAction->setEnabled(true);
- m_recentlyClosedTabs.prepend(tab->url());
-
- // don't add empty urls
- if (tab->url().isValid())
- {
- m_recentlyClosedTabs.prepend(tab->url());
- }
-
- if (m_recentlyClosedTabs.size() >= MainView::m_recentlyClosedTabsSize)
- {
- m_recentlyClosedTabs.removeLast();
- }
}
QWidget *urlBar = m_urlBars->urlBar(index);
@@ -678,28 +646,6 @@ void MainView::webViewUrlChanged(const QUrl &url)
}
-void MainView::aboutToShowRecentTabsMenu()
-{
- m_recentlyClosedTabsMenu->clear();
- for (int i = 0; i < m_recentlyClosedTabs.count(); ++i)
- {
- KAction *action = new KAction(m_recentlyClosedTabsMenu);
- action->setData(m_recentlyClosedTabs.at(i));
- QIcon icon = Application::instance()->icon(m_recentlyClosedTabs.at(i));
- action->setIcon(icon);
- action->setText(m_recentlyClosedTabs.at(i).prettyUrl());
- m_recentlyClosedTabsMenu->addAction(action);
- }
-}
-
-
-void MainView::aboutToShowRecentTriggeredAction(QAction *action)
-{
- KUrl url = action->data().toUrl();
- loadUrl(url);
-}
-
-
void MainView::loadUrl(const KUrl &url)
{
if (url.isEmpty())
diff --git a/src/mainview.h b/src/mainview.h
index 8ff32473..9ee2f12a 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -133,8 +133,8 @@ public slots:
private slots:
void slotCurrentChanged(int index);
- void aboutToShowRecentTabsMenu();
- void aboutToShowRecentTriggeredAction(QAction *action); // need QAction!
+// void aboutToShow/*Rec*/entTabsMenu();
+// void aboutToShowRecentTriggeredAction(QAction *action); // need QAction!
void webViewLoadStarted();
void webViewLoadProgress(int progress);
@@ -177,12 +177,6 @@ private:
*/
QLabel *animatedLoading(int index, bool addMovie);
- static const int m_recentlyClosedTabsSize = 10;
- KAction *m_recentlyClosedTabsAction;
-
- KMenu *m_recentlyClosedTabsMenu;
- QList<KUrl> m_recentlyClosedTabs;
-
StackedUrlBar *m_urlBars;
TabBar *m_tabBar;
@@ -194,4 +188,3 @@ private:
};
#endif
-
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 0cae2ab6..3faa4699 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -357,7 +357,6 @@ void MainWindow::setupHistoryMenu()
QList<QAction*> historyActions;
historyActions.append(actionCollection()->action("history_back"));
historyActions.append(actionCollection()->action("history_forward"));
- historyActions.append(m_view->recentlyClosedTabsAction());
historyMenu->setInitialActions(historyActions);
}