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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.