Commit Graph

4997 Commits

Author SHA1 Message Date
Florian Bruhin
330e03d382 Merge branch 'sbinix-master' 2015-03-18 20:44:21 +01:00
Florian Bruhin
e3f9a08611 Regenerate docs 2015-03-18 20:24:54 +01:00
Florian Bruhin
1a534454e2 Make it possible to correct author names in src2asciidoc. 2015-03-18 20:24:47 +01:00
Florian Bruhin
c83775cf29 Update icon db path when private-browsing changed. 2015-03-18 20:20:04 +01:00
Florian Bruhin
706cc1a87f Merge branch 'master' of https://github.com/sbinix/qutebrowser into sbinix-master
Conflicts:
	qutebrowser/config/websettings.py
2015-03-18 20:16:36 +01:00
Florian Bruhin
ca22ed02e6 Fix via_ipc typo. 2015-03-17 19:13:44 +01:00
Florian Bruhin
2b10adfad7 Remove colors -> completion.item.bg config option.
This wasn't used anywhere...
2015-03-17 07:45:11 +01:00
Florian Bruhin
2dcf323077 Add missing docstrings. 2015-03-17 06:39:02 +01:00
Florian Bruhin
94bc10405a Merge branch 'histcomplete' 2015-03-17 06:16:26 +01:00
Florian Bruhin
9a405df560 Whoops. 2015-03-16 23:32:49 +01:00
Florian Bruhin
210ce8ca7c Don't poll for signals on Unix.
A better solution is to use QSocketNotifier and os.wakeup_fd to get notified
about new signals.

Thanks to Yuya Nishihara / TortoiseHG for the hint!

Fixes #555.
2015-03-16 23:25:36 +01:00
Florian Bruhin
6dc65287a9 Discard uninteresting events early in eventFilter.
Before, we ran quite a lot of code (e.g. objreg) on every event, even if it
turns out to not be a keypress/release event at all.
2015-03-16 23:25:29 +01:00
Florian Bruhin
f1b9a3c8b5 Ensure there's no size for font-family settings.
See #549.
2015-03-16 18:32:17 +01:00
Florian Bruhin
4157cfe86f Merge branch 'issue549-fix' 2015-03-16 18:03:00 +01:00
Florian Bruhin
b1f99392e8 Add some more logging for #549. 2015-03-16 18:01:02 +01:00
Florian Bruhin
b226426f15 Adjust package names in stacktrace.asciidoc. 2015-03-16 17:45:53 +01:00
Florian Bruhin
1aaa538b45 Ignore empty lines in history. 2015-03-16 10:45:50 +01:00
Florian Bruhin
59bbca9b40 Fix updating of existing items in hist-completion.
Before we limited the history items we could simply call WebHistory's
historyContains before iterating through all items in the history completion.

Now however it's possible an item is in the real WebHistory, but not actually
in the completion - so we always have to check the whole completion.
2015-03-16 09:20:09 +01:00
Florian Bruhin
777e3f58e1 Make network inaccessible in test QWebPages.
Maybe fixes #553.
2015-03-16 08:32:17 +01:00
Florian Bruhin
806742abd3 Move new entries to the end when loading history.
Before, if an URL was present early in the history and then again later, we
didn't move it to the end of the OrderedDict. This means it won't be loaded in
the completion.
2015-03-16 07:54:39 +01:00
Florian Bruhin
3df5e13c65 Fix exception in filtermodel if model has no items. 2015-03-16 07:42:21 +01:00
Florian Bruhin
503060881a Compare history items based on QUrl. 2015-03-16 07:42:10 +01:00
Florian Bruhin
693ea0c312 Cleanup 2015-03-16 07:10:06 +01:00
Florian Bruhin
553d8cf986 Also save the QUrl in a HistoryEntry.
We also use QUrl::toDisplayString for the completion so things like spaces or
umlauts are decoded properly.
2015-03-16 07:03:30 +01:00
Florian Bruhin
46c31911a6 Add a test for utils.debug.log_time. 2015-03-16 06:43:56 +01:00
Florian Bruhin
57b7b43802 Regenerate docs. 2015-03-15 23:25:57 +01:00
Florian Bruhin
001bf982e5 Alternate row colors in completion. 2015-03-15 23:16:57 +01:00
Florian Bruhin
d266665955 Fix adding of URLs to history completion.
Before, the item_added signal was emitted *after* an item was added, which
means the on_history_item_added slot always assumed the item already is in the
history.
2015-03-15 21:16:45 +01:00
Florian Bruhin
9512a52d21 completion: Don't unnecessarily expand all items.
Instead of calling expandAll() and iterating through all items, we can just
force the top-level items to be expanded.
2015-03-14 22:51:53 +01:00
Florian Bruhin
cdbb118238 Also measure the time it takes to set the pattern. 2015-03-14 13:35:32 +01:00
Florian Bruhin
70cd8e74eb Measure time it takes to init URL completion. 2015-03-14 13:32:47 +01:00
Florian Bruhin
a857b9a638 Regenerate docs. 2015-03-13 19:50:20 +01:00
Florian Bruhin
833830d5e9 Limit the count of history items in the completion. 2015-03-13 19:50:08 +01:00
Florian Bruhin
55eabafc0d Rename completion -> history-length.
This is now renamed to cmd-history-max-items to avoid confusion with the web
history.
2015-03-13 19:46:21 +01:00
Florian Bruhin
901db0911e Add __len__ to WebHistory. 2015-03-13 19:45:43 +01:00
Florian Bruhin
994546f04d Use an OrderedDict for WebHistory.
We need the URLs in the correct order to get the newest items anyways.
2015-03-13 19:44:15 +01:00
Florian Bruhin
94f694bd77 Add an utils.newest_slice.
This takes an iterable and uses itertools.islice to get the n newest elements
from it.
2015-03-13 19:25:48 +01:00
Florian Bruhin
96da7d9fe6 Fix lint. 2015-03-13 16:26:27 +01:00
Florian Bruhin
74892ac8e4 Initialize completions lazily and only once.
Before, we initialized the completions once for every window spawned, which was
a waste of CPU-time and RAM.

Now we only initialize them once, when the user uses the completion for the
first time.
2015-03-13 16:25:13 +01:00
Florian Bruhin
cef49864d9 Refactor websettings and save/restore defaults.
This makes qutebrowser.config.websettings much easier to understand, and saves
all defaults so it can restore them properly when a setting is set to an empty
string.

Before, when we set the fonts to empty strings instead of the true default, in
some cases anti-aliasing was broken.

Fixes #549.
2015-03-13 10:03:17 +01:00
Florian Bruhin
ccce2eddad Add logging for websettings init.
See #549.
2015-03-12 22:41:12 +01:00
Florian Bruhin
389feab1df Make sure args are not int in new_item().
Otherwise we would construct a QStandardItem with the
QStandardItem(int rows, int columns = 1) constructor, which will most likely
not do what we want.
2015-03-12 15:35:53 +01:00
Florian Bruhin
dbd121a079 Set data of existing item. 2015-03-12 15:34:32 +01:00
Florian Bruhin
97dd86735a Improve types of history model values.
- HistoryItem.atime now always should be an int/float.
- The data for the sort role should also be an int, not a string.
  A float would also work, but maybe be slower for no real benefit.
2015-03-12 15:34:32 +01:00
Florian Bruhin
8023b1456d Make it possible to configure the timestamp format. 2015-03-12 15:25:39 +01:00
Florian Bruhin
7a28b6c821 Fix lint. 2015-03-12 14:55:54 +01:00
Florian Bruhin
299dbfa56a history: Remove unneeded _old_hit and _old_miss.
The need for those were removed in #548.
2015-03-12 14:46:49 +01:00
Jimmy
61e732f217 history: simplify 2015-03-12 21:35:56 +13:00
Jimmy
1efe18ecc6 Prevent duplicates in history completion.
Two things here. One is to use `WebHistory._new_history` only as a to-save
queue, so we now add entries to `_old_urls` when they are first created and
can now no longer iterate of `_new_history` in `__iter__()`.

Second is to stop blindly tacking new history entries on the end of the
history completion model. It does involve iterating over the model to find the
existing entry but we only do that if we know the duplicate is there, which is
fast to check.

This also ads another point of mutation to the history completion model which
may prove problematic if it leads to more segfaults.
2015-03-12 20:15:03 +13:00
Jimmy
734268187c Clean up incomprehensible comment. 2015-03-12 20:12:59 +13:00