mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
commit
2a6896e57f
@ -156,6 +156,17 @@ void HistoryMenu::aboutToShowClosedTabs()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QAction* arestore = new QAction(tr("Restore All Closed Tabs"), this);
|
||||||
|
QAction* aclrlist = new QAction(tr("Clear list"), this);
|
||||||
|
|
||||||
|
connect(arestore, SIGNAL(triggered()), this, SLOT(restoreAllClosedTabs()));
|
||||||
|
connect(aclrlist, SIGNAL(triggered()), this, SLOT(clearClosedTabsList()));
|
||||||
|
|
||||||
|
m_menuClosedTabs->addAction(arestore);
|
||||||
|
m_menuClosedTabs->addAction(aclrlist);
|
||||||
|
|
||||||
|
m_menuClosedTabs->addSeparator();
|
||||||
|
|
||||||
TabWidget* tabWidget = m_window->tabWidget();
|
TabWidget* tabWidget = m_window->tabWidget();
|
||||||
const QLinkedList<ClosedTabsManager::Tab> closedTabs = tabWidget->closedTabsManager()->allClosedTabs();
|
const QLinkedList<ClosedTabsManager::Tab> closedTabs = tabWidget->closedTabsManager()->allClosedTabs();
|
||||||
int i = 0;
|
int i = 0;
|
||||||
@ -166,15 +177,11 @@ void HistoryMenu::aboutToShowClosedTabs()
|
|||||||
act->setData(i++);
|
act->setData(i++);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_menuClosedTabs->addSeparator();
|
if (i == 0) {
|
||||||
|
arestore->setVisible(false);
|
||||||
if (m_menuClosedTabs->isEmpty()) {
|
aclrlist->setVisible(false);
|
||||||
m_menuClosedTabs->addAction(tr("Empty"))->setEnabled(false);
|
m_menuClosedTabs->addAction(tr("Empty"))->setEnabled(false);
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
m_menuClosedTabs->addAction(tr("Restore All Closed Tabs"), tabWidget, SLOT(restoreAllClosedTabs()));
|
|
||||||
m_menuClosedTabs->addAction(tr("Clear list"), tabWidget, SLOT(clearClosedTabsList()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HistoryMenu::historyEntryActivated()
|
void HistoryMenu::historyEntryActivated()
|
||||||
|
@ -400,7 +400,7 @@ bool RSSManager::addRssFeed(const QUrl &url, const QString &title, const QIcon &
|
|||||||
QImage image = icon.pixmap(16, 16).toImage();
|
QImage image = icon.pixmap(16, 16).toImage();
|
||||||
|
|
||||||
if (image == qIconProvider->emptyWebImage()) {
|
if (image == qIconProvider->emptyWebImage()) {
|
||||||
image.load(":icons/other/feed.png");
|
image.load(":icons/menu/rss.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
query.prepare("INSERT INTO rss (address, title, icon) VALUES(?,?,?)");
|
query.prepare("INSERT INTO rss (address, title, icon) VALUES(?,?,?)");
|
||||||
|
@ -820,7 +820,7 @@ void TabWidget::aboutToShowClosedTabsMenu()
|
|||||||
m_menuTabs->clear();
|
m_menuTabs->clear();
|
||||||
|
|
||||||
QAction* arestore = new QAction(tr("Restore All Closed Tabs"), this);
|
QAction* arestore = new QAction(tr("Restore All Closed Tabs"), this);
|
||||||
QAction* aclrlist = new QAction(tr("Clear list"), this);
|
QAction* aclrlist = new QAction(QIcon::fromTheme("user-trash-full"), tr("Clear list"), this);
|
||||||
|
|
||||||
connect(arestore, SIGNAL(triggered()), this, SLOT(restoreAllClosedTabs()));
|
connect(arestore, SIGNAL(triggered()), this, SLOT(restoreAllClosedTabs()));
|
||||||
connect(aclrlist, SIGNAL(triggered()), this, SLOT(clearClosedTabsList()));
|
connect(aclrlist, SIGNAL(triggered()), this, SLOT(clearClosedTabsList()));
|
||||||
@ -844,7 +844,7 @@ void TabWidget::aboutToShowClosedTabsMenu()
|
|||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
arestore->setVisible(false);
|
arestore->setVisible(false);
|
||||||
aclrlist->setVisible(false);
|
aclrlist->setVisible(false);
|
||||||
m_menuTabs->addAction(tr("Empty"))->setEnabled(false);
|
m_menuTabs->addAction(QIcon::fromTheme("user-trash"), tr("Empty"))->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user