Feature Request: thumbnails of web pages
sycao
sycao at redflag-linux.com
Tue Nov 18 03:37:37 GMT 2008
Eduardo RE 写道:
> 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
>
Thanks for the advice, Eduardo:
I also found this problem later, so I'll just keep doing more reviews
myself. As I said, it's very primitive, and I will keep refine and
enrich the code as possible as I can. I worked on this by myself as of
now, and that's be great if anyone else is intereste in it, so I'll be
glad to exchange ideas with others.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20081118/f1236535/attachment.htm>
More information about the kfm-devel
mailing list