vimb.git
10 years agoWrite VIMB_URI environment variable.
Daniel Carl [Fri, 6 Jun 2014 00:32:17 +0000 (02:32 +0200)]
Write VIMB_URI environment variable.

10 years agoRemove obsolete GET_URI() macro.
Daniel Carl [Fri, 6 Jun 2014 00:08:38 +0000 (02:08 +0200)]
Remove obsolete GET_URI() macro.

Removed also the changed-uri signal observer. We get the new URI in the load
status callback right before the event is triggered.

10 years agoAdded first unit tests.
Daniel Carl [Thu, 5 Jun 2014 23:49:47 +0000 (01:49 +0200)]
Added first unit tests.

10 years agoSave current uri in property for easier access.
Daniel Carl [Thu, 5 Jun 2014 23:44:11 +0000 (01:44 +0200)]
Save current uri in property for easier access.

10 years agoFixed trailing / in ~/ expansion.
Daniel Carl [Thu, 5 Jun 2014 21:46:42 +0000 (23:46 +0200)]
Fixed trailing / in ~/ expansion.

If ~/ was expanded the path had a trailing / but according to the shell this
should end up in directory without a slash.

10 years agoAllow to escape all expandable chars.
Daniel Carl [Wed, 4 Jun 2014 22:45:53 +0000 (00:45 +0200)]
Allow to escape all expandable chars.

The expandable chars are always allowed to be escaped by a \ if the expansion
type is active.

10 years agoFixed unused variable.
Daniel Carl [Wed, 4 Jun 2014 22:22:15 +0000 (00:22 +0200)]
Fixed unused variable.

10 years agoRemove unneeded SHELL_CMD.
Daniel Carl [Wed, 4 Jun 2014 22:03:22 +0000 (00:03 +0200)]
Remove unneeded SHELL_CMD.

The g_spawn_command_line_async starts already a shell for us, so there is no
need to start a subshell from there. This fixes also some wired quoting
issues that appeared if there where single quotes in the given command string
to avoid shell expansion. In this case the variables where expanded because of
the quoting issue.

10 years agoAllow to use \\$ to input \$.
Daniel Carl [Wed, 4 Jun 2014 21:46:12 +0000 (23:46 +0200)]
Allow to use \\$ to input \$.

Also fixed uninitialized expansion flags.

10 years agoAllow to escape ~user expansion with \ char.
Daniel Carl [Wed, 4 Jun 2014 21:08:19 +0000 (23:08 +0200)]
Allow to escape ~user expansion with \ char.

10 years agoRemoved obsolete IS_CTRL macro.
Daniel Carl [Wed, 4 Jun 2014 20:02:26 +0000 (22:02 +0200)]
Removed obsolete IS_CTRL macro.

10 years agoUse already existing expansion logic also for ex commands.
Daniel Carl [Sat, 3 May 2014 13:22:25 +0000 (15:22 +0200)]
Use already existing expansion logic also for ex commands.

10 years agoAllow to escape % with \ in expanded commands.
Daniel Carl [Tue, 3 Jun 2014 18:20:24 +0000 (20:20 +0200)]
Allow to escape % with \ in expanded commands.

10 years agoFixed typo in manual page.
Daniel Carl [Tue, 3 Jun 2014 16:02:45 +0000 (18:02 +0200)]
Fixed typo in manual page.

10 years agoUse g_return_*() function to avoid programming issues.
Daniel Carl [Tue, 3 Jun 2014 15:53:24 +0000 (17:53 +0200)]
Use g_return_*() function to avoid programming issues.

10 years agoFixed wrong indented code.
Daniel Carl [Tue, 3 Jun 2014 14:49:45 +0000 (16:49 +0200)]
Fixed wrong indented code.

10 years agoFixed none working customer headers.
Daniel Carl [Tue, 3 Jun 2014 14:47:06 +0000 (16:47 +0200)]
Fixed none working customer headers.

10 years agoMoved char related macro to ascii.h.
Daniel Carl [Tue, 3 Jun 2014 13:45:36 +0000 (15:45 +0200)]
Moved char related macro to ascii.h.

10 years agoFixed segfault on yank without buffer.
Daniel Carl [Tue, 3 Jun 2014 12:13:18 +0000 (14:13 +0200)]
Fixed segfault on yank without buffer.

10 years agoDon't write register or history during setup.
Daniel Carl [Tue, 3 Jun 2014 11:02:32 +0000 (13:02 +0200)]
Don't write register or history during setup.

10 years agoFixed not working * and # commands.
Daniel Carl [Tue, 3 Jun 2014 10:29:39 +0000 (12:29 +0200)]
Fixed not working * and # commands.

If a search phrase was marked and * or # was used, the right matches where
highlighted but 'n' or 'N' did not jump to the next match.

10 years agoSwitch back to normal mode if inputbox is cleared (#55).
Daniel Carl [Mon, 2 Jun 2014 14:54:48 +0000 (16:54 +0200)]
Switch back to normal mode if inputbox is cleared (#55).

10 years agoRemoved unused properties from global scope.
Daniel Carl [Mon, 2 Jun 2014 14:27:57 +0000 (16:27 +0200)]
Removed unused properties from global scope.

10 years agoRemoved none used hash table.
Daniel Carl [Sat, 31 May 2014 22:09:10 +0000 (00:09 +0200)]
Removed none used hash table.

10 years agoUsed new register "/ to continue search.
Daniel Carl [Fri, 30 May 2014 22:01:42 +0000 (00:01 +0200)]
Used new register "/ to continue search.

10 years agoAdded support of read only registers ":, "/ and "%.
Daniel Carl [Fri, 30 May 2014 21:52:32 +0000 (23:52 +0200)]
Added support of read only registers ":, "/ and "%.

10 years agoAdded support for different yank registers.
Daniel Carl [Fri, 30 May 2014 20:26:02 +0000 (22:26 +0200)]
Added support for different yank registers.

Allow to yank, and paste from different registers.

10 years agoAllow to compile also with libsoup below 2.4.
Daniel Carl [Thu, 29 May 2014 18:41:11 +0000 (20:41 +0200)]
Allow to compile also with libsoup below 2.4.

10 years agoAllow to toggle hsts on and off.
Daniel Carl [Wed, 28 May 2014 14:42:15 +0000 (16:42 +0200)]
Allow to toggle hsts on and off.

10 years agoFixed another memory in custom uri handler.
Daniel Carl [Wed, 28 May 2014 10:56:12 +0000 (12:56 +0200)]
Fixed another memory in custom uri handler.

10 years agoFixed memory leak in custom uri handler.
Daniel Carl [Wed, 28 May 2014 10:45:35 +0000 (12:45 +0200)]
Fixed memory leak in custom uri handler.

Added also some warning message if the handler could not be called.

10 years agoFixed considered invalid certificate in hsts over proxy.
Daniel Carl [Wed, 28 May 2014 10:03:03 +0000 (12:03 +0200)]
Fixed considered invalid certificate in hsts over proxy.

10 years agoAdded hsts file to manual page.
Daniel Carl [Wed, 28 May 2014 08:41:52 +0000 (10:41 +0200)]
Added hsts file to manual page.

10 years agoMerge branch 'feature/hsts'
Daniel Carl [Wed, 28 May 2014 08:22:52 +0000 (10:22 +0200)]
Merge branch 'feature/hsts'

Conflicts:
config.mk

10 years agoAdded completion for :shortcut-remove.
Daniel Carl [Mon, 26 May 2014 13:13:44 +0000 (15:13 +0200)]
Added completion for :shortcut-remove.

Simplified some of the completions to avoid duplicate code.

10 years agoAdded completion for :handler-remove command (#82).
Daniel Carl [Mon, 26 May 2014 12:54:02 +0000 (14:54 +0200)]
Added completion for :handler-remove command (#82).

10 years agoUpdated manual page for change handler processing (#82).
Daniel Carl [Sun, 25 May 2014 16:50:37 +0000 (18:50 +0200)]
Updated manual page for change handler processing (#82).

10 years agoUse custom protocol handler for every opened URI (#82).
Daniel Carl [Sun, 25 May 2014 16:10:34 +0000 (18:10 +0200)]
Use custom protocol handler for every opened URI (#82).

10 years agoUpdated manpage to include handler documentation
Samuel Archer [Sat, 24 May 2014 16:54:59 +0000 (12:54 -0400)]
Updated manpage to include handler documentation

10 years agoMoved handler-add and handler-remove after hardcopy.
Daniel Carl [Thu, 22 May 2014 13:02:54 +0000 (15:02 +0200)]
Moved handler-add and handler-remove after hardcopy.

Else the already defined shortcut :ha calls :handler-add instead of :hardcopy

10 years agoMerge pull request #84 from desearcher/master
Daniel Carl [Thu, 22 May 2014 12:53:09 +0000 (14:53 +0200)]
Merge pull request #84 from desearcher/master

Added URI handling on newly spawned windows

10 years agoAdded URI handling on newly spawned windows
Samuel Archer [Wed, 21 May 2014 22:15:20 +0000 (18:15 -0400)]
Added URI handling on newly spawned windows

10 years agoLittle help screen style fix.
Daniel Carl [Tue, 20 May 2014 21:10:31 +0000 (23:10 +0200)]
Little help screen style fix.

10 years agoAdded path expansion for ca-bundle setting.
Daniel Carl [Tue, 20 May 2014 20:44:50 +0000 (22:44 +0200)]
Added path expansion for ca-bundle setting.

The setting ca-bundle can use $ENV, ${ENV} ~user and ~/ for the file path.

10 years agoReleased version 2.4.
Daniel Carl [Tue, 20 May 2014 19:52:57 +0000 (21:52 +0200)]
Released version 2.4.

10 years agoRemoved -ansi build flag.
Daniel Carl [Tue, 20 May 2014 19:51:25 +0000 (21:51 +0200)]
Removed -ansi build flag.

Don't print debug output on built with debug symbols this will disturb the
debug session.

10 years agoAdd newline to generated hinting header file.
Daniel Carl [Tue, 20 May 2014 19:46:47 +0000 (21:46 +0200)]
Add newline to generated hinting header file.

Clang compiler wants a newline at the end of source files.

10 years agoRemoved no more needed session.c.
Daniel Carl [Sun, 11 May 2014 21:01:56 +0000 (23:01 +0200)]
Removed no more needed session.c.

The two remaining function are moved into main.c.

10 years agoMoved cookiejar session feature into own file (#79).
Daniel Carl [Sun, 11 May 2014 20:52:46 +0000 (22:52 +0200)]
Moved cookiejar session feature into own file (#79).

10 years agoSimplified js2h.sh file a little (#76).
Daniel Carl [Sat, 3 May 2014 17:33:46 +0000 (19:33 +0200)]
Simplified js2h.sh file a little (#76).

Removed last echo line and use sed to append the '"' to the string to fix
compile error on FreeBSD.

10 years agoAdded missed stdio.h header (#76).
Daniel Carl [Sat, 3 May 2014 13:23:35 +0000 (15:23 +0200)]
Added missed stdio.h header (#76).

10 years agoFixed wrong url in status bar if hsts changed uri (#79).
Daniel Carl [Thu, 1 May 2014 10:49:28 +0000 (12:49 +0200)]
Fixed wrong url in status bar if hsts changed uri (#79).

This is a workaround for a missbehaviour in webkit. If the URI is changed
within the request-queued scope of the soup session, the changes are not
reflected if the URI is taken from webkit_web_view_get_uri(). Event if the
page is fully loaded webkit assumes to be on the wrong URI, but the
webinspector shows the right one.

10 years agoMerge branch 'master' into feature/hsts
Daniel Carl [Mon, 28 Apr 2014 23:14:11 +0000 (01:14 +0200)]
Merge branch 'master' into feature/hsts

10 years agoMerge branch 'fix/FreeBSD-compile-error'
Daniel Carl [Mon, 28 Apr 2014 23:12:29 +0000 (01:12 +0200)]
Merge branch 'fix/FreeBSD-compile-error'

Conflicts:
config.mk

10 years agoLoad and save hsts whitelist from file (#79).
Daniel Carl [Mon, 28 Apr 2014 21:58:21 +0000 (23:58 +0200)]
Load and save hsts whitelist from file (#79).

10 years agoUse SoupDate instead gint64 to store the expires at (#79).
Daniel Carl [Fri, 25 Apr 2014 12:23:14 +0000 (14:23 +0200)]
Use SoupDate instead gint64 to store the expires at (#79).

10 years agoAdded new session feature for HSTS (#79).
Daniel Carl [Wed, 23 Apr 2014 21:47:43 +0000 (23:47 +0200)]
Added new session feature for HSTS (#79).

The main stuff for the new session feature to handle HTTP strict Transport
Security is added.

10 years agoFixed shown random data if no header was set.
Daniel Carl [Wed, 23 Apr 2014 22:00:36 +0000 (00:00 +0200)]
Fixed shown random data if no header was set.

If the user run `set header=|set header?` there was displayed some random
data because we tried to skip the first ',' of the string event if the string
was empty.

10 years agoFollow gtype convention and renamed class to klass.
Daniel Carl [Tue, 22 Apr 2014 21:23:38 +0000 (23:23 +0200)]
Follow gtype convention and renamed class to klass.

10 years agoDon't show the scrollbars in kiosk mode.
Daniel Carl [Fri, 18 Apr 2014 22:22:33 +0000 (00:22 +0200)]
Don't show the scrollbars in kiosk mode.

The user can scroll via <space> key or cursor keys and mouse wheel, so there
is no need to show the scrollbars if vimb was compiled without scrollbars.

10 years agoAdded kiosk mode.
Daniel Carl [Fri, 18 Apr 2014 22:08:48 +0000 (00:08 +0200)]
Added kiosk mode.

10 years agoAllow to toggle fullsceen.
Daniel Carl [Fri, 18 Apr 2014 21:45:20 +0000 (23:45 +0200)]
Allow to toggle fullsceen.

10 years agoRemove none used error suppression options.
Daniel Carl [Fri, 18 Apr 2014 18:26:05 +0000 (20:26 +0200)]
Remove none used error suppression options.

10 years agoRemove -Wmissing-parameter-type compiler option.
Daniel Carl [Thu, 17 Apr 2014 08:42:23 +0000 (10:42 +0200)]
Remove -Wmissing-parameter-type compiler option.

This seems to be no more required and produced warnings in clang compiler.

10 years agoRemove -Wmissing-parameter-type compiler option.
Daniel Carl [Thu, 17 Apr 2014 08:39:14 +0000 (10:39 +0200)]
Remove -Wmissing-parameter-type compiler option.

This seems to be no more required and produced warnings in clang compiler.

10 years agoFixed wrong default treeView height on gtk3.
Daniel Carl [Tue, 15 Apr 2014 20:24:33 +0000 (22:24 +0200)]
Fixed wrong default treeView height on gtk3.

10 years agoFixed g_source_remove call with none existing source.
Daniel Carl [Tue, 15 Apr 2014 19:20:11 +0000 (21:20 +0200)]
Fixed g_source_remove call with none existing source.

The api was changed and spits out a critical error if a source does no exists.
This was the case when the timeout was remove by glib automatically after the
timeout function returned false.
Now the timeout function does return true to not remove the source
automatically, instead the resource is removed by vimb when the timeout is
handled in the map_handle_keys function.

10 years agoAnother try to fixed FreeBSD compile error (#76).
Daniel Carl [Fri, 11 Apr 2014 19:54:11 +0000 (21:54 +0200)]
Another try to fixed FreeBSD compile error (#76).

10 years agoShow the completion list after the hight was set.
Daniel Carl [Wed, 9 Apr 2014 22:47:19 +0000 (00:47 +0200)]
Show the completion list after the hight was set.

If the completion list is displayed before we set the hight, the user might
see the list for a really short time covering the whole webview window before
it's resized to fit into the lower third of the view. The patch moved the
display of the completion list after the list is calculated and the first
entry is marked as active.

10 years agoFix compile error on FreeBSD (#76).
Daniel Carl [Wed, 9 Apr 2014 21:11:58 +0000 (23:11 +0200)]
Fix compile error on FreeBSD (#76).

10 years agoRemoved obsolete FILE_LOCK_SET macro.
Daniel Carl [Wed, 9 Apr 2014 21:06:42 +0000 (23:06 +0200)]
Removed obsolete FILE_LOCK_SET macro.

10 years agoReleased version 2.3.
Daniel Carl [Sat, 5 Apr 2014 20:50:06 +0000 (22:50 +0200)]
Released version 2.3.

10 years agoMerge branch 'fix/high-dpi'
Daniel Carl [Wed, 2 Apr 2014 21:59:35 +0000 (23:59 +0200)]
Merge branch 'fix/high-dpi'

Conflicts:
src/config.def.h

10 years agoFixed none working open hints in new window (#74).
Daniel Carl [Wed, 2 Apr 2014 07:45:39 +0000 (09:45 +0200)]
Fixed none working open hints in new window (#74).

There is already a hack to allow the hinting JavaScript to open a page also in
a new window without user interaction (hinting in no user interaction in the
manner of webkit). To allow to open hints into new window the webkit setting
'javascript-can-open-windows-automatically' is enabled. After fireing a hint,
this is set back to it's initial value. But this seemed to be to early, what
means we potentially disabled to open page in new window right before the new
window was created.
This patch moved the resetting of the option into the clear function, that
should be late enough.

10 years agoFixed unknown signal for webkit < 1.10.0.
Daniel Carl [Sat, 29 Mar 2014 13:11:13 +0000 (14:11 +0100)]
Fixed unknown signal for webkit < 1.10.0.

10 years agoAllow to built vimb with webkit < 1.10.0.
Daniel Carl [Fri, 28 Mar 2014 11:32:47 +0000 (12:32 +0100)]
Allow to built vimb with webkit < 1.10.0.

10 years agoFixed segfault on open new window via context-menu (#72).
Daniel Carl [Wed, 26 Mar 2014 22:10:52 +0000 (23:10 +0100)]
Fixed segfault on open new window via context-menu (#72).

10 years agoAllow to copy link location via context menu.
Daniel Carl [Wed, 26 Mar 2014 20:50:02 +0000 (21:50 +0100)]
Allow to copy link location via context menu.

10 years agoAdded missed default shortcuts.
Daniel Carl [Wed, 12 Mar 2014 22:46:31 +0000 (23:46 +0100)]
Added missed default shortcuts.

Move the shortcut initializing and cleanup into setting.c, because the
shortcuts are more like settings instead of a own entity.

10 years agoFixed segfault of not shortcut default is set.
Daniel Carl [Wed, 12 Mar 2014 22:41:13 +0000 (23:41 +0100)]
Fixed segfault of not shortcut default is set.

10 years agoRemoved default.h and set default settings in init_settings().
Daniel Carl [Wed, 12 Mar 2014 22:09:32 +0000 (23:09 +0100)]
Removed default.h and set default settings in init_settings().

This saves some time spent on parsing the string values into the setting args.

10 years agoAdded missed precompiler defs for cookie feature.
Daniel Carl [Wed, 12 Mar 2014 21:02:01 +0000 (22:02 +0100)]
Added missed precompiler defs for cookie feature.

10 years agoDon't expand download-path if set.
Daniel Carl [Wed, 12 Mar 2014 20:19:34 +0000 (21:19 +0100)]
Don't expand download-path if set.

It is unusual to expand the variables when they are set. This will irritate
the user in case ':set download-path=$HOME' is set but ':set download-path?'
spits out not what the user set before.
So vimb follows the example given by vim and save the path like is was given
and expands it it it's used.

10 years agoAllow to set empty download-dir.
Daniel Carl [Wed, 12 Mar 2014 20:03:41 +0000 (21:03 +0100)]
Allow to set empty download-dir.

If the download directory is not set or empty the download will be put into
current directory.

10 years agoReplace G_DIR_SEPARATOR by / this is easier to read.
Daniel Carl [Wed, 12 Mar 2014 19:44:05 +0000 (20:44 +0100)]
Replace G_DIR_SEPARATOR by / this is easier to read.

10 years agoUse new chartable instead of ctype.h functions.
Daniel Carl [Tue, 11 Mar 2014 00:37:52 +0000 (01:37 +0100)]
Use new chartable instead of ctype.h functions.

10 years agoDon't expand string via shell.
Daniel Carl [Tue, 11 Mar 2014 00:11:18 +0000 (01:11 +0100)]
Don't expand string via shell.

The shell expansion was done via shell to keep complexity away from vimb, but
this allowed to run other shell commands too, what's a big security issue. To
avoid problems, the ~/, ~user, $ENV and ${ENV} expansions are done in the c
code o vimb.

10 years agoFixed missed line break in man page.
Daniel Carl [Sat, 8 Mar 2014 23:24:58 +0000 (00:24 +0100)]
Fixed missed line break in man page.

10 years agoAdded shell expansion for download paths.
Daniel Carl [Sat, 8 Mar 2014 23:19:46 +0000 (00:19 +0100)]
Added shell expansion for download paths.

10 years agoSimplified :shell command processing.
Daniel Carl [Sat, 8 Mar 2014 21:30:00 +0000 (22:30 +0100)]
Simplified :shell command processing.

10 years agoFixed GTK3 compile error (#67).
Daniel Carl [Sat, 8 Mar 2014 12:49:47 +0000 (13:49 +0100)]
Fixed GTK3 compile error (#67).

10 years agoAdded wget style progressbar.
Daniel Carl [Wed, 5 Mar 2014 23:47:02 +0000 (00:47 +0100)]
Added wget style progressbar.

10 years agoAdapt zoom level for high dpi displays (#67).
Daniel Carl [Wed, 5 Mar 2014 21:39:34 +0000 (22:39 +0100)]
Adapt zoom level for high dpi displays (#67).

10 years agoUse 'tls-database' instead of deprecated 'ssl-ca-file'.
Daniel Carl [Mon, 3 Mar 2014 22:27:29 +0000 (23:27 +0100)]
Use 'tls-database' instead of deprecated 'ssl-ca-file'.

10 years agoFixed none working 'F' hintmode for webkit2.
Daniel Carl [Mon, 3 Mar 2014 21:52:04 +0000 (22:52 +0100)]
Fixed none working 'F' hintmode for webkit2.

If vimb is built against webkit2 webkit's sandbox does not allow to open a
element via JavaScript into a new window. So, webkit does nothing if the
hinting fires a click event on an element that has a none empty target
attribute set.
This patch enables the setting to allow JavaScript to open windows without
user interaction as long as the hinting is active.

10 years agoFixed possible wrong view object in hint clicking.
Daniel Carl [Sun, 2 Mar 2014 20:33:47 +0000 (21:33 +0100)]
Fixed possible wrong view object in hint clicking.

10 years agoAdded async :shellcmd!.
Daniel Carl [Sun, 2 Mar 2014 15:12:54 +0000 (16:12 +0100)]
Added async :shellcmd!.

10 years agoAdded notice about required escaping for prev/nextpattern.
Daniel Carl [Sat, 1 Mar 2014 22:28:55 +0000 (23:28 +0100)]
Added notice about required escaping for prev/nextpattern.

10 years agoAllow to complete multiple tags for :bma command.
Daniel Carl [Sat, 1 Mar 2014 22:09:36 +0000 (23:09 +0100)]
Allow to complete multiple tags for :bma command.

The bookmark adding allowed to complete the given tag out of the known tags in
the bookmark file. But this could only be done for the first tag. This patch
allows to complete multiple tags like ':bma tag1 tag2 ta<Tab>'.

10 years agoFixed wrong download path for pages with trailing /.
Daniel Carl [Thu, 27 Feb 2014 22:07:02 +0000 (23:07 +0100)]
Fixed wrong download path for pages with trailing /.

If a page has a URL with a trailing slash, the suggested file name was an
empty string. But we appended this empty string as file to the download
directory path, so vimb tries to save the download under a directory path an
not a file.
This patch checks the case where the filename is empty so that the default
download file name can be used.