Commit graph

319 commits

Author SHA1 Message Date
Christian Dywan
9241afa0db Implement FTP support in External Applications
For the moment 'gftp' is hardcoded for ftp://.
2010-05-13 01:06:58 +02:00
Arno Renevier
7c0e58a835 Refactor userscripts and userstyles as an extension 2010-05-02 11:53:05 +02:00
Christian Dywan
6a5585254a Implement gesture button setting and default to right 2010-04-29 02:31:11 +02:00
Christian Dywan
43baf4706a Tweak mouse gestures to properly support right button
We need to be more considerate when to indicate that button
signals were 'handled' and we need to popup the context menu
if we override the default handler.
2010-04-29 02:22:12 +02:00
Christian Dywan
0533e67902 Implement External Applications extension 2010-04-28 23:48:47 +02:00
Christian Dywan
3aad0189c4 Remove incomplete Javascript extension 2010-04-27 23:54:38 +02:00
Christian Dywan
7a7f4c6a44 Provide midori.vapi for App, Browser, Extension and WebSettings
With this API description extensions can be written in Vala. Mind
it is not complete yet, missing interfaces can be added later.
2010-04-27 23:49:45 +02:00
Christian Dywan
ccb60bb8d4 Only pick up .vala files if Vala is available 2010-04-25 23:39:00 +02:00
Christian Dywan
7e5dd2db32 Minimal support for tests and extensions in Vala 2010-04-25 00:11:57 +02:00
Christian Dywan
779c582058 Guard WebKitDownload to WebKitGTK+ 1.1.2 2010-04-24 23:59:07 +02:00
Christian Dywan
efc5252048 Revise MIDORI_ADBLOCK so 1 is parsing and 2 is timing
Huge amounts of console output affect performance, so timing
should be taken separately.
2010-04-10 00:58:15 +02:00
Christian Dywan
63a5eeb0f0 Output adblock debug if variable MIDORI_ADBLOCK set
If Midori is compiled with full debug mode, and the environment
variable MIDORI_ADBLOCK is set, Adblock will output a lot of
debugging information.
This spares testers from editing code. grep is recommended.
2010-04-08 21:39:05 +02:00
Christian Dywan
95358acc82 Handle https:// URIs in Adblock properly
We mark URIs as 'disabled' by replacing the : with a -. This
fails if there is an https:// URI and we want to restore it.

For clarity, the macros ADBLOCK_FILTER_SET and
ADBLOCK_FILTER_IS_SET are introduced to handle the details.
2010-04-06 02:41:29 +02:00
Arno Renevier
dc90c7f093 Use midori_view_get_web_view in extensions 2010-03-31 00:18:42 +02:00
Dale Whittaker
9607f2107e Take text from each feed element for tree and web view 2010-03-27 14:22:31 +01:00
Dale Whittaker
3f8b34853d Update year in Copyright headers 2010-03-25 23:06:38 +01:00
Dale Whittaker
181d62dc01 Don't skip CDATA section nodes in feeds 2010-03-25 23:01:46 +01:00
Dale Whittaker
a8c055bdbc Ignore navigation for clicks in news feeds 2010-03-23 20:27:00 +01:00
Christian Dywan
6496dd5403 Update tab panel colours in icon callback
Since Colorful Tabs now updates colors in the icon callback,
we also need to update in the icon callback.
2010-03-22 22:34:03 +01:00
Arno Renevier
9b9440d49e Use a 60 second timeout if format has no seconds 2010-03-22 21:52:06 +01:00
Samuel Creshal
3cbce9896b Implement page icon based tab colors
Colorful Tabs now uses the icon of a page as the basis for the
tab color, if it has one, otherwise falls back to the previous
address based hash.
The forground color is also adjusted for dark colored tabs.
2010-03-19 21:10:22 +01:00
Arno Renevier
0d27d6f17d Implement Status Clock extension 2010-03-19 20:50:34 +01:00
Samuel Creshal
8f23dcfd33 Disconnect tab callback when disabling Colorful Tabs 2010-03-04 02:08:49 +01:00
Peter de Ridder
6ad713c6d5 Look for the formhistory javascript dynamically 2010-02-16 00:59:42 +01:00
Peter de Ridder
b993cdc553 Add win32 specific linker flags for Midori extensions 2010-02-16 00:59:42 +01:00
Christian Dywan
c21807bc4a Use g_unlink for G_FILE_CREATE_REPLACE_DESTINATION with Glib < 2.20 2010-02-12 02:19:54 +01:00
Christian Dywan
8414836c76 Remove conditionals to disable Toolbar Editor on Hildon 2010-02-06 17:37:15 +01:00
Christian Dywan
458252d053 Localize 'Block image' and 'Block link' menuitems in adblock 2010-02-06 17:32:09 +01:00
Alexander Butenko
c550d36649 Implement an 'Edit rule' dialogue when blocking images 2010-02-03 18:58:07 +01:00
Alexander Butenko
27653d6670 Only connect liststore after populating the model with filters
We don't want to reload the rules for each row.
2010-02-03 18:30:48 +01:00
Alexander Butenko
de7818b7aa Don't cache local adblock filters, and remove disabled filter files 2010-02-03 18:26:44 +01:00
Alexander Butenko
ce43fb3c03 Rebuild formhistory script on reload and do not leak the script
1. Don't leak the script in formhistory_window_object_cleared_cb ()
2. Disconnect add-tab signal in the right place
3. Rebuild the base javascript code on extension reload
2010-02-02 21:32:20 +01:00
Alexander Butenko
62dac745d6 Rebuild adblock js after download a new filter file 2010-02-02 21:26:05 +01:00
Alexander Butenko
7b42792caf Prevent styles with a "'" character from breaking adblock 2010-01-26 22:07:57 +01:00
Enrico Tröger
8f37e3802e Always expand rows when trying to restore the selection 2010-01-20 07:19:11 +01:00
Enrico Tröger
3af420622c Restore selection in cookie manager after deleting items 2010-01-19 06:53:48 +01:00
Alexander Butenko
97a5eb0df2 Read cache asynchronously, use GOutputStream, plug a leak
1. We are now reading from the cache asyncronously. Fixing UI freezes.

2. Cache writing switched to GOutputStream. One open/ close per file

3. Plugged a leak of cache headers in web_cache_message_rewrite ()

4. We don't need the URI in web_cache_mesage_got_headers_cb ()
2010-01-17 22:56:41 +01:00
Alexander Butenko
57865955dc Simpler element hiding and some adblock optimizations
1. Less hungry and simpler blocked element hider

2. We are now also adding a context menuitem for uris in
preparation for creating rules from the web inspector

3. Removed old hack for blocked element hider

4. Element hider javascript fixes

5. Unit test for small sized rules

6. Removed unneeded WebKitWebView casts
2010-01-17 20:04:17 +01:00
Enrico Tröger
e6163a761f Only define adblock_prepare_urihider_js() if it is used 2010-01-15 07:07:00 +01:00
Alexander Butenko
9b01e48975 Tell the soup message it was finished to allow it to release memory 2010-01-14 02:23:00 +01:00
Alexander Butenko
bb4c381b43 Use a script to hide images and frames that are blocked 2010-01-14 02:19:38 +01:00
Enrico Tröger
27567de620 Guard image with #define to prevent unused variable warnings 2010-01-14 02:01:30 +01:00
Alexander Butenko
4dae65d802 Speedup adblock by removing greedy regex if we have 1 or 2 signatures 2010-01-14 01:52:43 +01:00
Christian Dywan
d536d90d33 Do not call xmlCleanupParser after parsing news feeds
This function is an aggressive means of releasing memory that may
leave libxml in an unusable state.
2010-01-13 06:52:42 +01:00
Alexander Butenko
2832704f7d Implement "autosuggest" in form history and bump the version
1. Honor non W3C but commonly used "autosuggest" attribute.

2. Bump version to 1.0. The plugin can be considered stable.
2010-01-10 22:57:17 +01:00
Alexander Butenko
089315bcaa Speedup adblock with blacklists and reorganize unit tests
1. Blacklist for pattern matching. 1 regexp has more than 1
signature. If the 1st match failed, there is no need to
match with the same regex a second time if the signature matched.
This gives us 20% speedup.

2. Cleanup for performance tests.

3. Tests reorganized. now we are checking pattern validation
plus performance timing. Simlifies testing.

4. Bump version to 0.5. The next patch will add option matching
so we will bump it to 1.0 once it is tested.
2010-01-10 22:52:06 +01:00
Enrico Tröger
ca73b5fede Allow DND also for cookie items by using the value of the parent node 2010-01-08 00:16:56 +01:00
Enrico Tröger
e67d87247a Align domains with and without leading dots equally 2010-01-08 00:16:56 +01:00
Enrico Tröger
170163cbab Implement cm_skip_leading_dot() to avoid code duplication 2010-01-08 00:16:56 +01:00
Enrico Tröger
973c82fdae Show some basic information in description box when domain is selected 2010-01-08 00:16:56 +01:00
Enrico Tröger
d7aa05b9ec Implement cm_list_length() for faster list length computations
Since we only need to know whether the list of selected items
has 0, 1 or 2 or more items, it's enough to check for these 3 cases
2010-01-08 00:16:56 +01:00
Tsahee Zidenberg
e126271ad8 Disconnect add-browser callback when deactivating Colourful Tabs 2010-01-07 00:02:12 +01:00
Alexander Butenko
22f347ca38 Increase filter line buffer, revise css block matching, use strchr 2010-01-03 23:37:44 +01:00
Christian Dywan
7383a647c9 Use mnemonic _o instead of _l for 'Block image' 2010-01-02 22:04:50 +01:00
Christian Dywan
cf9dec176c Refactor adblock_reload_rules to handle filters versus only custom 2010-01-02 21:34:17 +01:00
Alexander Butenko
b0de3f35df Block and hide images by domain and relative path 2010-01-02 21:15:58 +01:00
Alexander Butenko
20059d74b9 Hide images blocked with 'Block image' via element hiding 2010-01-02 04:11:44 +01:00
Alexander Butenko
5452c7c71d Implement 'Block image' menuitem in adblock, adding URIs to custom list
For now it only has effect after reloading the page.
2010-01-02 03:47:56 +01:00
Christian Dywan
fc7689f906 Move DNS prefetching into the core
The feature is going to be included with WebKitGTK+ and
having it in the core allows us to prefetch bookmarks as well.
2010-01-01 18:16:55 +01:00
Enrico Tröger
6fe8a5e9ec Allow selecting (and so deleting) multiple cookies at once 2009-12-30 23:52:20 +01:00
Enrico Tröger
c91cc72505 Move code to delete selected item from button handler into separate function 2009-12-30 23:52:20 +01:00
Enrico Tröger
b98064d0b6 Handle Delete key for the selected item in the Cookie Manager 2009-12-30 23:52:20 +01:00
Enrico Tröger
9183f8e16d Connect callbacks for gtk_widget_destroy where signature differs
Apparently dependent on architecture and compiler, mismatching
callback signatures can cause segmentation faults.
2009-12-29 23:49:10 +01:00
Enrico Tröger
d0a52ac09c Use g_strndup as opposed to strndup in Adblock 2009-12-28 23:59:54 +01:00
Alexander Butenko
33565cc2f3 Check whether the header file was created and mkdir the parent folder
When the web cache folder is deleted, the filenames passed to callbacks
may not be updated, so trying to write headers results in a crash.
We need to make sure we only write after opening the file properly.
2009-12-27 22:04:27 +01:00
Alexander Butenko
138e837457 Free the URI when the file was already cached 2009-12-26 15:20:57 +01:00
Alexander Butenko
06f5306d56 Fix a typo when using g_access in Web Cache 2009-12-23 23:39:54 +01:00
Alexander Butenko
05601be635 Use id to avoid inserting adblock/ form history style more than once 2009-12-23 15:35:09 +01:00
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