Commit graph

231 commits

Author SHA1 Message Date
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
Christian Dywan
e600574b5a Add a description to the page holder extension 2009-10-23 18:29:18 +02:00
Alexander Butenko
9deda8296b Disconnect signal handlers when disabling web cache 2009-10-23 18:15:28 +02:00
Christian Dywan
86685cc0c9 Check method before caching and limit extension length 2009-10-23 00:58:25 +02:00
Christian Dywan
6ff3e3a17d Make sure the cache folder is there initially 2009-10-22 02:52:40 +02:00
Christian Dywan
9040d43632 Refactor web cache to circumvent libsoup when needed
At this point libsoup is dependent on a functional network adapter,
which may not be available if no network connection is there or
the connection is faulty. So *if* we have a requested page in the
cache, we load it before libsoup comes into play.

Depending on the WebKitGTK+ version, loading from cache uses an
"alternate" URI so that we don't end up having cache filenames
in the location entry.

Generation of cache filenames is fixed to never include special
characters such as slashes or question marks.

Only non-empty files are actually stored to the cache folder.
2009-10-22 02:20:27 +02:00
Christian Dywan
6b0f38e51a Install autosuggestcontrol.js/.css into res like the other files 2009-10-22 02:20:26 +02:00
Christian Dywan
3dfaac3458 Revise loading data from the cache instead of the network 2009-10-20 21:39:05 +02:00
Christian Dywan
10b6cbb50a Don't check the status code when storing in the cache 2009-10-20 17:30:07 +02:00
Christian Dywan
ea6ae9b9e6 Store cached files in subfolders 2009-10-20 17:28:42 +02:00
Christian Dywan
da65b5d0c1 Implement a primitive web cache extension (unstable)
Incoming files are cached and saved to disk, as well as looked up
when files are requested. Only images are considered at the moment
and there is no epxiration handling or updating at all. Plus
it crashes in certain cases.
2009-10-20 16:04:58 +02:00
Alexander Butenko
d86e03a34e Implement an adblock info icon showing blocked URIs in a tooltip 2009-10-19 23:31:41 +02:00
Alexander Butenko
02d6f806e2 Implement div, a, ul and per domain element adblock rules
element hiding is supported. And instead of creating a javascript
function for each rule, we generate one script for everything.

On my machine only 650 out of 4500 rules are skipped.
2009-10-19 23:16:05 +02:00
Christian Dywan
b7f90f1a51 Add entry for a filter list address and an explanation to the dialog 2009-10-14 23:23:45 +02:00
Christian Dywan
0d65588651 Support Adblock with earlier Webit versions
With WebKit < 1.1.14 we use libSoup directly.
2009-10-14 21:51:32 +02:00
Christian Dywan
6a590a3125 Implement tick marks to enable/ disable adblock filters 2009-10-14 03:35:40 +02:00
Christian Dywan
fa030cbaca Use the correct counter when storing adblock filters
This crash was tricky since 'length' looked correct while in fact
it is the number of items including invalid items, which can be
more than we store.
2009-10-14 03:17:23 +02:00
Alexander Butenko
5f30199df5 Add unit test for prefetching that tests which URIs to prefetch 2009-10-14 00:56:17 +02:00
Christian Dywan
8636d3b9c6 Bail out of DNS prefetch if the host is NULL 2009-10-13 13:25:29 +02:00
Alexander Butenko
e4f163447c Don't prefetch IP addresses and bail out if the soup URI is invalid 2009-10-13 02:37:52 +02:00
Alexander Butenko
ad04c92e30 Initialize hosts for prefetching with an empty string 2009-10-12 23:06:04 +02:00
Christian Dywan
9702fbf5e4 Check the length of form fields to save only once 2009-10-12 23:06:04 +02:00
Enrico Tröger
2fc3116f77 Only fetch form values when the message is accumulative 2009-10-12 23:06:04 +02:00
Christian Dywan
c3217c6365 Pass HILDON library (if used) when building extensions 2009-10-12 13:01:17 +02:00
Christian Dywan
e97a198e98 Cache scriptcode generated by adblock instead of generating on load 2009-10-12 12:12:38 +02:00
Christian Dywan
94db485293 Initialize adblock unit tests with an empty pattern 2009-10-10 11:08:29 +02:00
Christian Dywan
223e9be7e3 Don't leak blockcss but free it before replacing it 2009-10-09 17:20:55 +02:00
Alexander Butenko
2718e47ca0 Add a DNS prefetching extension which fetches hovered links 2009-10-09 17:13:24 +02:00
Alexander Butenko
63b25561ff Re-use one hashtable instead of replacing it 2009-10-09 17:05:07 +02:00
Christian Dywan
0706bdbbe7 Don't leak form suggestions and don't return from the loop 2009-10-07 23:04:30 +02:00
Alexander Butenko
37e2c84b2b Install formhistory resources, don't fill in passwords
Reading post data is there but nothing is written to disk yet.
2009-10-07 22:30:16 +02:00
Alexander Butenko
50c159e9bb Initial code for the form history extension 2009-10-06 20:35:56 +02:00
Alexander Butenko
53b3c6aee3 Measure the performance of adblock parsing with a unit test 2009-10-03 23:57:12 +02:00
Alexander Butenko
c812efad2b Go back to the previous, faster pattern handling in adblock 2009-10-03 23:52:59 +02:00
Christian Dywan
7c2eb4de16 Fix a crash caused by freeing the adblock filters in the wrong way 2009-10-03 13:27:12 +02:00
Christian Dywan
2b493414d5 Correct memory handling leading to corruption in adblock 2009-10-03 02:03:49 +02:00
Christian Dywan
0e0ce115f9 Update tab panel selection when tabs are switched, opened or closed
A convenince function tab_panel_get_iter_for_view is introduced
to make finding the right iter easier.
2009-09-29 20:50:04 +02:00
Alexander Butenko
a8a0ff625e Be sure to reload lists as they are added 2009-09-23 19:22:01 +02:00
Christian Dywan
c4808e1701 Setup mouse gestures properly without a restart 2009-09-16 21:52:14 +02:00
Alexander Butenko
8ed02c1f88 Impove adblock regex, skip data: URIs and handle |http:// 2009-09-15 21:03:40 +02:00
Alexander Butenko
5f98925a02 Generate CSS rules from adblock element blocking lines 2009-09-14 18:26:35 +02:00
Christian Dywan
516547814c Mention why disabled extensions are not available 2009-09-14 18:26:35 +02:00
Christian Dywan
39e47ac3b7 Disable extensions that are unavailable on the system
Extensions can be unavailable on a particular platform or a system
lacking a build-time requirement. Let's handle this more cleanly
and reflect it in the Extensions panel.
2009-09-10 02:07:27 +02:00
Alexander Butenko
e59b291709 Implement Adblock with WebKit resource API 2009-09-10 02:00:06 +02:00
Christian Dywan
b77fdd45cf Support minimizing in tab panel, improve treeview updating
We now differentiate minimized views by inserting a toolitem in the toolbar
instead of a row in the tree model. This needed quite a bit of refactoring
including notifications of icon and title, which we use to update the
tree model as well now. Models are also per-browser now.
2009-08-18 20:49:41 +02:00
Dale Whittaker
359be5e24b Revert usage of KatzeItem meta data in the feed panel for now 2009-08-17 20:51:35 +02:00
Christian Dywan
04dc7fe855 Pass news feed icon clicks to the feed panel
The secondary-icon-released signal of the location action returns
a boolean now so a callback can indicate that it handled it. So
if the feed panel is active, it adds feeds to the panel and
suppresses the default action.

A possible crash when disabling the panel and clicking the icon
afterwards is fixed by adding a missing signal disconnection.
2009-08-17 02:15:21 +02:00
Dale Whittaker
883007c05d Catch another case of feed markup not being converted to text 2009-08-16 23:33:21 +02:00
Dale Whittaker
f48f47f372 Be sure to handle feed panel elements as HTML rather than text
While we are at it, use the new metadata API of KatzeItem.
2009-08-14 23:33:10 +02:00
Enrico Tröger
d3237c46ca Skip adblock lines that are not handled 2009-08-09 15:21:02 +02:00
Christian Dywan
a905219267 Show close icons in the tab panel, if enabled 2009-07-28 01:25:46 +02:00
Christian Dywan
2f3204f61a Manually setup the tab panel tooltip 2009-07-27 23:41:36 +02:00
Christian Dywan
d0d0b3bba7 Ellipsize titles and show tooltips in the tab panel 2009-07-27 03:40:38 +02:00
Christian Dywan
a32bd1e39a Don't indent tab panel rows, we don't have expanders 2009-07-26 21:49:42 +02:00
Christian Dywan
43e6542702 Implement MidoriBrowser::populate-tool-menu and adjust extensions
Extensions used to look for the menu and append items manually.
In order to show Tools in the Compact menu a proper signal
is needed.

Adblock, Shortcuts and Toolbar Editor are ported to the new API.
2009-07-25 03:05:52 +02:00
Daniel P. Fore
4103dc48ea Improve the wording of a few English strings and use colons 2009-07-22 23:53:29 +02:00
Alexander Butenko
121d348c64 Escape adblock filters properly and adjust the tests 2009-07-22 21:42:33 +02:00
Christian Dywan
e241273ad5 Disable building of adblock again, it's still not ready 2009-07-19 18:59:30 +02:00
Enrico Tröger
54192725c0 Don't repopulate the toolbar when opening the toolbar editor 2009-07-18 15:19:54 +02:00
Enrico Tröger
b7b741a146 Show icons in the toolbar editor 2009-07-18 15:17:41 +02:00
Christian Dywan
d6f6a76755 Include unistd.h in adblock which declares close() 2009-07-18 15:14:26 +02:00
Christian Dywan
8cdbb32511 Implement unit tests in adblock 2009-07-18 03:05:40 +02:00
Enrico Tröger
349c9d2080 Apply changes in the toolbar editor instantly 2009-07-17 23:02:55 +02:00
Enrico Tröger
e0541d92ea Use constants to address tree model columns 2009-07-17 23:00:39 +02:00
Enrico Tröger
6e97bf2da6 Display item labels instead of raw names in the toolbar editor 2009-07-17 22:59:25 +02:00
Christian Dywan
cc326885bc Implement adding and removing of adblock URIs 2009-07-17 22:05:20 +02:00
Christian Dywan
746b17e49e Make adblock filter URIs editable and save them when edited 2009-07-17 21:37:36 +02:00
Christian Dywan
4135b1ffe8 Use katze_strip_mnemonics in Shortcuts 2009-07-17 21:30:40 +02:00
Christian Dywan
0c5ce0e515 No need for a data function for adblock text columns 2009-07-17 18:03:50 +02:00
Christian Dywan
cac8646b7e Replace leading * or ? in adblock lines with .* or \? respectively 2009-07-16 14:36:35 +02:00
Alexander Butenko
c269bfc466 Use a hash table of URIs to track blocked advertisements 2009-07-16 14:17:20 +02:00