vimb.git
11 years agoRemoved default download path.
Daniel Carl [Sun, 21 Apr 2013 13:10:16 +0000 (15:10 +0200)]
Removed default download path.

In multiuser environments it's not a good idea to save the downloads in the
widely readable /tmp directory. Now the users home directory will be used as
default download directory.

11 years agoDisabling WebKit deletion interface feature by default.
Daniel Carl [Sat, 20 Apr 2013 15:31:46 +0000 (17:31 +0200)]
Disabling WebKit deletion interface feature by default.

11 years agoFixed scrolling over the end of the page.
Daniel Carl [Sat, 20 Apr 2013 14:56:40 +0000 (16:56 +0200)]
Fixed scrolling over the end of the page.

If the scrolling reached the end of the page, further scrolling set higher
adjustments. If the user scrolled to top, this didn't take effect immediately.

11 years agoAdded rounding to the percent of page in status bar.
Daniel Carl [Sat, 20 Apr 2013 14:25:26 +0000 (16:25 +0200)]
Added rounding to the percent of page in status bar.

If the user scrolled to 1% of the page there was 0% shown and with 50G vimb
browser showed 49% in status bar. This patch adapts the rounding of the values
in the status bar so that they fit to the done scrolling.

11 years agoDon't allow third party cookies.
Daniel Carl [Sun, 14 Apr 2013 20:55:28 +0000 (22:55 +0200)]
Don't allow third party cookies.

11 years agoAdded new external editor feature to README.
Daniel Carl [Sun, 14 Apr 2013 20:02:09 +0000 (22:02 +0200)]
Added new external editor feature to README.

11 years agoAdded new hinting mode to open form fields with editor (#15).
Daniel Carl [Sun, 14 Apr 2013 19:53:12 +0000 (21:53 +0200)]
Added new hinting mode to open form fields with editor (#15).

11 years agoAdded command to open input boxes or text areas with editor (#15).
Daniel Carl [Sun, 14 Apr 2013 18:01:20 +0000 (20:01 +0200)]
Added command to open input boxes or text areas with editor (#15).

11 years agoFixed segmentation fault in command history.
Daniel Carl [Sun, 14 Apr 2013 18:15:34 +0000 (20:15 +0200)]
Fixed segmentation fault in command history.

If the history contained any item with printf placeholders like %s we got a
segmentation fault if we print the value to the user. This patch use a
dedicated format string for all user generated contents to be shown with
vb_echo and vb_echo_force.

11 years agoBumped to version 0.1.6.
Daniel Carl [Sat, 13 Apr 2013 11:45:00 +0000 (13:45 +0200)]
Bumped to version 0.1.6.

11 years agoAdded new function to get active dom element.
Daniel Carl [Sat, 13 Apr 2013 10:17:48 +0000 (12:17 +0200)]
Added new function to get active dom element.

Change api of dom function to take the webview as parameter.

11 years agoFixed segmentation fault in finding active element.
Daniel Carl [Tue, 9 Apr 2013 08:36:23 +0000 (10:36 +0200)]
Fixed segmentation fault in finding active element.

11 years agoFixed no more working command completion with counts.
Daniel Carl [Mon, 8 Apr 2013 22:10:12 +0000 (00:10 +0200)]
Fixed no more working command completion with counts.

Commands with count could not be completed, because the count extraction was
removed in previous commits so that :5scro<tab> could not be completed.

11 years agoAdded section about keybindings to manual page.
Daniel Carl [Mon, 8 Apr 2013 21:59:54 +0000 (23:59 +0200)]
Added section about keybindings to manual page.

11 years agoAdded ENVIRONMENT section to manual page.
Daniel Carl [Mon, 8 Apr 2013 20:38:43 +0000 (22:38 +0200)]
Added ENVIRONMENT section to manual page.

11 years agoAdded example for :eval command to manual page.
Daniel Carl [Mon, 8 Apr 2013 20:30:56 +0000 (22:30 +0200)]
Added example for :eval command to manual page.

11 years agoFixed no input leafing on some sites.
Daniel Carl [Mon, 8 Apr 2013 20:12:48 +0000 (22:12 +0200)]
Fixed no input leafing on some sites.

On some pages like http://dict.leo.org/?search=programming the input mode
could be leafed, but all further typed chars where still written into the
input form field. This makes the browser unusable if such a page was opened.

Now we observe the webview and input box to also catch the types chars away,
if vimb browser is not in insert mode.

The key events are not observed for the whole window to not apply our
keybindings to the webinspector too, that will break the usability of the
webinspector.

11 years agoAdded command to run javascript from input box.
Daniel Carl [Mon, 8 Apr 2013 19:47:00 +0000 (21:47 +0200)]
Added command to run javascript from input box.

11 years agoRefactored the vb_set_mode function.
Daniel Carl [Mon, 8 Apr 2013 18:29:37 +0000 (20:29 +0200)]
Refactored the vb_set_mode function.

I hope now it's better to see what's done.

11 years agoFixed none shown -- INPUT -- in inputbox.
Daniel Carl [Mon, 8 Apr 2013 17:57:56 +0000 (19:57 +0200)]
Fixed none shown -- INPUT -- in inputbox.

If Input fields where hinted, the -- INPUT -- was not shown in the inputbox,
because the hinting where not cleared in this case.

11 years agoRemove settings hashmap from global scope.
Daniel Carl [Sun, 7 Apr 2013 18:37:23 +0000 (20:37 +0200)]
Remove settings hashmap from global scope.

11 years agoRenamed soup_session -> session.
Daniel Carl [Sun, 7 Apr 2013 18:32:26 +0000 (20:32 +0200)]
Renamed soup_session -> session.

11 years agoRemoved search engines data from global scope.
Daniel Carl [Sun, 7 Apr 2013 18:26:51 +0000 (20:26 +0200)]
Removed search engines data from global scope.

11 years agoRemoved keybind data from global scope.
Daniel Carl [Sun, 7 Apr 2013 18:19:30 +0000 (20:19 +0200)]
Removed keybind data from global scope.

11 years agoRemoved command hash map from global scope.
Daniel Carl [Sun, 7 Apr 2013 18:10:14 +0000 (20:10 +0200)]
Removed command hash map from global scope.

11 years agoRemoved hint data struct from global scope.
Daniel Carl [Sun, 7 Apr 2013 18:00:20 +0000 (20:00 +0200)]
Removed hint data struct from global scope.

11 years agoRemoved completions data from global scope.
Daniel Carl [Sun, 7 Apr 2013 17:55:13 +0000 (19:55 +0200)]
Removed completions data from global scope.

The available and active completions are now only accessible in completion.c.

11 years agoRemoved shell escaping for bookmark tags.
Daniel Carl [Sun, 7 Apr 2013 14:02:51 +0000 (16:02 +0200)]
Removed shell escaping for bookmark tags.

It's enough and easier to save the tags like they are and to split them with
g_strsplit().

11 years agoChanged the default config to array of chars instead of structs.
Daniel Carl [Sun, 7 Apr 2013 13:27:29 +0000 (15:27 +0200)]
Changed the default config to array of chars instead of structs.

11 years agoAdded pre-compiler flags to disable cookie support.
Daniel Carl [Sun, 7 Apr 2013 13:10:40 +0000 (15:10 +0200)]
Added pre-compiler flags to disable cookie support.

11 years agoChanged TRUE to true in all files.
Daniel Carl [Sun, 7 Apr 2013 13:00:32 +0000 (15:00 +0200)]
Changed TRUE to true in all files.

11 years agoFixed compiler erro with gtk3.
Daniel Carl [Sun, 7 Apr 2013 12:56:16 +0000 (14:56 +0200)]
Fixed compiler erro with gtk3.

Fixed none shown inputbox and statusbar if compiled against gtk3.

11 years agoAdded new bookmark feature to README file.
Daniel Carl [Sat, 6 Apr 2013 19:10:53 +0000 (21:10 +0200)]
Added new bookmark feature to README file.

11 years agoBumped to version 0.1.5.
Daniel Carl [Sat, 6 Apr 2013 19:08:42 +0000 (21:08 +0200)]
Bumped to version 0.1.5.

11 years agoRemoved no more required function to concatenate list.
Daniel Carl [Sat, 6 Apr 2013 18:53:54 +0000 (20:53 +0200)]
Removed no more required function to concatenate list.

11 years agoSimplified completion filtering to use the whole search string.
Daniel Carl [Sat, 6 Apr 2013 18:24:25 +0000 (20:24 +0200)]
Simplified completion filtering to use the whole search string.

We search the whole given string in the completion items instead of splitting
it into tokens to match them separately.

11 years agoSplit completion creation from filtering of the lists.
Daniel Carl [Sat, 6 Apr 2013 18:19:29 +0000 (20:19 +0200)]
Split completion creation from filtering of the lists.

11 years agoShow bookmarked uri also in completion list (#4).
Daniel Carl [Sat, 6 Apr 2013 17:38:29 +0000 (19:38 +0200)]
Show bookmarked uri also in completion list (#4).

11 years agoFixed wrong file lock used to read history items.
Daniel Carl [Sat, 6 Apr 2013 14:48:19 +0000 (16:48 +0200)]
Fixed wrong file lock used to read history items.

11 years agoAdded command to save current uri as bookmark (#4).
Daniel Carl [Sat, 6 Apr 2013 14:23:45 +0000 (16:23 +0200)]
Added command to save current uri as bookmark (#4).

11 years agoAdded feature of custom configuration file to readme.
Daniel Carl [Fri, 5 Apr 2013 16:21:14 +0000 (18:21 +0200)]
Added feature of custom configuration file to readme.

11 years agoAdded .gitignore file.
Daniel Carl [Fri, 5 Apr 2013 16:19:54 +0000 (18:19 +0200)]
Added .gitignore file.

11 years agoRemoved function prefixes of static functions.
Daniel Carl [Fri, 5 Apr 2013 16:15:05 +0000 (18:15 +0200)]
Removed function prefixes of static functions.

11 years agoRefactored the soup session (#14).
Daniel Carl [Fri, 5 Apr 2013 15:36:40 +0000 (17:36 +0200)]
Refactored the soup session (#14).

Move session related logic into own c file. Added file locking to cookie jar
file.

11 years agoRestructures searchengine lookup.
Daniel Carl [Fri, 5 Apr 2013 12:18:38 +0000 (14:18 +0200)]
Restructures searchengine lookup.

Fixe no more working searching for multiple search terms.

11 years agoMade cookie timeout setting a little simpler.
Daniel Carl [Fri, 5 Apr 2013 10:38:30 +0000 (12:38 +0200)]
Made cookie timeout setting a little simpler.

11 years agoDon't call search engine for url like http://localhost.
Daniel Carl [Thu, 4 Apr 2013 15:39:07 +0000 (17:39 +0200)]
Don't call search engine for url like localhost.

11 years agoAllow to specify custom config file via cli option (#12).
Daniel Carl [Thu, 4 Apr 2013 15:26:24 +0000 (17:26 +0200)]
Allow to specify custom config file via cli option (#12).

11 years agoAdded missed free for the result of realpath.
Daniel Carl [Thu, 4 Apr 2013 15:14:00 +0000 (17:14 +0200)]
Added missed free for the result of realpath.

11 years agoRemoved to much g_strstrip() from commands.
Daniel Carl [Sat, 30 Mar 2013 14:46:25 +0000 (15:46 +0100)]
Removed to much g_strstrip() from commands.

Normally we, don't need to trim trailing whitespace to run the commands
properly. So it's enough to remove leading whitespace. If also trailing
whitespace is removed, commands like 'input :open ' won't work anymore,
because they contain essential tailing whitespace.

11 years agoDisable the scrollbars from within the application.
Daniel Carl [Sat, 30 Mar 2013 14:11:51 +0000 (15:11 +0100)]
Disable the scrollbars from within the application.

Maybe it's not so nice to configure the .gtkrc-2.0 if someone start playing
around with the vimb browser. So we disable the scrollbars programmatic. But
for now this will not work when vimb is compiled agains gtk3 libs.

11 years agoUse lower case boolean values.
Daniel Carl [Sat, 30 Mar 2013 13:59:57 +0000 (14:59 +0100)]
Use lower case boolean values.

If they are lower case, vim can highlight them correct.

11 years agoAllow to run multiple command together.
Daniel Carl [Fri, 29 Mar 2013 23:49:56 +0000 (00:49 +0100)]
Allow to run multiple command together.

For example following will work
:run set input-bg-normal=#000 | set input-fg-normal=#fff | 5pagedown.

11 years agoFixed none working hint class replacing.
Daniel Carl [Sat, 30 Mar 2013 01:13:27 +0000 (02:13 +0100)]
Fixed none working hint class replacing.

If a hint become focused the new hint class was not set properly to the
element. And the hint class was already set if the hints where cleared.

11 years agoRenamed hint css class for focused hint.
Daniel Carl [Sat, 30 Mar 2013 00:51:29 +0000 (01:51 +0100)]
Renamed hint css class for focused hint.

11 years agoFixed error message on leafing input mode.
Daniel Carl [Fri, 29 Mar 2013 23:23:35 +0000 (00:23 +0100)]
Fixed error message on leafing input mode.

11 years agoEscape back-slashes in js2h.sh helper script.
Daniel Carl [Fri, 29 Mar 2013 23:04:06 +0000 (00:04 +0100)]
Escape back-slashes in js2h.sh helper script.

11 years agoRearranged variables in header files.
Daniel Carl [Fri, 29 Mar 2013 22:59:50 +0000 (23:59 +0100)]
Rearranged variables in header files.

11 years agoMoved variables to the top of function.
Daniel Carl [Fri, 29 Mar 2013 22:54:55 +0000 (23:54 +0100)]
Moved variables to the top of function.

11 years agoMoved pointer * from type to the variables.
Daniel Carl [Fri, 29 Mar 2013 22:33:18 +0000 (23:33 +0100)]
Moved pointer * from type to the variables.

11 years agoBetter performance for command history.
Daniel Carl [Fri, 29 Mar 2013 14:33:34 +0000 (15:33 +0100)]
Better performance for command history.

Don't set the input colors and font for every printed string. This operation
is a show stopper. Now we change the style only if the message type changes or
the related settings are changed.

11 years agoExtracted some duplicate logic from vb_echo* functions.
Daniel Carl [Fri, 29 Mar 2013 13:52:40 +0000 (14:52 +0100)]
Extracted some duplicate logic from vb_echo* functions.

11 years agoRemove no more needed command_write_input function.
Daniel Carl [Fri, 29 Mar 2013 13:38:20 +0000 (14:38 +0100)]
Remove no more needed command_write_input function.

The input writing can be done direct with vb_echo_force() instead.

11 years agoChanged history stepping to act like in vim.
Daniel Carl [Fri, 29 Mar 2013 13:21:38 +0000 (14:21 +0100)]
Changed history stepping to act like in vim.

Now the history isn't wrap searched. The history can only be started in
previous direction. The latest entry in next direction (latest item) is an
empty items so that we print only the prefix into the input box.

Further the g_list_get_nth_data() was removed, because this is slower than
stepping through the list direct via previous and next.

11 years agoSplit history_get function into two parts.
Daniel Carl [Fri, 29 Mar 2013 11:42:17 +0000 (12:42 +0100)]
Split history_get function into two parts.

11 years agoFixed default search engine lookup without handle.
Daniel Carl [Fri, 29 Mar 2013 11:24:29 +0000 (12:24 +0100)]
Fixed default search engine lookup without handle.

To get the search handle the string after :open was split by space char. If
only one term was given we skipped the lookup of the search engine so that it
wasn't possible to search for a single term without a given search handle.

11 years agoRemoved count from hist-prev and hist-next command.
Daniel Carl [Tue, 26 Mar 2013 23:58:03 +0000 (00:58 +0100)]
Removed count from hist-prev and hist-next command.

There was never a possible way to set the count for the history stepping and
the great editor vim has also no count for the history stepping, so there's no
need to have it in vimb browser too.

11 years agoAllow also the cursor keys for keybindings.
Daniel Carl [Tue, 26 Mar 2013 23:43:46 +0000 (00:43 +0100)]
Allow also the cursor keys for keybindings.

Added keybindings to step through the command an search history via cursor up
and down keys.

11 years agoFixed broken hints on pages with frames.
Daniel Carl [Tue, 26 Mar 2013 23:23:27 +0000 (00:23 +0100)]
Fixed broken hints on pages with frames.

If pages contains pages with content from other domains, we can't process them
because of the same origin policy. In this case the window.document is
undefined and no hint could be shown. To solve the problem, we leaf the
hinting helper if we cant access the document.

11 years agoFixed wrong history prefixes.
Daniel Carl [Tue, 26 Mar 2013 23:17:54 +0000 (00:17 +0100)]
Fixed wrong history prefixes.

If the ':' was typed into input box and the history search started and a
history item with :open ... was put into input box, the next history step used
the ':open ' as a new prefix for commands to fill. Now the input is only
processed at the start of the history searching, so that later changes won't
corrupt the printed items.
Also fixed missed first item in stepping forward through the history.
Al least the global variables out of the vb struct where removed to start to
decentralize the data stores and to them from the rest of the application.

11 years agoFixed wrong command history sorting.
Daniel Carl [Mon, 25 Mar 2013 20:48:50 +0000 (21:48 +0100)]
Fixed wrong command history sorting.

11 years agoRenamed command-hist-* command to hist-*.
Daniel Carl [Mon, 25 Mar 2013 20:48:27 +0000 (21:48 +0100)]
Renamed command-hist-* command to hist-*.

11 years agoAllow to set a default search engine.
Daniel Carl [Mon, 25 Mar 2013 20:35:38 +0000 (21:35 +0100)]
Allow to set a default search engine.

Added command searchengine-default to set the handle of the default search
engine.

11 years agoBlur the active element if insert mode is left.
Daniel Carl [Mon, 25 Mar 2013 19:39:14 +0000 (20:39 +0100)]
Blur the active element if insert mode is left.

If a editable form element was focussed, vimb browser switched to insert mode.
But if the insert mode was left by hitting <esc> the element kept focused, so
that key-presses went still into the focused element.

11 years agoFixed potentially uninitialized variable.
Daniel Carl [Sun, 24 Mar 2013 19:11:37 +0000 (20:11 +0100)]
Fixed potentially uninitialized variable.

11 years agoRemoved overkilled g_strsplit from command handling.
Daniel Carl [Sun, 24 Mar 2013 18:59:29 +0000 (19:59 +0100)]
Removed overkilled g_strsplit from command handling.

11 years agoMoved search handle finding from command_open to vb_load_uri.
Daniel Carl [Sun, 24 Mar 2013 18:49:17 +0000 (19:49 +0100)]
Moved search handle finding from command_open to vb_load_uri.

11 years agoShow first part of inputbox if history items it too long.
Daniel Carl [Sun, 24 Mar 2013 17:57:10 +0000 (18:57 +0100)]
Show first part of inputbox if history items it too long.

If a too long history items was displayed we put also the cursor to the end of
the value. But this causes that the first, and potentially more interesting
part was hidden. Now we place the cursor to the beginning, if the printed
content in inputbox is too long.

11 years agoSplit command history into command and search history.
Daniel Carl [Sun, 24 Mar 2013 17:14:30 +0000 (18:14 +0100)]
Split command history into command and search history.

Allow special history also for :open and :tabopen commands.

11 years agoSimplified the SEARCH_* enum.
Daniel Carl [Sun, 24 Mar 2013 14:56:31 +0000 (15:56 +0100)]
Simplified the SEARCH_* enum.

now we use -1 for backward and 1 for forward which is easier to use in the
most cases.

11 years agoMerged url_history and history together.
Daniel Carl [Sun, 24 Mar 2013 14:38:00 +0000 (15:38 +0100)]
Merged url_history and history together.

The history mechanism can now handle different types of history and persist
the items into different files.

11 years agoFixed wrong url history loading.
Daniel Carl [Sun, 24 Mar 2013 12:15:36 +0000 (13:15 +0100)]
Fixed wrong url history loading.

If the history where larger than the maximum allowed size, we read max of the
items from the beginning of the file that are the oldest items, so that the
latest items where discarded.

11 years agoRenamed type VpColor -> VbColor.
Daniel Carl [Sat, 23 Mar 2013 23:11:05 +0000 (00:11 +0100)]
Renamed type VpColor -> VbColor.

11 years agoUsed macro GET_TEXT() where it where not used before.
Daniel Carl [Sat, 23 Mar 2013 23:08:37 +0000 (00:08 +0100)]
Used macro GET_TEXT() where it where not used before.

11 years agoFixed wrong mode if no hints where found.
Daniel Carl [Sat, 23 Mar 2013 22:24:24 +0000 (23:24 +0100)]
Fixed wrong mode if no hints where found.

If hinting was started, but no hint was found, the input box was still
activated. Now we set the hint mode immediately in the hints_create function.
In the previous implementation the hinting mode was set in the command
function that didn't know if a hint where found or not and switched to hinting
mode also if no hint mas found.

11 years agoAdded function to echo also if input is focused.
Daniel Carl [Sat, 23 Mar 2013 21:57:49 +0000 (22:57 +0100)]
Added function to echo also if input is focused.

Removed none used vb_clear_input function.

11 years agoUse g_object_connect also for the webinspector events.
Daniel Carl [Sat, 23 Mar 2013 21:40:49 +0000 (22:40 +0100)]
Use g_object_connect also for the webinspector events.

11 years agoChanged keybindings for stop loading.
Daniel Carl [Sat, 23 Mar 2013 21:36:27 +0000 (22:36 +0100)]
Changed keybindings for stop loading.

The previous keybindings ctrl-c did not work, because this was caught as
escape sequence.

11 years agoAdapted README and user markdown now.
Daniel Carl [Sat, 23 Mar 2013 15:47:41 +0000 (16:47 +0100)]
Adapted README and user markdown now.

11 years agoSimplified history saving.
Daniel Carl [Sat, 23 Mar 2013 15:13:40 +0000 (16:13 +0100)]
Simplified history saving.

The url history is written to the end of the history file. The history isn't
read into list if not required. Every time we need the history we read it new
from file, so we would always see item added by another browser instance. If
the browser is closed the history files loaded again, duplicates will be
removed and the list shortened to the max history length and written back to
the file.

11 years agoUse the MFLAGS for every make call to a subdirectory.
Daniel Carl [Sat, 23 Mar 2013 11:15:37 +0000 (12:15 +0100)]
Use the MFLAGS for every make call to a subdirectory.

11 years agoRenamed the option to dump config to stdout.
Daniel Carl [Sat, 23 Mar 2013 11:11:40 +0000 (12:11 +0100)]
Renamed the option to dump config to stdout.

Added the new config to the manual page.

11 years agoRemoved dependency to m4 processor to build manpage.
Daniel Carl [Sat, 23 Mar 2013 11:05:00 +0000 (12:05 +0100)]
Removed dependency to m4 processor to build manpage.

The overkill of the m4 isn't required to simply replace VERSION and PROJECT in
the manual page.

11 years agoFixed wrong config pathes in man page.
Daniel Carl [Sat, 23 Mar 2013 10:56:46 +0000 (11:56 +0100)]
Fixed wrong config pathes in man page.

11 years agoFixed url hostory init bug.
Daniel Carl [Sat, 23 Mar 2013 10:48:58 +0000 (11:48 +0100)]
Fixed url hostory init bug.

If the browser read the history from file in the init function the history max
items where not set so we considered the max items to be 0. Now the url
history is initialized if the config is processed.

11 years agoReduced the number of webkit settings.
Daniel Carl [Sat, 23 Mar 2013 10:27:39 +0000 (11:27 +0100)]
Reduced the number of webkit settings.

The less setting we must parse the faster we can apply the settings. Also the
setting completions will keep readable. If anyone like a special setting to be
configurable to runtime, it's an easy job to add the item to the setting list
and to the default config.

11 years agoRemove no more used global flag from settings.
Daniel Carl [Sat, 23 Mar 2013 10:18:58 +0000 (11:18 +0100)]
Remove no more used global flag from settings.

11 years agoPut the default settings in config.h.
Daniel Carl [Sat, 23 Mar 2013 10:00:28 +0000 (11:00 +0100)]
Put the default settings in config.h.

Now the default settings are also put in the config.h so that it's easy to
print all default settings and keybindings to stdout. Added new option to dump
all default settings and keybindings to stdout (-D).

Parsing from default config is only a little slower than the previous
approach, but it more equal to the other configuration stuff.

11 years agoDon't check for keypresses on the inspector pane.
Daniel Carl [Sat, 23 Mar 2013 00:09:30 +0000 (01:09 +0100)]
Don't check for keypresses on the inspector pane.

Instead of checking the key actions on the whole window we use the box
instead, that holds nearly everything but the inspector pane. Else pressing
'd' in the inspectors search box would close the browser window.

11 years agoRevert to single instance per window.
Daniel Carl [Fri, 22 Mar 2013 16:43:08 +0000 (17:43 +0100)]
Revert to single instance per window.