Commit graph

201 commits

Author SHA1 Message Date
Alexander Butenko
9ab1040e5f Don't use titles for adblock styles, WebKit only loads one with a title 2009-12-22 01:05:54 +01:00
Alexander Butenko
1c424106f1 Don't test file existence in adblock, katze_mkdir and check download status
It is enough to see if g_fopen fails, thus we don't need g_access
to test file existence additionally.

katze_mkdir_with_parents is optimized for existing folders.

We need to check the status, to see if file downloads are finished.

For Windows, we need to use g_strndup instead of strndup.
2009-12-22 00:07:39 +01:00
Alexander Butenko
61266c26ec No need to g_access when checking cached file, fopen is enough 2009-12-21 23:48:51 +01:00
Alexander Butenko
dc288dd3c3 Don't use g_access, use the return value of g_file_get_contents 2009-12-21 23:27:00 +01:00
Alexander Butenko
49d452a438 Eval form history script so it applies to the right frame
webkit_web_view_execute_script always works on the web view.
2009-12-19 20:22:23 +01:00
Alexander Butenko
9af30a1eda Optimize and clean-up form history
Switch from g_file_test() to g_access()

Initialize suggestions once the DOM is ready and only once

No need to handle WEBKIT_WEB_NAVIGATION_REASON_FORM_RESUBMITTED

[JS] Hide suggestions if search pattern was cleared

[JS] Human usable up/ down navigation in the suggestion window

Reusing a single suggestion window introduced a regression.
Suggestions were filling into the wrong editbox if there was more
than 1 on the page.

Some comments fixed and style clean-ups

Removed dead code
2009-12-19 11:28:46 +01:00
Alexander Butenko
045cc81b45 Use g_access instead of g_file_test consistently 2009-12-19 11:28:46 +01:00
Alexander Butenko
8c724eccd9 Use g_access in web cache, only SoupSession, pass filenames
Using g_access instead of g_file_test is a lot faster and avoids
big delays when accessing the disk.

Using only the SoupSession without resource-request-starting simplifies
the code. So offline mode is not an option for the moment.

Pass filenames directly to speed up lookups.
2009-12-18 21:21:56 +01:00
Alexander Butenko
12ed2da768 Refactor Adblock to use simpler checks with optional pattern matching
The style is only added once. Match checks are simpler so they can
be a lot faster. And slow pattern matching is optional, albeit
it currently is hardcoded in the source.
2009-12-18 21:21:56 +01:00
Alexander Butenko
82697f0afb Do not add the form history style more than once 2009-12-18 10:22:59 +01:00
Christian Dywan
af4d68b6b0 Sort shortcuts in the shortcut editor by name 2009-12-07 23:47:26 +01:00
Christian Dywan
0b81c7323d Store shortcuts statically to avoid flipping None values 2009-12-05 01:28:58 +01:00
Christian Dywan
c94be155f5 Open the link in the adblock filter dialogue inside Midori 2009-12-05 01:28:58 +01:00
Alexander Butenko
27e28080b8 Do not free the SoupURI obtained from soup_message_get_uri 2009-12-01 22:35:28 +01:00
Alexander Butenko
a64a583c4a Don't free opt because it is inserted into the hash table as-is 2009-11-30 22:04:32 +01:00
Christian Dywan
183878db8c Omit Help in Adblock and Search Engines dialogues on Hildon 2009-11-29 14:09:28 +01:00
Alexander Butenko
ce1013e622 Support differences in rule syntax and refactor the URL parser
Apparently some lists use a different syntax than what is
recommended, so we take that into account.
2009-11-27 00:37:20 +01:00
Alexander Butenko
b8e0143bdc Take soup status message into account in finish callback of web cache 2009-11-23 20:42:22 +01:00
Christian Dywan
e5cb4bb383 Be sure to define image in adblock, even if unused and move disconnect 2009-11-23 20:40:05 +01:00
Christian Dywan
f14b711901 Implement 'Edit' in adblock to activate the cell in the list 2009-11-21 02:35:15 +01:00
Christian Dywan
0211fc6f9b Use tab label colours in the tab panel, even if they are colourful
Tabs in the panel look a little more like tabs now. And as a side
effect, colours from the Colourful Tabs extension will be used.
2009-11-20 03:37:43 +01:00
Alexander Butenko
2d514bfb6c Refactor adblock simplify parsing and to honor matching options
There is a known flaw in that URL rules may erroneously match domains.

The code path for WebKitGTK+ < 1.1.14 is now crashing.
2009-11-20 01:00:48 +01:00
Christian Dywan
277d957816 Remove redundant option from the Colourful tabs extension 2009-11-19 01:34:36 +01:00
Christian Dywan
c8d02719cc Fix Mouse Gestures to handle events properly again 2009-11-17 23:39:52 +01:00
Christian Dywan
9eefb25bb6 Refactor loading cached page icon into katze_load_cached_icon
The function is optimized for loading icons and independant from
a KatzeNet instance.
2009-11-17 23:22:08 +01:00
Christian Dywan
26b4aad139 Fix signature of signal disconnection in Mouse Gestures 2009-11-17 19:18:14 +01:00
Christian Dywan
fd7d778e0c Remove sokoke_widget_popup and replace all call sites 2009-11-15 18:21:59 +01:00
Christian Dywan
9bcfba8ddc Refactor Mouse Gestures into one file, similar to other extensions 2009-11-14 22:50:20 +01:00
Christian Dywan
ae3e7a804b Setup all existing tabs initially when activating Mouse Gestures 2009-11-13 22:42:58 +01:00
Christian Dywan
5238431d84 Disable statusbar button showing adblock status
It doesn't work that well currently and it's not clear how it should
change, so we're disabling it for the moment.
2009-11-13 18:37:00 +01:00
Christian Dywan
2fc6a2be89 NULL-check exception in sokoke_js_script_eval 2009-11-12 23:55:36 +01:00
Alexander Butenko
55e50e20b1 Check for duplicates before storing form fields 2009-11-12 23:10:37 +01:00
Alexander Butenko
1a52db823f Share the code updating the form history hashtable 2009-11-12 22:52:48 +01:00
Christian Dywan
339058f304 Re-implement support for post forms for WebKitGTK+ < 1.1.4 2009-11-12 22:15:46 +01:00
Alexander Butenko
57a58f39a4 Rework form history with policy decision and better error handling 2009-11-12 21:54:25 +01:00
Christian Dywan
cc810f374d Actually load from and store form history in the database 2009-11-08 14:39:46 +01:00
Christian Dywan
d41525b7fe Adjust an #ifdef in web cache possibly leading to compile warnings 2009-11-08 14:39:46 +01:00
Christian Dywan
24d0e4d999 Do not free form history key hashtable to avoid a crash for now 2009-11-08 14:39:45 +01:00
Christian Dywan
d0215c4032 Support keyboard hotkeys that GTK+ considers invalid
We re-implement the usual key handling by overriding the key press
handler, emulating the according steps but leaving out the
validation that normally rejects certain combinations.

Single key hotkeys work unless an entry is focussed, in which case
the entry receives the input, and Control+Tab works as well.

The shortcuts extension is adjusted to accept any hotkeys.
2009-11-04 14:31:16 +01:00
Christian Dywan
e982985976 Create a database to save to and load form history from 2009-11-02 21:03:20 +01:00
Christian Dywan
3efbc1b462 Leave setting up windows to the app, which is a lot faster
With a mature history setting up a browser window can be slow, but
if it's setup at creation time it is extremely fast.

The signal prototype of MidoriBrowser::new-window had to change,
all call sites were adjusted.
2009-10-31 04:29:15 +01:00
André Stösel
ee87663b35 Make the History List recognize tabs open before its activation 2009-10-28 20:36:34 +01:00
Alexander Butenko
b53bd5c2f4 Bail out of storing when processing multiple files to cache 2009-10-27 23:41:22 +01:00
André Stösel
e538a04666 Show icons and a snapshot of the active tab in the History List 2009-10-27 23:03:51 +01:00
Alexander Butenko
8ef3eeaa89 Set proper content types and work with temporary cache file fragments
With WebKit 1.1.11 and newer, we can sniff the content type which
is needed in some cases to load for instance Flash videos.

We are writing chunks into temporary files and commit completed
files to the cache, so that we don't end up serving partial files.

Old cache entries are removed before updating.

Length detection is improved.

File creation moved from got-chunk to got-headers.
2009-10-27 20:03:22 +01:00
Christian Dywan
f0e7b93964 Do not try to cache downloaded files 2009-10-27 02:04:38 +01:00
Christian Dywan
0eec63762f Plug two filename leaks in the web cache 2009-10-26 23:46:21 +01:00
Alexander Butenko
9c2c62d37c Implement Pragma, Cache-Control, ETag and Last-Modified in web cache
Offline mode is going to be handled separately and is not supported
right now.
2009-10-26 18:39:32 +01:00
André Stösel
3257002de3 Improve the description of the tab switcher/ history list 2009-10-26 00:18:08 +01:00
André Stösel
996a07da52 Add the Tab Switcher extension, showing a list of tabs while switching 2009-10-25 00:45:35 +02:00