fzxs8 / chmsee

Automatically exported from code.google.com/p/chmsee
GNU General Public License v2.0
0 stars 0 forks source link

Patches for chmsee to use webkit. #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Here is some patches for chmsee to use webkit as its html render engine.
Since webkit is almost the base component of gnome/kde and very fast, so 
the patches maybe needed by a lot of people.

Thanks for the interface implementation of chmsee, the porting job is not too 
hard. I already try my best to avoid modifying the main sources of chmsee, just 
limit everything in html.c/h.But I had drop some code and modify a little of 
other sources.

I do not know the plan of the author about how to support webkit, multi-
backend or detect on configuration or plugin modes? Anyway here is some 
patches.

PATCHES:
====================
chmsee-use-webkit.patch

This is patch for chmsee-1.0.6 to use webkit, any gecko/xulrunner codes 
removed.

chmsee-webkit-too-fast.patch

It really too fast of menu popping up, the first item of the context menu is 
"Back", it is very easy to activate it, I had too modify the order of the menu.
This is optional.

===================
chmsee.git-use-webkit.patch
It is for git codes.

Original issue reported on code.google.com by cjac...@gmail.com on 10 Sep 2009 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lidaob...@gmail.com on 10 Sep 2009 at 4:31

GoogleCodeExporter commented 9 years ago
Here is webkit encoding support patch. After apply previous patches, you can 
apply this 
one.

Actually, the original code of chmsee also had a problem,
in chmsee.c
        /* Init gecko */
        chmsee_html_init_system();
        chmsee_html_set_default_lang(selfp->lang);

        populate_window(self);
        chmsee_load_config(self);

"set_default_lang" function should called after "chmsee_load_config", otherwise 
the 
lang is always 0. that means always "Auto".

The patches for webkit encoding support use "custom-encoding" property of 
WebView. 
Also webkitwebsettings support "default-encoding" property, but if we want to 
change 
encoding on the fly, we should use "custom-encoding" property of WebView. so I 
choose 
this one.

The logic is "chmsee always use "Auto Detect" to open new chm file, But if the 
detection 
is wrong, You can change it.And chmsee never save it as default, because Maybe 
it is 
really a bad chm file."

by now, All features gecko back end can supported had been implemented via 
webkit.

Original comment by cjac...@gmail.com on 11 Sep 2009 at 3:08

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by lidaob...@gmail.com on 20 Sep 2009 at 3:00

GoogleCodeExporter commented 9 years ago
http://github.com/lidaobing/chmsee/commit/efd89b6f217e1cdeb81f138bae3d7250306628
12
http://github.com/lidaobing/chmsee/commit/ac5416e84ecda09099c0fb2a26a05bc0dc2b7f
9b

Original comment by lidaob...@gmail.com on 20 Sep 2009 at 3:41

GoogleCodeExporter commented 9 years ago
Another patch to fix a bug that can not load lang setting automatically when 
open chm 
file.

Original comment by cjac...@gmail.com on 22 Sep 2009 at 3:33

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you providing this patch! But in chmsee 1.1 branch, it will still depend 
on
gecko render. The patch is kept on git repository's webkit branch.

Original comment by jungl...@gmail.com on 24 Mar 2010 at 9:00

GoogleCodeExporter commented 9 years ago

Original comment by jungl...@gmail.com on 24 Mar 2010 at 9:03