Daniel Carl [Mon, 24 Jul 2017 21:30:39 +0000 (23:30 +0200)]
Use same sorting or url in tag completion.
Show matching url in case of `bmr tag<Tab>` as for the open command
`:open tag<Tab>` which is none sorting to keep the url in the sort order
they where added to the bookmarks. This means the last added bookmarks
or ordered first in the completion list.
Daniel Carl [Mon, 24 Jul 2017 21:23:02 +0000 (23:23 +0200)]
Show --bug-info separate from version.
Do not print to much in case the user is only interested in the current
used version. So show vimb version only on options -v, --version and
added the new option --bug-version which shows the currently used libs
and the library versions vimb was compiled against.
Daniel Carl [Mon, 24 Jul 2017 20:41:57 +0000 (22:41 +0200)]
Remove private PKGBUILD from releases.
Daniel Carl [Sun, 23 Jul 2017 17:00:48 +0000 (19:00 +0200)]
Merge pull request #431 from rti/rti_readme_arch_pkg_update
Update arch pkg info in README.md
Robert Timm [Fri, 21 Jul 2017 07:00:02 +0000 (09:00 +0200)]
updates arch pkg info in README.md
Daniel Carl [Wed, 19 Jul 2017 21:16:37 +0000 (23:16 +0200)]
Update the changelog.
Daniel Carl [Tue, 18 Jul 2017 20:44:06 +0000 (22:44 +0200)]
Add bookmark completion for :bmr.
Daniel Carl [Tue, 11 Jul 2017 21:18:42 +0000 (23:18 +0200)]
Split client creation into pieces.
Setup the gui elements only when the webview is ready to be show like
suggested by the webkit developers.
Daniel Carl [Mon, 17 Jul 2017 23:38:01 +0000 (01:38 +0200)]
Don't duplicate CFLAGS and CPPFLAGS.
Don't put the CPPFLAGS and CFLAGS duplicate to the compiler which lead
to warnings about redefinition of constants on command line like
<command-line>:0:0: warning: "EXTENSIONDIR" redefined
<command-line>:0:0: note: this is the location of the previous
definition
Daniel Carl [Mon, 17 Jul 2017 22:10:51 +0000 (00:10 +0200)]
Allow extended hinting g-mode also for ;o.
The ';o' hinting was not allowed for extended hinting because it makes no
sense to keep hinting open when opening a link into the same window. But
the ';o' hinting matches also form fields so it is useful to allow it
for extended hinting too. So the user can open the extended hinting by
'g;o' and toggle radio buttons and checkboxes and finally submit the
form.
Daniel Carl [Sat, 8 Jul 2017 22:14:15 +0000 (00:14 +0200)]
Do not copy variable used only once.
The copy of variable into a shorter one enlarges the codes size when the
variable is used only once. So don't copy it.
Daniel Carl [Sat, 8 Jul 2017 22:13:22 +0000 (00:13 +0200)]
Fixed none cleared valid hints #427.
Daniel Carl [Sat, 8 Jul 2017 21:20:04 +0000 (23:20 +0200)]
Merge pull request #429 from fanglingsu/issue-427
Switch to numeric hint labeling for hint-keys beginning wiht '0'
Daniel Carl [Sat, 8 Jul 2017 21:16:25 +0000 (23:16 +0200)]
Mention numeric hint-keys in man page #427.
Daniel Carl [Sat, 8 Jul 2017 21:01:05 +0000 (23:01 +0200)]
Use new numeric hint-keys as default setting #427.
Daniel Carl [Sat, 8 Jul 2017 19:57:21 +0000 (21:57 +0200)]
Handle hintkeys beginning with 0 special #427.
Number hints with hintkeys that begin with '0' as numbers starting from
next hint char. Moved hint labeling logic into separate closure.
Daniel Carl [Wed, 28 Jun 2017 22:38:18 +0000 (00:38 +0200)]
Add factory to get hint labeler #427.
Daniel Carl [Tue, 27 Jun 2017 22:34:17 +0000 (00:34 +0200)]
Fixed alignements.
Daniel Carl [Tue, 27 Jun 2017 21:21:16 +0000 (23:21 +0200)]
Fixed wrong scroll position calculation #428.
We use the scrollHeight and the scrollTop of the
document.documentElement. But there are pages where the scrollHeight is
calculated as the same value like the height of the viewport. I can't
identify what causes this issue, but using the document.body
scrollHeight fixes this.
Daniel Carl [Sat, 24 Jun 2017 23:00:52 +0000 (01:00 +0200)]
Always create new user content manager.
We sett all we need on the user content manager so it's the best to set
it to new related webview too.
Daniel Carl [Sat, 24 Jun 2017 22:16:08 +0000 (00:16 +0200)]
Fixed wrong case of bool values in JS calls.
Daniel Carl [Sat, 24 Jun 2017 00:29:08 +0000 (02:29 +0200)]
Use Uppercase bool value from glib.
Daniel Carl [Sat, 24 Jun 2017 00:10:57 +0000 (02:10 +0200)]
Use more async script evaluation #421.
It's better to block UI less by running the hinting stuff. But there are
some points at the time where we can't avoid running the JavaScript
syncronously e.g. to check if the user typed key was handled by the
hinting script or not. Later means that we let the normal mode decide
what to do with this.
Daniel Carl [Wed, 21 Jun 2017 22:43:19 +0000 (00:43 +0200)]
Enable JavaScript as long the hinting is done #421.
As another benefit the scroll and resize observer works so that the
hints are redrawn when the window is resized or the top window is
scrolled.
Daniel Carl [Wed, 21 Jun 2017 20:50:11 +0000 (22:50 +0200)]
Avoid dbus timeout by timeout function in js #421.
I don't understand why the JavaScript blocks the dbus processing or the
return from JavaScript on case of e.click() or on window.location.href =
href; the later only cause dbus timeout when the url does not change
except of the location hash.
Daniel Carl [Wed, 21 Jun 2017 20:43:34 +0000 (22:43 +0200)]
Remove event observers in clear().
Daniel Carl [Tue, 20 Jun 2017 09:14:04 +0000 (11:14 +0200)]
Show extension dir in version output too.
Hope this helps to identify compilation issues in the future where the
webextension is not found.
Daniel Carl [Tue, 20 Jun 2017 22:38:06 +0000 (00:38 +0200)]
Fixed endless loop on hints with same length.
In case hints with same length where generated the loop to get the
number of addressable hints did not end when there was only one single
hintkey defined.
So now do not attempt to run the same length hint label logic in case
there is only one hint key set. In this case normal hint labels are
generated.
Daniel Carl [Tue, 20 Jun 2017 22:18:59 +0000 (00:18 +0200)]
Shortened hint logic a little.
Daniel Carl [Tue, 20 Jun 2017 20:41:50 +0000 (22:41 +0200)]
Recalculate and draw hints after resize or scroll.
Refresh the hints in case of scrolling or resizing of the window. This
does only work in case JavaScript is enabled, else the timeout function
nor the event listeners work.
Daniel Carl [Mon, 19 Jun 2017 21:36:08 +0000 (23:36 +0200)]
More fine grained version info.
Show the libraries vimb was compiled against and that are used at
runtime. Remove license info from the output for 'version' or '-v'
option.
Patrick Steinhardt [Mon, 19 Jun 2017 05:41:49 +0000 (07:41 +0200)]
history: skip adding items if history is disabled
Previous to the migration to webkit2gtk, history items were not added
when either "history-max-items" was set to "0" or if a command was not
inserted by typing, but for example triggered by "au" commands. Right
now, though, this code is #ifdef'd out, so we'll always add items to the
history.
While we currently have no easy way of determining whether a command was
typed or not, we should still refuse adding history items whenever the
"history-max-items" variable is set to "0". As "au"-triggered commands
are not yet supported again, we do not even have to worry about this
case right now, but only later on when it is added. So we fix the issue
now by returning early when `history_max` is not set.
Daniel Carl [Sun, 18 Jun 2017 19:17:05 +0000 (21:17 +0200)]
Shortened variables.
Daniel Carl [Sun, 18 Jun 2017 18:04:34 +0000 (20:04 +0200)]
Merge branch 'improve_hint_char_selection' of https://github.com/rti/vimb.
Robert Timm [Thu, 15 Jun 2017 21:17:13 +0000 (23:17 +0200)]
adds hints.html manual test page
Robert Timm [Thu, 15 Jun 2017 21:16:53 +0000 (23:16 +0200)]
improves hint char selection
Daniel Carl [Thu, 15 Jun 2017 12:57:59 +0000 (14:57 +0200)]
Help contributors to find something to work on.
Daniel Carl [Thu, 15 Jun 2017 12:42:33 +0000 (14:42 +0200)]
Remove TODO which is now available as issue.
Daniel Carl [Wed, 14 Jun 2017 21:53:18 +0000 (23:53 +0200)]
Added goals to CONTRIBUTING file.
Daniel Carl [Wed, 14 Jun 2017 21:35:22 +0000 (23:35 +0200)]
Renamed CONTRIBUTING file because github likes that.
Daniel Carl [Wed, 14 Jun 2017 21:21:28 +0000 (23:21 +0200)]
Fix O after searching caused empty inputbox.
In case a searching is active vimb is still in normal mode. So
'O'-keypress should write ':open URL' to the inputbox and switch vimb
into command mode. But during the switching of the modes, the already
written ':open ..' string was immediately overwritten by empty string.
So the user was left with cursor in empty inputbox.
Now the input is only cleared on stopping searching when a links was
fired during searching which is done in code during
WEBKIT_LOAD_COMMITTED event processing.
Daniel Carl [Wed, 14 Jun 2017 20:59:08 +0000 (22:59 +0200)]
Don't allocate memory for none shown messages.
The logic that decided if a message could be written to input box was in
input_print() which is called with newly allocated and prepared message
string. But in case the widget is focused and we do not intend a forced
update the string preparation was in vain.
So do the check if the input could be written before allocating any
memory.
Daniel Carl [Wed, 14 Jun 2017 20:10:04 +0000 (22:10 +0200)]
Use web context of the webview instead of default.
This should not make any difference at the time but we are free to use
custom web context later.
Daniel Carl [Tue, 13 Jun 2017 20:41:27 +0000 (22:41 +0200)]
Keep xid generation and setting to env close together.
Daniel Carl [Tue, 13 Jun 2017 20:22:19 +0000 (22:22 +0200)]
Don't set window size if embedded #417.
In case vimb is embedded the window size is determined by the embedding
application. Setting the default window size in this case caused screen
redraw issue so that statusbar was not updated properly.
Daniel Carl [Thu, 8 Jun 2017 22:26:24 +0000 (00:26 +0200)]
Lower required webkit version #415.
Daniel Carl [Thu, 8 Jun 2017 22:05:41 +0000 (00:05 +0200)]
Don't limit web processes to one.
Daniel Carl [Mon, 5 Jun 2017 22:14:06 +0000 (00:14 +0200)]
Fixed unused function parameter.
Daniel Carl [Fri, 2 Jun 2017 22:48:27 +0000 (00:48 +0200)]
Don't recompile all objects in scripts change.
Daniel Carl [Fri, 2 Jun 2017 21:22:19 +0000 (23:22 +0200)]
Remove also desktop file on uninstall.
Daniel Carl [Fri, 2 Jun 2017 21:17:44 +0000 (23:17 +0200)]
Adapt comment to fit the js2h logic.
Daniel Carl [Tue, 30 May 2017 21:22:36 +0000 (23:22 +0200)]
Remove duplicate call to webkit_uri_request_get_uri.
Daniel Carl [Tue, 30 May 2017 21:18:39 +0000 (23:18 +0200)]
Remove function parameter to embed new spawned instances.
All calls used the embed flag so this can be removed.
Daniel Carl [Tue, 30 May 2017 21:14:45 +0000 (23:14 +0200)]
Free memory of pid string.
Daniel Carl [Fri, 26 May 2017 21:56:23 +0000 (23:56 +0200)]
Released version 3.0-alpha.
Daniel Carl [Fri, 26 May 2017 22:11:00 +0000 (00:11 +0200)]
Merge branch 'webkit2'.
Daniel Carl [Fri, 26 May 2017 21:54:51 +0000 (23:54 +0200)]
Update license year.
Daniel Carl [Fri, 26 May 2017 21:34:17 +0000 (23:34 +0200)]
Removed no_proxy from man.
This is not done by vimb at the time because the proxy stuff is done by
webkit itself.
Daniel Carl [Wed, 24 May 2017 19:43:02 +0000 (21:43 +0200)]
Set window default size.
Daniel Carl [Wed, 24 May 2017 19:04:32 +0000 (21:04 +0200)]
Add :clearcache command.
This allows to discard all caches currently used by webkit.
Daniel Carl [Wed, 24 May 2017 18:42:30 +0000 (20:42 +0200)]
Removed hard coded tls policy.
The policy is already set during setting initialization.
Daniel Carl [Tue, 23 May 2017 21:17:40 +0000 (23:17 +0200)]
Sort changed settings.
Daniel Carl [Tue, 23 May 2017 21:09:57 +0000 (23:09 +0200)]
Added hardware acceleration to man page.
Daniel Carl [Tue, 23 May 2017 20:45:06 +0000 (22:45 +0200)]
Use dashed naming for user-agent too.
Daniel Carl [Tue, 23 May 2017 20:29:11 +0000 (22:29 +0200)]
Change default user-agent.
Use the user-agent that would be created by
webkit_settings_set_user_agent_with_application_details.
Daniel Carl [Sat, 20 May 2017 23:58:54 +0000 (01:58 +0200)]
Stop hinting when element clicked by mouse.
In case a links was clicked by mouse during active hinting, the new page
was loaded and kept still in hinting mode but there where no hints shown
on the new page.
Daniel Carl [Sat, 20 May 2017 23:55:03 +0000 (01:55 +0200)]
Don't handle hint in new window by javascript.
There are a lot of restrictions that introduces some hacks to allow to
open hints into new window. The hinting script does now only fire the
hints in case of ;o and ;t hinting and the decision where to open the
navigation decision is met in the c layer.
Daniel Carl [Sat, 20 May 2017 22:32:20 +0000 (00:32 +0200)]
Don't attempt to open empty url by hinting.
There are pages where following links are used <a href="#"
onclick="...">...</a>. In this special case of href="#" the elements
should be clicked to let webkit decide how to handle the element instead
of opening current page with appended location mark.
Daniel Carl [Sat, 20 May 2017 22:18:53 +0000 (00:18 +0200)]
Merge branch 'pks/hints-without-js' of https://github.com/pks-t/vimb into webkit2
Daniel Carl [Sat, 20 May 2017 22:04:27 +0000 (00:04 +0200)]
Merge branch 'pks/scroll-page' of https://github.com/pks-t/vimb into webkit2
Daniel Carl [Sat, 20 May 2017 22:01:06 +0000 (00:01 +0200)]
Merge branch 'pks/acceleration-settings' of https://github.com/pks-t/vimb into webkit2
Daniel Carl [Sat, 20 May 2017 21:55:02 +0000 (23:55 +0200)]
Merge branch 'pks/clear-scripts' of https://github.com/pks-t/vimb into webkit2
Patrick Steinhardt [Sat, 20 May 2017 16:56:18 +0000 (18:56 +0200)]
hints: do not execute `click` in addition to opening hints
When the element which we are about to open has a "href" attribute, we
will execute either `window.open` or set the `window.location.href`
attribute to the target's reference. But as we forgot to call `return`
here, we will also execute the code to open elements without "href"
attribute. In the case of opening a new window, we will now first open
the new window and then also set the current window's URL to the target,
which is obviously wrong.
Fix the issue by putting the excution of `click()` inside an
else-branch.
Patrick Steinhardt [Sat, 20 May 2017 16:49:08 +0000 (18:49 +0200)]
hints: use `window.location.href` to change current URL
When opening a hint in the current window, we do so by emulating a
`click()` on the element that we want to switch to. This enables us to
open hints when there is no href set, e.g. when the element executes
JavaScript to change the page. Unfortunately, this method of opening
links does not work when JavaScript is disabled in the client.
If the element has a `href` attribute, we can work around this problem
by directly setting `window.location.href` to the element's reference.
Next to being a more obvious method of setting the current URL, this
also fixes hints with JavaScript disabled. Note that we still have to
keep around the old method of using `click()` on the element in case it
has no href attribute.
Patrick Steinhardt [Sat, 20 May 2017 15:35:44 +0000 (17:35 +0200)]
scroll: fix percent-based scrolling
Scrolling via ^D and ^U should scroll by a percentage of the client's
current viewport. We do this in JavaScript via the client height of the
document's element. Accidentally, it may hold the desired value in some
cases, but in general it only holds the total height of the element
itself. What we desire instead is the window's height, which can be
retrieved via `Window.innerHeight`. Like this, our calculations are not
based upon the webpage but instead on the browser window, fixing
scrolling on some pages.
Patrick Steinhardt [Sat, 20 May 2017 10:25:25 +0000 (12:25 +0200)]
setting: expose hardware acceleration settings
Previous to the migration to the WebKit 2 API, we were exposing settings
to enable hardware acceleration for compositing via
"accelerated-compositing". With WebKit 2, there are two relevant
settings to enable compositing. The "hardware-acceleration_policy" is
used to determine when the rendering process should actually use
hardware acceleration. "accelerated-2d-canvas" enables hardware
acceleration for some 2D canvas content if WebKitGTK+ is built with
Cairo and its unstable CairoGL API.
Thes patch exposes both of these settings via vimb's settings engine.
Patrick Steinhardt [Sat, 20 May 2017 08:42:40 +0000 (10:42 +0200)]
hints: remove unused hints.js.h file
The "hints.js.h" file has been superseded by "scripts.h", which is
generated by make from our JavaScript and CSS files. As such, we can
remove the unused "hints.js.h" file and remove the include from
"hints.c".
Patrick Steinhardt [Sat, 20 May 2017 08:36:40 +0000 (10:36 +0200)]
setting: always clear scripts previous to adding global ones
Previous to adding user scripts to the content manager, we should always
clear existing scripts. Otherwise, e.g. in the sequence
:set user-scripts=off
:set user-scripts=on
we'd end up with the same global scripts injected twice.
Fix the issue by unconditionally clearing all user scripts previous to
adding scripts.
Daniel Carl [Fri, 19 May 2017 22:31:56 +0000 (00:31 +0200)]
Cast to OptArgFunction.
Daniel Carl [Fri, 19 May 2017 21:55:06 +0000 (23:55 +0200)]
Move include of hints.js.h to the right place.
Robert Timm [Fri, 19 May 2017 12:16:08 +0000 (14:16 +0200)]
adds insight about shortcut-default #365
Robert Timm [Fri, 19 May 2017 08:05:55 +0000 (10:05 +0200)]
adds incsearch to manpage (#365)
Daniel Carl [Thu, 18 May 2017 23:47:58 +0000 (01:47 +0200)]
Mention runsandbox target in README.
Daniel Carl [Thu, 18 May 2017 23:41:58 +0000 (01:41 +0200)]
Update change settings in CHANGELOG.
Daniel Carl [Thu, 18 May 2017 23:38:58 +0000 (01:38 +0200)]
Add settings for spell checking.
Daniel Carl [Thu, 18 May 2017 22:12:45 +0000 (00:12 +0200)]
Increase default z-index for hint elements.
There are some sites where the hint label where covered by on page
elements using a high z-index. So increase our default too.
Robert Timm [Thu, 18 May 2017 11:24:24 +0000 (13:24 +0200)]
fixes serif-font setting name to match manpage
Ferenc- [Thu, 18 May 2017 08:58:55 +0000 (10:58 +0200)]
Eliminate dead code from main.c
1. Value stored in 'num' in line 161 was never read
since it was unconditionally overwritten immediately in 166.
2. Value stored in 'suffix' in line 145 was never read
since it was overwritten in both branches of 'if(dot_post)'.
3. Value stored in 'req' in line 1157 was never read
if the branch of the first if statement is taken.
Storing has been placed int to the second if statement,
where it is actually used.
Daniel Carl [Tue, 16 May 2017 22:01:12 +0000 (00:01 +0200)]
Added missed ;x hinting to man page.
Daniel Carl [Tue, 16 May 2017 21:39:21 +0000 (23:39 +0200)]
Use dashed setting names.
The mixes use of none separated settings names and those containing
multiple dashes looked ugly. So use consequently dashes setting names.
Daniel Carl [Tue, 16 May 2017 21:23:33 +0000 (23:23 +0200)]
Added current available settings to man page #365.
Daniel Carl [Tue, 16 May 2017 21:21:48 +0000 (23:21 +0200)]
Added missed x-hint-command setting.
Daniel Carl [Mon, 15 May 2017 20:27:28 +0000 (22:27 +0200)]
Add space after sed -e option #388.
Daniel Carl [Fri, 12 May 2017 23:29:49 +0000 (01:29 +0200)]
Remove also whitespace around *%/[.
Daniel Carl [Fri, 12 May 2017 23:13:58 +0000 (01:13 +0200)]
Close comments in js on end of line.
The multi line comments /* */ must be closed on the same line. Because
the simple script that minifies the scripts a little can only remove
those on same line closed comments properly.
Robert Timm [Fri, 12 May 2017 21:32:15 +0000 (23:32 +0200)]
fixes :eval segfault (closes #397)
Michael Danilov [Thu, 27 Apr 2017 14:33:08 +0000 (16:33 +0200)]
js2sh.sh: sed for was GNU-specific.
Daniel Carl [Fri, 12 May 2017 11:26:39 +0000 (13:26 +0200)]
Mention mailing list also for the contributors.
Daniel Carl [Fri, 12 May 2017 11:16:19 +0000 (13:16 +0200)]
Moved contribution related stuff from README to CONTRIBUTE.
Daniel Carl [Thu, 11 May 2017 22:35:59 +0000 (00:35 +0200)]
Added editor to man page #347.