Make the about: protocol return about: links to the various konqueror pages, and not links to local pages;

also serve the right contents for the various sections.
Based on a patch by Daniel Teske, thanks!

BUG: 102612

svn path=/trunk/KDE/kdebase/apps/; revision=904236
This commit is contained in:
Pino Toscano 2009-01-01 17:46:35 +00:00
parent 664dcd2251
commit 4344a6f563
5 changed files with 30 additions and 24 deletions

View file

@ -41,10 +41,10 @@
%6<br />
<!-- Konqueror is your file manager, web browser and universal document viewer. -->
<ul>
<li><a href="launch.html">%7</a><!--launch--></li>
<li><a href="about:konqueror">%7</a><!--launch--></li>
<li><a class="selected">%8<!-- introduction --></a></li>
<li><a href="tips.html">%9<!--tips--></a></li>
<li><a href="specs.html">%10<!-- specs --></a></li>
<li><a href="about:konqueror/tips">%9<!--tips--></a></li>
<li><a href="about:konqueror/specs">%10<!-- specs --></a></li>
</ul>
</div>
</div>
@ -75,7 +75,7 @@
"lightning.png" align="left" alt="" /></td><td valign=top>%16</td></tr></table>
<!--Tuning tip...--></p>
<p id="nextlink"><a href="tips.html">%17&nbsp;%18
<p id="nextlink"><a href="about:konqueror/tips">%17&nbsp;%18
<!-- Continue --></a></p>
</div>
</div>

View file

@ -243,7 +243,7 @@ QString KonqAboutPageSingleton::specs()
.arg( i18n("Popup"))
.arg( i18n("(Short-) Automatic"))
.arg( "<img width='16' height='16' src=\"%1\">" ).arg( continue_icon_path )
.arg( i18nc("Link that points to the first page of the Konqueror 'about page', Starting Points contains links to Home, Network Folders, Trash, etc.", "<a href=\"%1\">Return to Starting Points</a>", QString("launch.html")) )
.arg( i18nc("Link that points to the first page of the Konqueror 'about page', Starting Points contains links to Home, Network Folders, Trash, etc.", "<a href=\"%1\">Return to Starting Points</a>", QString("about:konqueror")) )
;
@ -378,6 +378,12 @@ bool KonqAboutPage::openUrl(const KUrl &u)
emit started(0);
if (u.url() == "about:plugins")
serve(s_staticData->plugins(), "plugins");
else if (u.url() == "about:konqueror/intro")
serve(s_staticData->intro(), "konqueror/intro");
else if (u.url() == "about:konqueror/specs")
serve(s_staticData->specs(), "konqueror/specs");
else if (u.url() == "about:konqueror/tips")
serve(s_staticData->tips(), "konqueror/tips");
else
serve(s_staticData->launch(), "konqueror");
emit completed();
@ -425,28 +431,28 @@ bool KonqAboutPage::urlSelected( const QString &url, int button, int state, cons
return true;
}
if ( url == QLatin1String("launch.html") )
if ( url == QLatin1String("about:konqueror") )
{
emit browserExtension()->openUrlNotify();
serve(s_staticData->launch(), "konqueror");
return true;
}
else if ( url == QLatin1String("intro.html") )
else if ( url == QLatin1String("about:konqueror/intro") )
{
emit browserExtension()->openUrlNotify();
serve(s_staticData->intro(), "konqueror");
serve(s_staticData->intro(), "konqueror/intro");
return true;
}
else if ( url == QLatin1String("specs.html") )
else if ( url == QLatin1String("about:konqueror/specs") )
{
emit browserExtension()->openUrlNotify();
serve(s_staticData->specs(), "konqueror");
serve(s_staticData->specs(), "konqueror/specs");
return true;
}
else if ( url == QLatin1String("tips.html") )
else if ( url == QLatin1String("about:konqueror/tips") )
{
emit browserExtension()->openUrlNotify();
serve(s_staticData->tips(), "konqueror");
serve(s_staticData->tips(), "konqueror/tips");
return true;
}

View file

@ -42,9 +42,9 @@
<!-- Konqueror is your file manager, web browser and universal document viewer. -->
<ul>
<li><a class="selected">%7<!--launch--></a></li>
<li><a href="intro.html">%8<!-- intro --></a></li>
<li><a href="tips.html">%9</a><!--tips--></li>
<li><a href="specs.html">%10<!-- specs --></a></li>
<li><a href="about:konqueror/intro">%8<!-- intro --></a></li>
<li><a href="about:konqueror/tips">%9</a><!--tips--></li>
<li><a href="about:konqueror/specs">%10<!-- specs --></a></li>
</ul>
</div>
</div>
@ -92,7 +92,7 @@
</tr>
<tr><td colspan="5" height=".25em">&nbsp;</td></tr>
</table>
<p id="nextlink"><a href="intro.html"><img src="%33" width="%34" height="%35">&nbsp;%36
<p id="nextlink"><a href="about:konqueror/intro"><img src="%33" width="%34" height="%35">&nbsp;%36
<!-- Continue --></a></p>
</div>

View file

@ -41,9 +41,9 @@
%6<br />
<!-- Konqueror is your file manager, web browser and universal document viewer. -->
<ul>
<li><a href="launch.html">%7</a><!--launch--></li>
<li><a href="intro.html">%8<!-- intro --></a></li>
<li><a href="tips.html">%9<!--tips--></a></li>
<li><a href="about:konqueror">%7</a><!--launch--></li>
<li><a href="about:konqueror/intro">%8<!-- intro --></a></li>
<li><a href="about:konqueror/tips">%9<!--tips--></a></li>
<li><a class="selected">%10<!-- specs --></a></li>
</ul>
</div>
@ -187,7 +187,7 @@
</table>
<p id="nextlink">
<a href="intro.html">%48&nbsp;%49<!-- Back to the Introduction --></a>
<a href="about:konqueror">%48&nbsp;%49<!-- Back to the Introduction --></a>
</p>
</div>
</div>

View file

@ -41,10 +41,10 @@
%6<br />
<!-- Konqueror is your file manager, web browser and universal document viewer. -->
<ul>
<li><a href="launch.html">%7</a><!--launch--></li>
<li><a href="intro.html">%8<!-- intro --></a></li>
<li><a href="about:konqueror">%7</a><!--launch--></li>
<li><a href="about:konqueror/intro">%8<!-- intro --></a></li>
<li><a class="selected">%9<!--tips--></a></li>
<li><a href="specs.html">%10<!-- specs --></a></li>
<li><a href="about:konqueror/specs">%10<!-- specs --></a></li>
</ul>
</div>
</div>
@ -110,7 +110,7 @@
</ul>
<p id="nextlink"><a href="specs.html">%22&nbsp;%23
<p id="nextlink"><a href="about:konqueror/specs">%22&nbsp;%23
<!-- Continue --></a></p>
</div>
</div>