Feature Request: thumbnails of web pages
Eduardo RE
edulix at gmail.com
Tue Nov 18 10:44:17 GMT 2008
El Lunes 17 Noviembre 2008, sycao escribió:
> hi, I'm wondering if it's useful to provide thumbnails ability for
> konqueror, as many browsers have the feature. so I write a primitive
> thumbnail implementation, which provide basic functions such as show
> most visited pages and all opened tabs ( only khtml pages now ).
> clicking on a thumbnail representing the opened tab will just activate
> the associative tab. i'm very interested in it, and will do more work on
> it. if anyone has an idea or find it useful, please tell me. thanks.
>
> best regards,
> Siyuan Cao
H Siyuan Cao:
Your feature is probably very cool, and I hope we get it in for 4.3 but we're
in feature freeze at the moment so it will have to wait (or be added in
branch). I've been reading a bit your patch and I've seen that how you create
the path where you store your settings is a bit unortodox:
+ if ( m_pagePath.isEmpty() ) {
+ QString dirname = KStandardDirs::locateLocal("appdata",
"thumbnail_pages/");
+ if ( dirname.isEmpty() ) {
+ kDebug() << "find resource dir failed";
+ dirname =
QString("%1/.kde/share/kde4/apps/konqueror/thumbnail_pages").arg(
QDir::homePath() );
+ QDir dir(dirname);
+ if ( !dir.exists() )
+ dir.mkpath( dirname );
+ }
+ m_pagePath = dirname;
When you call to locateLocal dirs can be automagically created if you set
createDir = true (see [1]). Also, your $KDEHOME needn't be ~/.kde (in kubuntu
7.04 it was ~/.kde4 for example and it might be anything else), so a better
way to create the directory could be something like:
m_pagePath = KStandardDirs::locateLocal("appdata", "thumbnail_pages/", true);
And probably you should only do that in the constructor of the given class.
As it's a quite large patch there are probably other things that might need
review but anyway thanks for your contribution, we do want new features and
developers in konqueror =). BTW, have you worked on this patch by yourself? I
think you should have tried to contact here or in the IRC (freenode, #khtml )
with us before doing such a great task to get some help / advice.
Regards,
Eduardo Robles Elvira.
--
[1] http://api.kde.org/4.x-api/kdelibs-
apidocs/kdecore/html/classKStandardDirs.html#e205c71849edfaf3a76618071223d51f
--
"The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all progress
depends on the unreasonable man." (George Bernard Shaw)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20081118/025ce6c7/attachment.sig>
More information about the kfm-devel
mailing list