[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: How to do a HTML welcome screen
From:       Michael Rex <me () rexi ! org>
Date:       2009-07-22 20:07:42
Message-ID: 200907222207.43092 () fuckup ! rexi ! org
[Download RAW message or body]

On Wednesday 22 July 2009, Andras Mantia wrote:
> On Wednesday 22 July 2009, Michael Rex wrote:
> > It's not that easy. I don't want to display just some HTML page
> > (that's what I do now), I want something that looks "right",
> > consistent with the other apps in KDE, like Konqueror. Maybe that
> > didn't become clear in my first mail.
> >
> > Right now I have enough questions already, like how do I do i18n,
> > where do the images and CSS come from, how to structure the page...
> > If I have to check the source for answers, this isn't so simple
> > anymore ;-)
>
> I see. It is still not that hard, I give you the KMail code where to
> look at (lines are for trunk):
>
> kmreaderwin.cpp:
> void KMReaderWin::displayAboutPage() (line 1438) and
> void KMReaderWin::displaySplashPage( const QString &info ) (line 1395)
>
> the CSS comes from $KDEDIRS/share/apps/kdeui/about/kde_infopage.css and
> kde_infopage_rtl.css.

Thanks. Knowing where to start looking always helps :-)

> If you want to handle clicks there, you need to connect to the html part
> signals, but that's all. In the end it resumes to what I wrote: load an
> html file/content into a KHTMLPart object.

Right now, I don't need any interactivity. And I see your point, of course it 
ends up with displaying some HTML page, but that was never my problem. The 
problem was how this page had to be written and incorporated into the 
application. Displaying some HTML I can do, but I was wondering how to make 
this HTML look like said pages in Konqueror, for example.

> For i18n you could do what KMail does (put the strings from the .cpp) or
> you could modify the Messages.sh to extract the strings from your .html
> file if you provide an external html file. Probably the first solution is
> easier, or if you really want to have an external html, another idea
> could be to use some macros that you replace on the fly with text in the
> .cpp before showing it.

I was thinking along the lines of how, for example, Konqueror does it: an 
external HTML file with lots of "%1", "%2" and the like, that somehow (I 
haven't looked deeper into the sources yet) get replaced by the translated 
strings, I guess this corresponds to your first solution?

BTW, I wasn't even aware that KMail had such a page, too, as I still mostly 
use KDE3 while I slowly migrate to KDE4... Or did even the old KDE3 KMail 
have that and I totally missed it?

In the end, I still think this is something that warrants a TechBase article, 
though. I'll try to keep track of my steps as I go along, maybe this can help 
others who want to do the same...

Thanks again for your input,
Michael


-- 
Welcome to Rivendell, Mr. Anderson.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic