mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
Backend implementation for #80
- not sure where to put option to add page to speed dial in gui * I think it couldn't be as another "folder" when editing/creating bookmarks, as it's not a real bookmark
This commit is contained in:
parent
d9b5c86dbe
commit
4b089713ed
|
@ -132,8 +132,8 @@ function allPages() {
|
|||
var titles = $('span[class="boxTitle"]');
|
||||
var value = "";
|
||||
$('div.entry').each(function(i) {
|
||||
var url = $(this).children('a').first().attr('href');
|
||||
var title = $(this).children('span[class="boxTitle"]').first().text();
|
||||
var url = $(this).children('a').first().attr('href').replace('"', '').replace(';','');
|
||||
var title = $(this).children('span[class="boxTitle"]').first().text().replace('"', '').replace(';','');
|
||||
value += 'url:"' + url + '"|title:"' + title + '";';
|
||||
});
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ QString QupZillaSchemeReply::reportbugPage()
|
|||
bPage.replace("%TITLE%", tr("Report Issue"));
|
||||
bPage.replace("%REPORT-ISSUE%", tr("Report Issue"));
|
||||
bPage.replace("%PLUGINS-TEXT%", tr("If you are experiencing problems with QupZilla, please try first disable"
|
||||
" all plugins. <br/>If it won't help, then please fill this form: "));
|
||||
" all plugins. <br/>If it won't help, then please fill this form: "));
|
||||
bPage.replace("%EMAIL%", tr("Your E-mail"));
|
||||
bPage.replace("%TYPE%", tr("Issue type"));
|
||||
bPage.replace("%DESCRIPTION%", tr("Issue description"));
|
||||
|
@ -183,38 +183,38 @@ QString QupZillaSchemeReply::aboutPage()
|
|||
aPage.replace("%COPYRIGHT%", tr("Copyright"));
|
||||
|
||||
aPage.replace("%VERSION-INFO%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Version"), QupZilla::VERSION) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Build time"), QupZilla::BUILDTIME) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), qz_buildSystem()));
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Version"), QupZilla::VERSION) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("WebKit version"), QupZilla::WEBKITVERSION) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Build time"), QupZilla::BUILDTIME) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Platform"), qz_buildSystem()));
|
||||
aPage.replace("%USER-AGENT%", WebPage::UserAgent);
|
||||
aPage.replace("%PATHS-TEXT%",
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), mApp->getActiveProfilPath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Settings"), mApp->getActiveProfilPath() + "settings.ini") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Saved session"), mApp->getActiveProfilPath() + "session.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Data"), mApp->DATADIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Themes"), mApp->THEMESDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Plugins"), mApp->PLUGINSDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Translations"), mApp->TRANSLATIONSDIR));
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Profile"), mApp->getActiveProfilPath()) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Settings"), mApp->getActiveProfilPath() + "settings.ini") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Saved session"), mApp->getActiveProfilPath() + "session.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Pinned tabs"), mApp->getActiveProfilPath() + "pinnedtabs.dat") +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Data"), mApp->DATADIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Themes"), mApp->THEMESDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Plugins"), mApp->PLUGINSDIR) +
|
||||
QString("<dt>%1</dt><dd>%2<dd>").arg(tr("Translations"), mApp->TRANSLATIONSDIR));
|
||||
aPage.replace("%MAIN-DEVELOPER%", tr("Main developer"));
|
||||
aPage.replace("%MAIN-DEVELOPER-TEXT%", authorString(QupZilla::AUTHOR, "nowrep@gmail.com"));
|
||||
aPage.replace("%CONTRIBUTORS%", tr("Contributors"));
|
||||
aPage.replace("%CONTRIBUTORS-TEXT%", authorString("Bryan M Dunsmore", "dunsmoreb@gmail.com") + "<br/>" +
|
||||
authorString("Daniele Cocca", "jmc@chakra-project.org") + "<br/>" +
|
||||
authorString("Jan Rajnoha", "honza.rajny@hotmail.com")
|
||||
);
|
||||
authorString("Daniele Cocca", "jmc@chakra-project.org") + "<br/>" +
|
||||
authorString("Jan Rajnoha", "honza.rajny@hotmail.com")
|
||||
);
|
||||
aPage.replace("%TRANSLATORS%", tr("Translators"));
|
||||
aPage.replace("%TRANSLATORS-TEXT%", authorString("Heimen Stoffels", "vistausss@gmail.com") + " (Dutch)<br/>" +
|
||||
authorString("Peter Vacula", "pvacula1989@gmail.com") + " (Slovak)<br/>" +
|
||||
authorString("Ján Ďanovský", "dagsoftware@yahoo.com") + " (Slovak)<br/>" +
|
||||
authorString("Jonathan Hooverman", "jonathan.hooverman@gmail.com") + " (German)<br/>" +
|
||||
authorString("Unink-Lio", "unink4451@163.com") + " (Chinese)<br/>" +
|
||||
authorString("Federico Fabiani", "federico.fabiani85@gmail.com") + " (Italy)<br/>" +
|
||||
authorString("Francesco Marinucci", "framarinucci@gmail.com") + " (Italy)<br/>" +
|
||||
authorString("Jorge Sevilla", "jsevi@ozu.es") + " (Spanish)<br/>" +
|
||||
authorString("Michał Szymanowski", "tylkobuba@gmail.com") + " (Polish)"
|
||||
);
|
||||
authorString("Peter Vacula", "pvacula1989@gmail.com") + " (Slovak)<br/>" +
|
||||
authorString("Ján Ďanovský", "dagsoftware@yahoo.com") + " (Slovak)<br/>" +
|
||||
authorString("Jonathan Hooverman", "jonathan.hooverman@gmail.com") + " (German)<br/>" +
|
||||
authorString("Unink-Lio", "unink4451@163.com") + " (Chinese)<br/>" +
|
||||
authorString("Federico Fabiani", "federico.fabiani85@gmail.com") + " (Italy)<br/>" +
|
||||
authorString("Francesco Marinucci", "framarinucci@gmail.com") + " (Italy)<br/>" +
|
||||
authorString("Jorge Sevilla", "jsevi@ozu.es") + " (Spanish)<br/>" +
|
||||
authorString("Michał Szymanowski", "tylkobuba@gmail.com") + " (Polish)"
|
||||
);
|
||||
|
||||
return aPage;
|
||||
}
|
||||
|
|
|
@ -66,6 +66,28 @@ void SpeedDial::addWebFrame(QWebFrame* frame)
|
|||
}
|
||||
}
|
||||
|
||||
void SpeedDial::addPage(const QUrl &url, const QString &title)
|
||||
{
|
||||
if (url.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
QString sitePair = QString("url:\"%1\"|title:\"%2\";").arg(url.toString(), title);
|
||||
|
||||
m_allPages.append(sitePair);
|
||||
|
||||
for (int i = 0; i < m_webFrames.count(); i++) {
|
||||
QWebFrame* frame = m_webFrames.at(i).data();
|
||||
if (!frame) {
|
||||
m_webFrames.removeAt(i);
|
||||
i--;
|
||||
continue;
|
||||
}
|
||||
|
||||
frame->page()->triggerAction(QWebPage::Reload);
|
||||
}
|
||||
}
|
||||
|
||||
QString SpeedDial::initialScript()
|
||||
{
|
||||
if (!m_loaded) {
|
||||
|
|
|
@ -38,6 +38,8 @@ public:
|
|||
|
||||
void addWebFrame(QWebFrame* frame);
|
||||
|
||||
void addPage(const QUrl &url, const QString &title);
|
||||
|
||||
QString initialScript();
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in New Issue
Block a user