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
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
不急,能夠讓成果得以累積,是我個人比較在意之處。也請 rebase 為 pcmanx 的 SVN head,若有需要,也可建立 branch。
全文下載是很好的想法,若遇到任何技術問題,歡迎在此提出,謝謝!
Sincerely,
-jserv