[PATCH] Added customized image viewer

0 views
Skip to first unread message

Jim Huang

unread,
Jun 17, 2008, 2:23:37 PM6/17/08
to PCM...@googlegroups.com, Oasis Li
Dear all,

After quickly reviewing the changes from pcmanx-gtk2-ng (
http://pcmanx-gtk2-ng.googlecode.com ), I slightly modified and
prepared this patch, which invokes customized image viewer once
detecting image from the URL in article context.

Original author is Oasis Li, and I just kept the same coding style and
checked GIF image as well. Here are my random considerations
regarding this patch as following:

(1) we need to take care URL encoding to make sure the correctness of
the invocation for local image viewer programs. That is, while 404
file not found, no image view should be invoked and error messages
should notify the users. Also, filename could be changed during URL
redirections.

(2) src/view/telnetview.cpp (thr_downimage) is help function for image
downloading. The patch attempted to create new thread for invoking
wget in order to download image, that is fine. However, wget involves
in several unpredictable behavior like long waiting, and it lacks the
corresponding checks for duplicated entries at the moment.

I am not sure if Oasis Li is working on the above issues, and I just
sent back my modifications to mailing-list for review. Here is the
changelog:
2008-06-17 Oasis Li <ji...@exmsft.com>

* src/view/telnetview.cpp
(thr_downimage): New help function for image downloading.
(CTelnetView::OnHyperlinkClicked): Added image detection for URL.

* src/appconfig.h (CAppConfig::ImageViewer),
src/view/telnetview.h (CTelnetView::m_ImageViewer),
src/generalprefpage.h (CGeneralPrefPage::m_ImageViewer),
src/mainframe.cpp (CMainFrame::CMainFrame) (CMainFrame::OnPreference),
src/appconfig.cpp (CAppConfig::DoDataExchange)
(CAppConfig::SetToDefault) (CAppConfig::AfterLoad),
src/generalprefpage.cpp (CGeneralPrefPage::CGeneralPrefPage)
(CGeneralPrefPage::OnOK),
configure.ac: Added customized image viewer.

Please review and see if we can proceed detailed merge actions.

Regards,
-jserv

pcmanx-image-viewer.patch

Jim Huang

unread,
Jun 19, 2008, 2:34:31 AM6/19/08
to oasis, PCM...@googlegroups.com
2008/6/18 oasis <ji...@exmsft.com>:
> thanks for you patches,i m very glad this feature will be merged in
> trunk.....

hi oasis,

It's our pleasure to adopt various efforts from world-wide development
as free and open source software project.

[...]
download,because if
> the article is very long and the mainframe will freeze as i just use OnRecv
> to "refresh" the screen content,so i think of adding a progress bar when
> download is on the way.since i just begin to read the pcmanx code for one
> week so i donnt know if this is fine and i just know that it works. :)
>

Good. Please send your patches to mailing-list once completed.
Also, would you plan to improve the feature of customized image viewer
in my previous patch? We have to fix the basic considerations
mentioned before, otherwise it would be regarded as less-useful
feature to pcmanx user scenario.

> i hope we dont need the "ng" version any more if our features are merged,

Exactly. While using the term "ng" (next generation), it always
involves in brand-new designs and different implementation principals.
It's evident that we are still using the same codebase and
development model so far.

Thanks,
-jserv

ggoase

unread,
Jun 19, 2008, 2:49:46 AM6/19/08
to PCManX
用回中文好了,呵呵
你所care的两个image viewer的问题我还没有来得及去细想,image viewer部分暂时我就是
再打了一次你的patch......

现在我主要还是在弄全文下载这部分,不过最近几天工作还是比较忙,估计不能在一两天内弄出来。

On Jun 19, 2:34 pm, "Jim Huang" <jserv...@gmail.com> wrote:
> 2008/6/18 oasis <j...@exmsft.com>:

Jim Huang

unread,
Jun 19, 2008, 2:56:59 AM6/19/08
to PCM...@googlegroups.com
2008/6/19 ggoase <oasis...@gmail.com>:

> 用回中文好了,呵呵
> 你所care的两个image viewer的问题我还没有来得及去细想,image viewer部分暂时我就是
> 再打了一次你的patch......
>
> 现在我主要还是在弄全文下载这部分,不过最近几天工作还是比较忙,估计不能在一两天内弄出来。
>

不急,能夠讓成果得以累積,是我個人比較在意之處。也請 rebase 為 pcmanx 的 SVN head,若有需要,也可建立 branch。

全文下載是很好的想法,若遇到任何技術問題,歡迎在此提出,謝謝!

Sincerely,
-jserv

Reply all
Reply to author
Forward
0 new messages