mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 18:56:34 +01:00
Added qupzilla:start page, fixed maximising window issue on Windows
This commit is contained in:
parent
b526e99c0f
commit
afbc2b1a6b
Binary file not shown.
@ -165,8 +165,8 @@ void QupZilla::setupUi()
|
|||||||
QSettings settings(m_activeProfil+"settings.ini", QSettings::IniFormat);
|
QSettings settings(m_activeProfil+"settings.ini", QSettings::IniFormat);
|
||||||
settings.beginGroup("Browser-View-Settings");
|
settings.beginGroup("Browser-View-Settings");
|
||||||
if (settings.value("WindowMaximised", false).toBool()) {
|
if (settings.value("WindowMaximised", false).toBool()) {
|
||||||
setWindowState(Qt::WindowMaximized);
|
|
||||||
resize(800, 550);
|
resize(800, 550);
|
||||||
|
setWindowState(Qt::WindowMaximized);
|
||||||
} else {
|
} else {
|
||||||
setGeometry(settings.value("WindowGeometry", QRect(0, 0, 800, 550)).toRect());
|
setGeometry(settings.value("WindowGeometry", QRect(0, 0, 800, 550)).toRect());
|
||||||
}
|
}
|
||||||
@ -360,7 +360,7 @@ void QupZilla::loadSettings()
|
|||||||
|
|
||||||
//Url settings
|
//Url settings
|
||||||
settings.beginGroup("Web-URL-Settings");
|
settings.beginGroup("Web-URL-Settings");
|
||||||
m_homepage = settings.value("homepage","http://qupzilla.ic.cz/search/").toUrl();
|
m_homepage = settings.value("homepage","qupzilla:start").toUrl();
|
||||||
m_newtab = settings.value("newTabUrl","").toUrl();
|
m_newtab = settings.value("newTabUrl","").toUrl();
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
@ -179,7 +179,6 @@ private slots:
|
|||||||
|
|
||||||
void copy() { QApplication::clipboard()->setText(weView()->selectedText()); }
|
void copy() { QApplication::clipboard()->setText(weView()->selectedText()); }
|
||||||
void selectAll() { weView()->selectAll(); }
|
void selectAll() { weView()->selectAll(); }
|
||||||
void reportBug() { m_tabWidget->addView(QUrl("http://qupzilla.ic.cz/bugzilla/?do=newtask&project=2")); }
|
|
||||||
|
|
||||||
void zoomIn() { weView()->zoomIn(); }
|
void zoomIn() { weView()->zoomIn(); }
|
||||||
void zoomOut() { weView()->zoomOut(); }
|
void zoomOut() { weView()->zoomOut(); }
|
||||||
|
@ -8,5 +8,6 @@
|
|||||||
<file>html/box-border.png</file>
|
<file>html/box-border.png</file>
|
||||||
<file>html/copyright</file>
|
<file>html/copyright</file>
|
||||||
<file>html/reportbug.html</file>
|
<file>html/reportbug.html</file>
|
||||||
|
<file>html/start.html</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
58
src/data/html/start.html
Normal file
58
src/data/html/start.html
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<html><head>
|
||||||
|
<title>%TITLE%</title>
|
||||||
|
<link rel="icon" href="data:image/png;base64,%FAVICON%" type="image/x-icon" />
|
||||||
|
<style>
|
||||||
|
html {
|
||||||
|
background: #eeeeee;
|
||||||
|
font: 13px/22px "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
color: #525c66;
|
||||||
|
}
|
||||||
|
|
||||||
|
#box {
|
||||||
|
max-width: 500px;
|
||||||
|
margin: 25px auto 0px auto;
|
||||||
|
padding: 0px 40px 0px 40px;
|
||||||
|
border-width: 20px;
|
||||||
|
-webkit-border-image: url(data:image/png;base64,%BOX-BORDER%) 25;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 400px;
|
||||||
|
height: 25px;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #babcb8;
|
||||||
|
}
|
||||||
|
.line:focus{
|
||||||
|
border-color: #579eea;
|
||||||
|
}
|
||||||
|
.submit
|
||||||
|
{
|
||||||
|
margin-top: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #1a4ba4;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bottom {
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body onload="document.getElementById('inp').focus()">
|
||||||
|
<div id="box">
|
||||||
|
<center>
|
||||||
|
|
||||||
|
<img src="data:image/png;base64,%ABOUT-IMG%"">
|
||||||
|
<form action="http://www.google.com/search?client=qupzilla" method="GET">
|
||||||
|
<input class="line" id="inp" class="question" name="q"/> <br/>
|
||||||
|
<input class="submit" type="submit" name="search" value="%BUTTON-LABEL%">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p class="bottom">%SEARCH-BY-GOOGLE% | <a href="%WWW%">%ABOUT-QUPZILLA%</a></p>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
</body></html>
|
Binary file not shown.
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 9.9 KiB |
@ -45,7 +45,7 @@ QupZillaSchemeReply::QupZillaSchemeReply(const QNetworkRequest &req, QObject *pa
|
|||||||
setUrl(req.url());
|
setUrl(req.url());
|
||||||
|
|
||||||
m_pageName = req.url().path();
|
m_pageName = req.url().path();
|
||||||
if (m_pageName == "about" || m_pageName == "reportbug") {
|
if (m_pageName == "about" || m_pageName == "reportbug" || m_pageName == "start") {
|
||||||
m_buffer.open(QIODevice::ReadWrite);
|
m_buffer.open(QIODevice::ReadWrite);
|
||||||
setError(QNetworkReply::NoError, tr("No Error"));
|
setError(QNetworkReply::NoError, tr("No Error"));
|
||||||
|
|
||||||
@ -64,6 +64,8 @@ void QupZillaSchemeReply::loadPage()
|
|||||||
stream << aboutPage();
|
stream << aboutPage();
|
||||||
else if (m_pageName == "reportbug")
|
else if (m_pageName == "reportbug")
|
||||||
stream << reportbugPage();
|
stream << reportbugPage();
|
||||||
|
else if (m_pageName == "start")
|
||||||
|
stream << startPage();
|
||||||
|
|
||||||
stream.flush();
|
stream.flush();
|
||||||
m_buffer.reset();
|
m_buffer.reset();
|
||||||
@ -119,6 +121,23 @@ QString QupZillaSchemeReply::reportbugPage()
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString QupZillaSchemeReply::startPage()
|
||||||
|
{
|
||||||
|
QString page;
|
||||||
|
page.append(qz_readAllFileContents(":html/start.html"));
|
||||||
|
page.replace("%FAVICON%", qz_pixmapToByteArray(QPixmap(":icons/qupzilla.png")));
|
||||||
|
page.replace("%BOX-BORDER%", qz_pixmapToByteArray(QPixmap(":html/box-border.png")));
|
||||||
|
page.replace("%ABOUT-IMG%", qz_pixmapToByteArray(QPixmap(":icons/other/about.png")));
|
||||||
|
|
||||||
|
page.replace("%TITLE%", tr("Start Page"));
|
||||||
|
page.replace("%BUTTON-LABEL%", tr("Google Search"));
|
||||||
|
page.replace("%SEARCH-BY-GOOGLE%", tr("Search results provided by Google"));
|
||||||
|
page.replace("%WWW%", QupZilla::WWWADDRESS);
|
||||||
|
page.replace("%ABOUT-QUPZILLA%", tr("About QupZilla"));
|
||||||
|
|
||||||
|
return page;
|
||||||
|
}
|
||||||
|
|
||||||
QString QupZillaSchemeReply::aboutPage()
|
QString QupZillaSchemeReply::aboutPage()
|
||||||
{
|
{
|
||||||
QString page;
|
QString page;
|
||||||
|
@ -58,6 +58,7 @@ private slots:
|
|||||||
private:
|
private:
|
||||||
QString aboutPage();
|
QString aboutPage();
|
||||||
QString reportbugPage();
|
QString reportbugPage();
|
||||||
|
QString startPage();
|
||||||
|
|
||||||
QBuffer m_buffer;
|
QBuffer m_buffer;
|
||||||
QString m_pageName;
|
QString m_pageName;
|
||||||
|
@ -78,7 +78,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
|
|||||||
QSettings settings(mApp->getActiveProfilPath()+"settings.ini", QSettings::IniFormat);
|
QSettings settings(mApp->getActiveProfilPath()+"settings.ini", QSettings::IniFormat);
|
||||||
//GENERAL URLs
|
//GENERAL URLs
|
||||||
settings.beginGroup("Web-URL-Settings");
|
settings.beginGroup("Web-URL-Settings");
|
||||||
m_homepage = settings.value("homepage","http://qupzilla.ic.cz/search/").toString();
|
m_homepage = settings.value("homepage","qupzilla:start").toString();
|
||||||
m_newTabUrl = settings.value("newTabUrl","").toString();
|
m_newTabUrl = settings.value("newTabUrl","").toString();
|
||||||
ui->homepage->setText(m_homepage);
|
ui->homepage->setText(m_homepage);
|
||||||
ui->newTabUrl->setText(m_newTabUrl);
|
ui->newTabUrl->setText(m_newTabUrl);
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user