mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
Added Restore All Closed Tabs option to ClosedTabsManager
This commit is contained in:
parent
bac1f5d78d
commit
8ab4dc75df
Binary file not shown.
@ -701,8 +701,11 @@ void QupZilla::aboutToShowHistoryMenu()
|
||||
menuClosedTabs->addAction(_iconForUrl(tab.url), title, m_tabWidget, SLOT(restoreClosedTab()))->setData(i);
|
||||
i++;
|
||||
}
|
||||
menuClosedTabs->addSeparator();
|
||||
if (i == 0)
|
||||
menuClosedTabs->addAction(tr("Empty"))->setEnabled(false);
|
||||
else
|
||||
menuClosedTabs->addAction(tr("Restore All Closed Tabs"), m_tabWidget, SLOT(restoreAllClosedTabs()));
|
||||
|
||||
m_menuHistory->addMenu(menuClosedTabs);
|
||||
}
|
||||
|
@ -47,3 +47,8 @@ bool ClosedTabsManager::isClosedTabAvailable()
|
||||
{
|
||||
return (m_closedTabs.count() != 0);
|
||||
}
|
||||
|
||||
void ClosedTabsManager::clearList()
|
||||
{
|
||||
m_closedTabs.clear();
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ public:
|
||||
ClosedTabsManager::Tab getTabAt(int index);
|
||||
|
||||
bool isClosedTabAvailable();
|
||||
void clearList();
|
||||
|
||||
QList<ClosedTabsManager::Tab> allClosedTabs() { return m_closedTabs; }
|
||||
|
||||
|
@ -350,6 +350,22 @@ void TabWidget::restoreClosedTab()
|
||||
weView(index)->load(tab.url);
|
||||
}
|
||||
|
||||
void TabWidget::restoreAllClosedTabs()
|
||||
{
|
||||
if (!m_closedTabsManager->isClosedTabAvailable())
|
||||
return;
|
||||
|
||||
QList<ClosedTabsManager::Tab> closedTabs = m_closedTabsManager->allClosedTabs();
|
||||
foreach (ClosedTabsManager::Tab tab, closedTabs) {
|
||||
int index = addView(QUrl(), tab.title);
|
||||
QDataStream historyStream(tab.history);
|
||||
historyStream >> *weView(index)->history();
|
||||
|
||||
weView(index)->load(tab.url);
|
||||
}
|
||||
m_closedTabsManager->clearList();
|
||||
}
|
||||
|
||||
bool TabWidget::canRestoreTab()
|
||||
{
|
||||
return m_closedTabsManager->isClosedTabAvailable();
|
||||
|
@ -67,6 +67,7 @@ public slots:
|
||||
void duplicateTab(int index);
|
||||
void closeAllButCurrent(int index);
|
||||
void restoreClosedTab();
|
||||
void restoreAllClosedTabs();
|
||||
|
||||
private slots:
|
||||
void aboutToShowTabsMenu();
|
||||
|
@ -2285,17 +2285,17 @@ nebyl nalezen!</translation>
|
||||
<translation>Poslat odkaz...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="759"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="762"/>
|
||||
<source>Other</source>
|
||||
<translation>Ostatní</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="768"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="771"/>
|
||||
<source>Default</source>
|
||||
<translation>Defaultní</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1122"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1125"/>
|
||||
<source>Start Private Browsing</source>
|
||||
<translation>Spustit anonymní prohlížení</translation>
|
||||
</message>
|
||||
@ -2333,7 +2333,7 @@ nebyl nalezen!</translation>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="620"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="640"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="705"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="706"/>
|
||||
<source>Empty</source>
|
||||
<translation>Prázdný</translation>
|
||||
</message>
|
||||
@ -2383,108 +2383,113 @@ nebyl nalezen!</translation>
|
||||
<translation>Zavřené panely</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="713"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="708"/>
|
||||
<source>Restore All Closed Tabs</source>
|
||||
<translation>Obnovit všechny zavřené panely</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="716"/>
|
||||
<source>Report &Bug</source>
|
||||
<translation>Nahlásit &bug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="716"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="719"/>
|
||||
<source>About &Qt</source>
|
||||
<translation>O &Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="717"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="720"/>
|
||||
<source>&About QupZilla</source>
|
||||
<translation>&O QupZille</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="723"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="726"/>
|
||||
<source>&Web Search</source>
|
||||
<translation>Hledání na &webu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="724"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="727"/>
|
||||
<source>Page &Info</source>
|
||||
<translation>Informace o &stránce</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="726"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="729"/>
|
||||
<source>&Download Manager</source>
|
||||
<translation>Správce s&tahování</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="727"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="730"/>
|
||||
<source>&Cookies Manager</source>
|
||||
<translation>Správce coo&kies</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="728"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="731"/>
|
||||
<source>&AdBlock</source>
|
||||
<translation>&AdBlock</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="729"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="732"/>
|
||||
<source>RSS &Reader</source>
|
||||
<translation>&RSS čtečka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="730"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="733"/>
|
||||
<source>Clear Recent &History</source>
|
||||
<translation>Vymazat nedá&vnou historii</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="731"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="734"/>
|
||||
<source>&Private Browsing</source>
|
||||
<translation>Soukromé prohlíž&ení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="738"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="741"/>
|
||||
<source>Pr&eferences</source>
|
||||
<translation>Předvo&lby</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1003"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1004"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1006"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1007"/>
|
||||
<source>Web Inspector</source>
|
||||
<translation>Web Inspektor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1046"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1049"/>
|
||||
<source>Open file...</source>
|
||||
<translation>Otevřít soubor...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1109"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1112"/>
|
||||
<source>Are you sure you want to turn on private browsing?</source>
|
||||
<translation>Jste si jistý že chcete zapnout soukromé prohlížení?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1110"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1113"/>
|
||||
<source>When private browsing is turned on, some actions concerning your privacy will be disabled:</source>
|
||||
<translation>Se zapnutým soukromým prohlížením jsou některé akce týkající se soukromí vypnuty:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1113"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1116"/>
|
||||
<source>Webpages are not added to the history.</source>
|
||||
<translation>Stránky nejsou přidávány do historie.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1114"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1117"/>
|
||||
<source>New cookies are not stored, but current cookies can be accessed.</source>
|
||||
<translation>Nové cookies nejsou přijímány, ale současné cookies jsou zasílány.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1115"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1118"/>
|
||||
<source>Your session won't be stored.</source>
|
||||
<translation>Vaše relace nebude uložena.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1117"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1120"/>
|
||||
<source>Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened.</source>
|
||||
<translation>Než zavřete prohlížeč, stále můžete použít tlačítka Zpět a Vpřed k vrácení se na stránky které jste otevřeli.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1161"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1164"/>
|
||||
<source>There are still %1 open tabs and your session won't be stored. Are you sure to quit?</source>
|
||||
<translation>Ještě je otevřeno %1 panelů a Vaše relace nebude uložena. Opravdu chcete skončit?</translation>
|
||||
</message>
|
||||
|
@ -2287,17 +2287,17 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Poslať odkaz...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="759"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="762"/>
|
||||
<source>Other</source>
|
||||
<translation>Ostatné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="768"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="771"/>
|
||||
<source>Default</source>
|
||||
<translation>Základné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1122"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1125"/>
|
||||
<source>Start Private Browsing</source>
|
||||
<translation>Spustiť anonymné prehliadanie</translation>
|
||||
</message>
|
||||
@ -2334,7 +2334,7 @@ p, li { white-space: pre-wrap; }
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="620"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="640"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="705"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="706"/>
|
||||
<source>Empty</source>
|
||||
<translation>Prázdny</translation>
|
||||
</message>
|
||||
@ -2384,108 +2384,113 @@ p, li { white-space: pre-wrap; }
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="713"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="708"/>
|
||||
<source>Restore All Closed Tabs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="716"/>
|
||||
<source>Report &Bug</source>
|
||||
<translation>Nahlásiť &chybu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="716"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="719"/>
|
||||
<source>About &Qt</source>
|
||||
<translation>O &Qt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="717"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="720"/>
|
||||
<source>&About QupZilla</source>
|
||||
<translation>&O QupZille</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="723"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="726"/>
|
||||
<source>&Web Search</source>
|
||||
<translation>Hladať na &webu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="724"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="727"/>
|
||||
<source>Page &Info</source>
|
||||
<translation>&Informácie o stránke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="726"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="729"/>
|
||||
<source>&Download Manager</source>
|
||||
<translation>Správca &sťahovania</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="727"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="730"/>
|
||||
<source>&Cookies Manager</source>
|
||||
<translation>Správca &cookies</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="728"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="731"/>
|
||||
<source>&AdBlock</source>
|
||||
<translation>&AdBlock</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="729"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="732"/>
|
||||
<source>RSS &Reader</source>
|
||||
<translation>&RSS čítač</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="730"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="733"/>
|
||||
<source>Clear Recent &History</source>
|
||||
<translation>Vymazať nedávnu &históriu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="731"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="734"/>
|
||||
<source>&Private Browsing</source>
|
||||
<translation>Súkromné prehlia&danie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="738"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="741"/>
|
||||
<source>Pr&eferences</source>
|
||||
<translation>Pr&edvoľby</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1003"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1004"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1006"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1007"/>
|
||||
<source>Web Inspector</source>
|
||||
<translation>Web inšpektor</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1046"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1049"/>
|
||||
<source>Open file...</source>
|
||||
<translation>Otvoriť súbor...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1109"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1112"/>
|
||||
<source>Are you sure you want to turn on private browsing?</source>
|
||||
<translation>Ste si istý, že chcete zapnúť súkromné prehliadanie?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1110"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1113"/>
|
||||
<source>When private browsing is turned on, some actions concerning your privacy will be disabled:</source>
|
||||
<translation>So zapnutým súkromným prehliadaním sú niektoré akcie týkajúce sa súkromia vypnuté:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1113"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1116"/>
|
||||
<source>Webpages are not added to the history.</source>
|
||||
<translation>Stránky nie sú pridávané do histórie.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1114"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1117"/>
|
||||
<source>New cookies are not stored, but current cookies can be accessed.</source>
|
||||
<translation>Nové cookies nie sú prijímané, ale súčasné cookies sú zasielané.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1115"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1118"/>
|
||||
<source>Your session won't be stored.</source>
|
||||
<translation>Vaša relácia nebude uložená.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1117"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1120"/>
|
||||
<source>Until you close the window, you can still click the Back and Forward buttons to return to the webpages you have opened.</source>
|
||||
<translation>Dokiaľ nezavriete prehliadač, tak stále môžete používať tlačidla Späť a Dopredu k vráteniu sa na stránky, ktoré ste mali otvorené.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1161"/>
|
||||
<location filename="../src/app/qupzilla.cpp" line="1164"/>
|
||||
<source>There are still %1 open tabs and your session won't be stored. Are you sure to quit?</source>
|
||||
<translation>Stále sú otvorené %1 panely a Vaša relácia nebude uložená. Skutočne chcete skončiť?</translation>
|
||||
</message>
|
||||
|
Loading…
Reference in New Issue
Block a user