Commit graph

548 commits

Author SHA1 Message Date
Paweł Forysiuk
85bdfac81a Don't show infobar installer on "view source" pages 2011-02-18 02:22:11 +01:00
Paweł Forysiuk
846a7f7088 Handle addon install in view specific callbacks
Connect on the view rather than the browser and use
MIDORI_LOAD_COMMITTED which is only emitted once.
2011-02-18 02:05:51 +01:00
Paweł Forysiuk
5cdbf5e814 Free uri in adblock_is_matched_by_key after printing 2011-02-13 18:35:46 +01:00
Paweł Forysiuk
27bba3c318 Strip leading and trailing whitespace when parsing user scripts/ style 2011-02-12 16:40:57 +01:00
Paweł Forysiuk
28fbf66459 Check for destination folder before downloading userstyle/script 2011-02-09 00:22:51 +01:00
Paweł Forysiuk
dba9bb4780 Fix parsing of userscript headers containing tab chars 2011-02-09 00:16:55 +01:00
Paweł Forysiuk
7939dc1bf1 Try matching URI by extension first in script/ style infobar
Fallback to hostname if that fails
2011-02-09 00:14:27 +01:00
Paweł Forysiuk
6b48f9c639 Escape markup in user script/style tooltip and delete dialog 2011-02-09 00:10:06 +01:00
Paweł Forysiuk
7504edaa11 Fix script name extraction and re-enable installer on userscripts.org "review" pages 2011-02-04 00:33:48 +01:00
Christian Dywan
90e11d3713 Only no adblock if main frame in provisional state 2011-02-01 01:52:39 +01:00
Christian Dywan
2e35f1718b Never filter the main page itself with adblock
Fixes: https://bugs.launchpad.net/midori/+bug/706862
2011-01-30 19:25:50 +01:00
Christian Dywan
57d529d309 Don't support 'review' pages on userstyles.org for now 2011-01-30 18:58:00 +01:00
Paweł Forysiuk
1efabca2b1 Don't use GtkInfoBar api explicitly in user style/script infobar installer 2011-01-30 18:58:00 +01:00
Christian Dywan
650aa8c102 Don't error when saving addons config in test 2011-01-16 14:05:23 +01:00
André Stösel
b4e94b4f19 Be sure to end up at last opened tab after closing 2010-12-14 01:16:20 +01:00
Christian Dywan
54971fd8ae Make sure minimized tabs show up in Tab Panel 2010-12-11 20:31:18 +01:00
André Stösel
aadfd1e289 Switch to newest tabs with Ctrl+1 and Ctrl+2 2010-12-12 00:36:33 +01:00
Christian Dywan
613e78a951 Be more careful about consecuitve spaces in styles 2010-12-12 00:36:32 +01:00
Paweł Forysiuk
7bd0683869 Omit spaces and comments in user stylesheets
This fixes parsing breaking due to comments.

Further more it noticibly reduces the size of stylesheets.
2010-12-07 01:43:27 +01:00
André Stösel
cb5bdb8646 Resize History List based on the requested size 2010-11-23 23:22:47 +01:00
Paweł Forysiuk
b26df3af22 Remove unused kind_name variable in addons_uri_install 2010-11-10 00:34:31 +01:00
Paweł Forysiuk
2feb127e4b Reword userstyle/ script install message in infobar 2010-11-09 23:22:34 +01:00
Paweł Forysiuk
91390db88c Implement infobar for easy userscript/ style install 2010-11-07 23:58:26 +01:00
Paweł Forysiuk
96a276219a Handle multi-line -moz-document blocks 2010-11-05 23:27:57 +01:00
Christian Dywan
34a3c307b5 Properly omit quotes from -moz-document domain 2010-11-04 19:03:49 +01:00
Paweł Forysiuk
53a205be4d Handle single, double and absent quotes in -moz-document 2010-11-03 00:12:05 +01:00
Paweł Forysiuk
eae7ec4ac3 Recognize -moz-document domain in user stylesheets 2010-11-01 19:35:29 +01:00
Christian Dywan
ed6d44df5f Use function to access browser settings an panel 2010-11-01 16:47:32 +01:00
Christian Dywan
560ad66d48 Add 'Identify As' button to Statusbar Features 2010-10-31 21:24:34 +01:00
Christian Dywan
b86b5056f8 Remove External Applications extension 2010-10-24 21:06:28 +02:00
Christian Dywan
c78c982613 Mention Ctrl+Tab in description of History List
Otherwise people don't understand how to use it.
2010-10-22 21:50:20 +02:00
Christian Dywan
68c12e950e Slice allocations in addons, net, scrolled, transferbar 2010-10-21 21:09:01 +02:00
Christian Dywan
936758afdc Add translation comments to 'History' and 'Form History' 2010-10-21 21:09:00 +02:00
Christian Dywan
b25f27cd66 Add static keywords, fix #ifdefs and spurious lines 2010-10-20 23:48:36 +02:00
Paweł Forysiuk
30f3dc0461 Clean up redundant item lists from addons helpers 2010-10-20 23:47:14 +02:00
Christian Dywan
ce64fd3e25 Add item to clear Form History database 2010-10-17 23:11:50 +02:00
Christian Dywan
d73b471ec4 Implement sokoke_register_privacy_item facility
The new function allows registering callbacks which clear data,
with a name and label so they show up in the Clear Private Data
dialogue and the chosen items are saved.

The old enumeration still keeps history, trash and the flag
whether to clear when Midori quits.
2010-10-17 22:48:32 +02:00
Christian Dywan
52d7a43e28 Don't use "path" setting in web cache to create the folder 2010-10-14 22:20:21 +02:00
Christian Dywan
ab414bc251 Remove web cache path and size settings 2010-10-12 00:25:49 +02:00
Christian Dywan
e74f89f8c2 Remove 'filename' argument from sokoke_spawn_program 2010-10-10 13:27:06 +02:00
Christian Dywan
1e49e9f95c Don't use a custom stock icon for Cookie Manager
Due to the change of the stock icon names in GTK+ 2.22 the
stock item trick doesn't work anymore. Using the authentication
icon directly is good enough.
2010-10-05 21:43:34 +02:00
Christian Dywan
2cf3c2f5b0 Fix removal of tabs from Tab Panel treeview 2010-10-05 21:43:34 +02:00
Christian Dywan
5a0fc37d2f Don't use the deprecated GTK_IN_DESTRUCTION flag
As a workaround, the browser now sets its own flag.
2010-10-05 00:04:28 +02:00
Christian Dywan
195c5191ef Showing the (feed) panel needs to be a GtkWidget* 2010-09-12 00:59:24 +02:00
Christian Dywan
40dc38fd21 Implement and use KATZE_ARRAY_FOREACH_ITEM
Iterating an array by a GList is considerably faster than
continuously retrieving items, however it is also a lot
more complicated. So the new macro takes care of that and
uses a new semi-private function to avoid copying the list.

Note that the macro can't be nested, which basically isn't
useful in practise anyway.
2010-09-12 00:59:24 +02:00
Christian Dywan
3b4ae37664 Always free uri of the web view after applying addons 2010-09-01 23:56:03 +02:00
Paweł Forysiuk
f7a6011d1b Provide a context menu for scripts and styles 2010-09-01 22:39:09 +02:00
Paweł Forysiuk
8448eabd26 Add button to open folder of scripts/ styles 2010-09-01 22:28:32 +02:00
Paweł Forysiuk
65338e5ab0 Remove button labels and separator from addon toolbar 2010-09-01 22:08:21 +02:00
Paweł Forysiuk
d7b68b9d94 Add button to open addon in text editor 2010-08-30 00:59:57 +02:00
Paweł Forysiuk
ce56f60ccd Show addon filename and/ or description in tooltip 2010-08-29 23:49:38 +02:00
Paweł Forysiuk
1640aedd44 Make addons delete confirmation dialog more readable 2010-08-29 23:49:38 +02:00
Paweł Forysiuk
dc90ad18e9 Provide gui dialog for adding addons to user directories 2010-08-28 02:14:29 +02:00
Paweł Forysiuk
eee7cbcff9 Add button for deleting user addons 2010-08-28 01:59:54 +02:00
Paweł Forysiuk
49d249e6e1 Show full path to addon in tooltips 2010-08-28 01:46:17 +02:00
Christian Dywan
5a86115a9a Rename 'Minimize Tabs' to 'Show Tab Icon Only' 2010-08-23 19:38:11 +02:00
Christian Dywan
99a9cfc34c Show the Feed Panel after adding a new news feed 2010-08-23 19:38:11 +02:00
Christian Dywan
233ff2602d Switch to Tab Panel after activating it for the first time 2010-08-23 19:38:11 +02:00
Paweł Forysiuk
ac1ba277e4 Clean up redundant user addons item list copies in helper functions 2010-08-22 03:08:46 +02:00
Paweł Forysiuk
8bea9b586d Fix mistype in addons monitoring to enable watching userscript dirs 2010-08-22 03:07:39 +02:00
Christian Dywan
94fbf158f6 Remove conditional guards for sqlite 2010-07-17 21:31:29 +02:00
Dale Whittaker
0fcc460312 Handle news feeds with empty date and update them correctly 2010-07-15 00:06:15 +02:00
Christian Dywan
c3e145f540 Localize Vala extensions and mark strings for translation
The -include switch is passed to the compiler to work around
Vala failing to include gi18n.h first. This works for
clang and gcc at least.
2010-07-04 10:53:21 +02:00
Alexander Butenko
a04bf24b5e Properly disconnect add-tab on destruction in adblock 2010-06-30 22:41:32 +02:00
André Stösel
07053d49a0 Re-implement History List extension in Vala 2010-06-30 22:27:52 +02:00
Alexander Butenko
e7e2181858 Escape special chars in formhistory array keys 2010-06-30 21:09:55 +02:00
Alexander Butenko
f759fe921a Improve duplicate skipping logic in form history extension 2010-06-30 21:09:55 +02:00
Alexander Butenko
3d972f11e4 Skip '+' sign in adblock rules 2010-06-30 21:09:55 +02:00
Alexander Butenko
0d5a18b69c Skip values from the inputboxes with disabled autocompletion 2010-06-30 21:09:55 +02:00
Alexander Butenko
896cc75f57 Don't inject autosuggest bits where we dont need it 2010-06-30 21:09:55 +02:00
Christian Dywan
a25553edba Add Statusbar Clock extension to POTFILES.in 2010-06-26 22:11:13 +02:00
MonkeyOfDoom
09af931756 Disconnect tabs_minimized_add_tab_cb when deactivating 2010-06-19 22:37:46 +02:00
Alexander Butenko
633b7ed294 Inline functions in adblock for 0.5 percent speedup 2010-06-19 16:22:16 +02:00
MonkeyOfDoom
89e72b73d3 Add extension 'Minimize new Tabs'
Once it is activated the extension will minimize all newly opened
tabs by default.
2010-06-19 00:32:05 +02:00
MonkeyOfDoom
8cbdd61c97 Add extension 'Copy Addresses of Tabs'
The extension adds a menu item to copy the addresses of all tabs
to the clipboard.
2010-06-19 00:30:46 +02:00
André Stösel
0aa24037bd Connect tab switcher to child web view key events
The parent view will do its best to forward the focus to the
child web view, so  the tab switcher should listen to it.
2010-06-01 22:16:47 +02:00
Christian Dywan
c571a6394f Don't pass around KatzeNet instances anymore
The KatzeNet is always a singleton, no need to pass it around.
2010-05-25 19:03:01 +02:00
Enrico Tröger
bab6124cff Guard debug variables in Adblock with G_ENABLE_DEBUG 2010-05-15 01:06:17 +02:00
Christian Dywan
25a08b36ee Move construction of ExternalApplications inside the class 2010-05-15 01:06:17 +02:00
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
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