vimprobable-users Mailing List for Vimprobable (Page 27)
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
You can subscribe to this list here.
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(77) |
Sep
(44) |
Oct
(43) |
Nov
(38) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
(40) |
Feb
(18) |
Mar
(12) |
Apr
(25) |
May
(12) |
Jun
(13) |
Jul
(17) |
Aug
(3) |
Sep
(20) |
Oct
(42) |
Nov
(9) |
Dec
(2) |
2013 |
Jan
(9) |
Feb
(29) |
Mar
(9) |
Apr
(7) |
May
(38) |
Jun
|
Jul
(7) |
Aug
|
Sep
(5) |
Oct
(10) |
Nov
(11) |
Dec
(1) |
2014 |
Jan
(16) |
Feb
(18) |
Mar
(11) |
Apr
(5) |
May
(13) |
Jun
(5) |
Jul
(5) |
Aug
(7) |
Sep
(30) |
Oct
|
Nov
|
Dec
(26) |
2015 |
Jan
(5) |
Feb
(19) |
Mar
(8) |
Apr
(15) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(16) |
Dec
(10) |
2016 |
Jan
|
Feb
(1) |
Mar
(14) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Hans-Peter D. <Han...@in...> - 2011-10-10 14:56:39
|
Hi, Sorry for the delay, I'm currently too busy to do any work for vimprobable. On 14:40 Sat 08 Oct , Daniel Carl wrote: > Can you do that with your patch for the other two leaks? Yes, I will write the patch once I have a little more time, Probably on Saturday, maybe earlier. |
From: Daniel C. <dan...@gm...> - 2011-10-08 12:51:41
|
Hi! On Sat, Oct 01, 2011 at 02:38:58PM +0200, Hannes Schüller wrote: > diff --git a/hinting.js b/hinting.js > index e23abc6..fb45b84 100644 > --- a/hinting.js > +++ b/hinting.js > @@ -262,6 +262,8 @@ function Hints() { > { > case "f": result = _open(el); break; > case "F": result = _openNewWindow(el); break; > + case "s": result = _save(el); break; > + case "y": case "O": result = _yank(el); break; > default: result = _getElemtSource(el); > } This is OK, but in my opinion it is better to read an less code if we use something like case "f": result = _open(el); break; case "F": result = _openNewWindow(el); break; case "s": result = "save;" + _getElemtSource(el); break; case "y": result = "yank;" + _getElemtSource(el); break; case "O": result = "colon;" + _getElemtSource(el); break; default: result = _getElemtSource(el); To not implements for each action a new function. Daniel |
From: Daniel C. <dan...@gm...> - 2011-10-08 12:41:32
|
On Wed, Oct 05, 2011 at 01:31:42AM +0200, Hans-Peter Deifel wrote: > Hi, > Unless I've overseen something, your patches are good. Only a few > comments: > > > setup_settings() { > > WebKitWebSettings *settings = (WebKitWebSettings*)webkit_web_settings_new(); > > SoupURI *proxy_uri; > > - char *filename, *new; > > + char *filename, *file_url, *new; > > int len; > > > > session = webkit_get_default_session(); > > @@ -2140,8 +2151,9 @@ setup_settings() { > > g_object_set(G_OBJECT(settings), "enable-java-applet", enableJava, NULL); > > g_object_set(G_OBJECT(settings), "enable-page-cache", enablePagecache, NULL); > > filename = g_strdup_printf(USER_STYLESHEET); > > filename should be freed. Yes it should, but if I free it vimprobable crashes and I have no idea why. Does it work for you if you free filename? > > - filename = g_strdup_printf("file://%s", filename); > > - g_object_set(G_OBJECT(settings), "user-stylesheet-uri", filename, NULL); > > + file_url = g_strdup_printf("file://%s", filename); > > + g_object_set(G_OBJECT(settings), "user-stylesheet-uri", file_url, NULL); > > + g_free(file_url); > > g_object_set(G_OBJECT(settings), "user-agent", useragent, NULL); > > g_object_get(G_OBJECT(settings), "zoom-step", &zoomstep, NULL); > > webkit_web_view_set_settings(webview, settings); > > A few lines from here, 'new' is allocated and not freed This is right, can you do that with your patch for the other two leaks? > > @@ -2397,6 +2409,7 @@ main(int argc, char *argv[]) { > > > > feedback_str = g_strdup_printf("Config file '%s' doesn't exist", cfile); > > give_feedback(feedback_str); > > + g_free(feedback_str); > > Indentation is somehow broken here. Not your fault, but still strange. We should fix code indentation with an extra patch, by the way the whitespace errors could be fixed (trailing whitespace). Daniel |
From: Daniel C. <dan...@gm...> - 2011-10-08 12:22:28
|
On Sat, Oct 01, 2011 at 02:38:58PM +0200, Hannes Schüller wrote: > If this is working for everybody (please test!), I will consolidate it > with the other patches currently floating around to create the next > release version. This works pretty fine for me too. Daniel |
From: Hannes S. <ha...@yl...> - 2011-10-05 06:03:05
|
Hi! Hans-Peter Deifel <hpd...@gm...> wrote: > I don't really like hardcoded key bindings, it should be possible for > the user to change them. I propose a solution along the lines of: > > { 0, GDK_semicolon, GDK_s, input, {.s = ";s"} } > > This would make the key binding completely configurable while allowing > us to keep the internal ";s" logic. This sounds sensible, I think the element of surprise this introduces will be bearable. Hannes |
From: Hans-Peter D. <hpd...@gm...> - 2011-10-04 23:54:15
|
Hi, On 17:25 Thu 22 Sep , Hans-Peter Deifel wrote: > NOTE: Keybindings like 'S-x' in vimprobablerc will stop working and > should now be written as simply 'X'. I think I need to elaborate on this one: Unfortunately, gdk_keymap_translate_keyboard_state doesn't allow us to strip irrelevant modifiers from the event _and_ the stored key binding. Thus, bindings with such modifiers will be considered different from their counterparts without the modifiers (and the actual events). The example in the commit message illustrates this. Note, that this renders the "Shift"-modifier almost useless for 'map'-bindings, because the only keys that don't change their symbol with shift cannot be bound with 'map'. (E.g. Space, Return, etc.) The vimprobablerc(1) man page currently has some examples using "S-something". Those need to be either removed or adapted, but I didn't want to change the man page before the move to section 5 is merged. I think we should also make it possible to bind to keys like Space or Return with 'map'. Generally map should accept a sufficiently large subset of Vim's own map-bindings. Unfortunately I don't have the time to implement this myself right now, but it should definitely stay on the To-do list. Regards, HP |
From: Hans-Peter D. <hpd...@gm...> - 2011-10-04 23:29:15
|
Hi, On 16:49 Sat 17 Sep , Daniel Carl wrote: > Hi! > > I looked through the code and found places where memory wasn't free()d. I'm a > C-beginner so maybe some of the free()s aren't needed. Unless I've overseen something, your patches are good. Only a few comments: > setup_settings() { > WebKitWebSettings *settings = (WebKitWebSettings*)webkit_web_settings_new(); > SoupURI *proxy_uri; > - char *filename, *new; > + char *filename, *file_url, *new; > int len; > > session = webkit_get_default_session(); > @@ -2140,8 +2151,9 @@ setup_settings() { > g_object_set(G_OBJECT(settings), "enable-java-applet", enableJava, NULL); > g_object_set(G_OBJECT(settings), "enable-page-cache", enablePagecache, NULL); > filename = g_strdup_printf(USER_STYLESHEET); filename should be freed. > - filename = g_strdup_printf("file://%s", filename); > - g_object_set(G_OBJECT(settings), "user-stylesheet-uri", filename, NULL); > + file_url = g_strdup_printf("file://%s", filename); > + g_object_set(G_OBJECT(settings), "user-stylesheet-uri", file_url, NULL); > + g_free(file_url); > g_object_set(G_OBJECT(settings), "user-agent", useragent, NULL); > g_object_get(G_OBJECT(settings), "zoom-step", &zoomstep, NULL); > webkit_web_view_set_settings(webview, settings); A few lines from here, 'new' is allocated and not freed > @@ -2397,6 +2409,7 @@ main(int argc, char *argv[]) { > > feedback_str = g_strdup_printf("Config file '%s' doesn't exist", cfile); > give_feedback(feedback_str); > + g_free(feedback_str); Indentation is somehow broken here. Not your fault, but still strange. I ran vimprobable with your patches in valgrind and it seems that most memory leaks have been plugged. I couldn't test everything, because webkit's GC and valgrind don't seem to like each other, so the whole thing crashed as soon as the GC kicked in. However, I found two other leaks. I will create a patch for them tomorrow. Regards, HP |
From: Hans-Peter D. <hpd...@gm...> - 2011-10-04 22:10:53
|
Hi, On 14:38 Sat 01 Oct , Hannes Schüller wrote: > Hi, > > this is the next iteration of my patch for additional hinting modes. It > includes the following functionality: > > - ;s to save a link's destination > - ;y to yank its destination location > - ;o to open its location in the current window > - ;t or ;w to open its location in a new window > - ;O to generate an :open with hint's URL (like O) > - ;T or ;W to generate a :tabopen with hint's URL (like T) > > Meaning: I took the semicolon hint modes from Vimperator which make > sense in our own setup. Seems to work fine, nice work! Just a small suggestion: > + { 0, 0, GDK_semicolon, input, {.s = ";"} }, > + { GDK_SHIFT_MASK, 0, GDK_semicolon, input, {.s = ";"} }, [...] > + case ';': > + a.s = NULL; > + switch (text[1]) { > + case 's': > + a.s = g_strconcat("hints.createHints('", text + 2, "', 's');", NULL); > + break; > + case 'y': > + a.s = g_strconcat("hints.createHints('", text + 2, "', 'y');", NULL); > + break; > + case 'o': > + a.s = g_strconcat("hints.createHints('", text + 2, "', 'f');", NULL); > + break; > + case 't': case 'w': > + a.s = g_strconcat("hints.createHints('", text + 2, "', 'F');", NULL); > + break; > + case 'O': case 'T': case 'W': > + a.s = g_strconcat("hints.createHints('", text + 2, "', 'O');", NULL); > + break; > + } > + break; I don't really like hardcoded key bindings, it should be possible for the user to change them. I propose a solution along the lines of: { 0, GDK_semicolon, GDK_s, input, {.s = ";s"} } This would make the key binding completely configurable while allowing us to keep the internal ";s" logic. Unfortunately "input" is (AFAIK) currently not mappable, which means that you still can't change these bindings from vimprobablerc. That could easily be implemented, though. One problem of this approach is, that what the user types and what gets inserted into the input box could differ, e.g. if she mapped ";f" to input(";s"). That probably doesn't conform to the Principle Of Least Surprise ;) Regards, HP |
From: Hans-Peter D. <hpd...@gm...> - 2011-10-04 20:38:02
|
Hi, Sorry for the late reply on this one, I finally have some free minutes to review patches. On 23:51 Tue 30 Aug , Daniel Carl wrote: > Hi! > > I mentioned hat vimprobable crashes if I try to open a previous visited page > that's URL is longer than MAXTAGSIZE (200). This is a possible patch to > prevent the crash. The crash was quite difficult to reproduce, because I had to tell glibc to check for buffer overflows. But I eventually managed to get a core file. Your patch fixes the issue just fine. (Although there are more issues in this part of the code (e.g. the fgets call with an arbitrary constant that doesn't handle long lines) which should be fixed some day.) > The second patch removes some compiler warnings about g_strdup_printf() > without format specifiers. I'm not sure if I made it right or if I > misunderstood the code. Nice! The compiler warnings have a reason, those are quite real bugs. For example the 'cfile' one can be triggered by calling vimprobable like this: ./vimprobable2 -c $(perl -e 'print "%s"x50;') The one in number() could be used by a malicious website to crash the browser. A quick 'git grep' reveals that we have a lot more unnecessary g_strdup_printf()s in our code, but they are just useless and not dangerous. Regards, HP |
From: Hannes S. <ha...@yl...> - 2011-10-01 12:39:31
|
Hi, this is the next iteration of my patch for additional hinting modes. It includes the following functionality: - ;s to save a link's destination - ;y to yank its destination location - ;o to open its location in the current window - ;t or ;w to open its location in a new window - ;O to generate an :open with hint's URL (like O) - ;T or ;W to generate a :tabopen with hint's URL (like T) Meaning: I took the semicolon hint modes from Vimperator which make sense in our own setup. If this is working for everybody (please test!), I will consolidate it with the other patches currently floating around to create the next release version. Hannes |
From: Daniel C. <dan...@gm...> - 2011-09-22 19:54:26
|
Hi! On Thu, Sep 22, 2011 at 05:25:23PM +0200, Hans-Peter Deifel wrote: > Modifiers that change the key's symbol shouldn't be considered when > comparing keys, because they can vary between different keyboard > layouts. For example, the semicolon is shifted on DE keyboards and > isn't on US keyboards, so we should just use ';' for the binding and > ignore the shift modifier in the key event handler. This works for me, but I have also a german layout. Daniel |
From: Hans-Peter D. <hpd...@gm...> - 2011-09-22 18:45:04
|
--- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 7fa386e..5403a78 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ clean: -rm -f $(CLEAN) install: $(addprefix $(DESTDIR)/,$(INSTALL)) uninstall: - rm -f $(INSTALL) + rm -f $(addprefix $(DESTDIR)/,$(INSTALL)) # pattern rule to inslall executabels $(DESTDIR)/$(BINDIR)/%: ./% -- 1.7.3.4 |
From: Hans-Peter D. <hpd...@gm...> - 2011-09-22 18:44:14
|
"File formats and conventions" belong to section 5, see man-pages(7) for details. --- Makefile | 14 +++- vimprobable2.1 | 2 +- vimprobablerc.1 | 237 ------------------------------------------------------- vimprobablerc.5 | 237 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 249 insertions(+), 241 deletions(-) delete mode 100644 vimprobablerc.1 create mode 100644 vimprobablerc.5 diff --git a/Makefile b/Makefile index 7fa386e..deffda8 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,16 @@ TARGET = vimprobable2 # Objectfiles, needed for $(TARGET) OBJ = main.o utilities.o callbacks.o # Manpages -MAN = vimprobable2.1 vimprobablerc.1 +MAN1 = vimprobable2.1 +MAN5 = vimprobablerc.5 # Used libraries to get needed CFLAGS and LDFLAGS form pkg-config LIBS = gtk+-2.0 webkit-1.0 libsoup-2.4 # Files to removo by clean target CLEAN = $(TARGET) $(OBJ) $(DEPS) javascript.h # Files to install by install target or remove by uninstall target -INSTALL = $(BINDIR)/$(TARGET) $(addprefix $(MANDIR)/man1/,$(MAN)) +MANINSTALL = $(addprefix $(MANDIR)/man1/,$(MAN1)) \ + $(addprefix $(MANDIR)/man5/,$(MAN5)) +INSTALL = $(BINDIR)/$(TARGET) $(MANINSTALL) # DEBUG build? Off by default V_DEBUG = 0 @@ -63,11 +66,16 @@ $(DESTDIR)/$(BINDIR)/%: ./% -strip -s '$@' chmod $(EXECMOD) '$@' -# pattern rule to install manpages +# pattern rules to install manpages $(DESTDIR)/$(MANDIR)/man1/%: ./% -[ -e '$(@D)' ] || mkdir -p '$(@D)' && chmod $(DMOD) '$(@D)' cp -f '$<' '$@' chmod $(FMOD) '$@' +$(DESTDIR)/$(MANDIR)/man5/%: ./% + -[ -e '$(@D)' ] || mkdir -p '$(@D)' && chmod $(DMOD) '$(@D)' + cp -f '$<' '$@' + chmod $(FMOD) '$@' + %.o: %.c $(CC) -MMD -c $(CFLAGS) $< -o $@ diff --git a/vimprobable2.1 b/vimprobable2.1 index b1bfe2c..f98ef45 100644 --- a/vimprobable2.1 +++ b/vimprobable2.1 @@ -341,7 +341,7 @@ There has not been any significant bug-hunting yet. .SH AUTHORS Hannes Schueller and Matto Fransen .SH "SEE ALSO" -.BR vimprobablerc (1), +.BR vimprobablerc (5), diff --git a/vimprobablerc.1 b/vimprobablerc.1 deleted file mode 100644 index e52d105..0000000 --- a/vimprobablerc.1 +++ /dev/null @@ -1,237 +0,0 @@ -.\" Process this file with -.\" groff -man -Tascii vimprobablerc.1 -.\" -.TH VIMPROBABLERC 1 "December 2009" "Linux User Manuals" -.SH NAME -vimprobablerc \- The configuration file for Vimprobable -.SH DESCRIPTION -If you have a .config/vimprobable/vimprobablerc in your home directory, Vimprobable -will read it at startup. -.PP -The vimprobablerc file consists of a series of configuration options, one per line. Blank lines and lines starting with a -colon (:) are seen as comments and will be ignored. -.SH FILES -.I $HOME/.config/vimprobable/vimprobablerc -.PP -Per user configuration file. -.SH FORMAT -.IP set -.RS -set is used to alter a default setting. For possible options that can be altered, -see the SETTINGS section below. - -Each line looks like this: - -.I " " set what=value - -Vimprobable is not picky about white space in these lines. -.RE -.IP map -.RS -map is used to change the default key-binding. For possible options that -can be altered see the MAPPING section below. - -Each line looks like this: - -.I " " map what=value - -Vimprobable is not picky about white space in these lines. - -.RE -.IP misc -.RS -Any command listed under colon commands in vimprobable2(1) will be accepted in the config file as well. - - -.SH FORMAT MODIFIED KEYS - -It is possible to map keys modified with eiter Control, Shift or Modkeys. -To map a key modified with Control, use this format: <C-h> -where C stands for the Control-key and h for the h-key. -or <S-k> where S stands for the Shift-key and k for the k-key. -<M1-j> maps the combination of Mod1 and the j-key. Mod1 is -usually the "Alt" key, Mod4 the "Windows" key. - -Examples: -<C-h> : Ctrl-h -<C-k> : Ctrl-k -z<S-i>: z followed by Shift-i - -.RE - -.SH SETTINGS - -This section describes the possible options that can be changed from -their default value. - -.IP completioncase=[true|false] -Case sensitive (true) or insensitive tab completion. - -.IP homepage=URL -Set the URL of the homepage. - -.IP useragent=<useragent-string> -Replace the default useragent-string. - -.IP acceptlanguage=<acceptlanguage-string> -Replace the default acceptlanguage-string. - -.IP scripts=[true|false] -Enable or disable scripts. - -.IP plugins=[true|false] -Enable or disable plugins. - -.IP java=[true|false] -Enable or disable Java applets. - -.IP images=[true|false] -Enable or disable autoload of images. - -.IP shrinkimages=[true|false] -Enable or disable autoshrink of images. - -.IP cursivefont=cursivefont-family -Replace the default cursive font family - -.IP defaultencoding=encoding -Replace the default encoding - -.IP defaultfont=default-font-family -Replace the default font family - -.IP defaultsearch=searchengine-shortcut -Replace the default search engine - -.IP fontsize=integer -Replace the default fontsize - -.IP monofontsize=integer -Replace the default monospace fontsize - -.IP caret=[true|false] -Enable or disable caret browsing - -.IP fantasyfont=fantasy-font-family -Replace the default fantasy font family - -.IP minimumfontsize=integer -Replace the default minimum font size - -.IP monofont=default-monospace-font-family -Replace the default monospace font family - -.IP proxy=[true|false] -Whether to read and use the http_proxy environment variable - -.IP backgrounds=[true|false] -Enable or disable print backgrounds - -.IP sansfont=default-sans-font-family -Replace the default sans-serif font family - -.IP scrollbars=[true|false] -Enable or disable scrollbars. - -.IP statusbar=[true|false] -Show or hide the status bar. - -.IP inputbox=[true|false] -Show or hide the input box. - -.IP seriffont=default-serif-font-family -Replace the default serif font family - -.IP stylesheet=URL -Replace the user stylesheet - -.IP webinspector=[true|false] -Enable or disable webinspector - -.SH MAPPINGS - -Keys can be mapped to the following functions: - -.IP quit -Close the browser - -.IP stop -Stop the current loading process - -.IP bookmark -Save the current website in the bookmarks - -.IP source -Toggle HTML source view - -.IP jumpleft -Scroll to left edge - -.IP jumpright -Scroll to right edge - -.IP jumptop -Scroll to top of the page - -.IP jumpbottom -Scroll to bottom of the page - -.IP pageup -Scroll one screensize up - -.IP pagedown -Scroll one screensize down - -.IP navigationback -Go to previous page in browser-history - -.IP navigationforward -Go to next page in browser-history - -.IP reload -Reload current page - -.IP scrollleft -Scroll the page one step to the left - -.IP scrollright -Scroll the page one step to the right - -.IP scrollup -Scroll the page one step up - -.IP scrolldown -Scroll the page one step down - -Example: -To map the 'R' key to reload to current page, add the following -line into ~/.config/vimprobable/vimprobablerc: - -map <S-R> reload - -.SH MAPPING COLON COMMANDS - -Key can be mapped to any colon commands. Instead of entering an -internal symbol for the key combination to be mapped to, enter -a command line as you would enter it within a running browser -instance. For example: - -map <C-s>=:set scripts=false - -This would map Control-s to disable Javascript. - -map i=:javascript console.log('insertmode_on') - -This maps the i key to manually activate INSERT mode. - -.SH INTERACTIVE SETTING -All settings can be changed on the fly by entering -:set followed by one of the commands in the SETTINGS section -above. - -.SH BUGS -There has not been any significant bug-hunting yet. -.SH AUTHORS -Hannes Schueller and Matto Fransen -.SH "SEE ALSO" -.BR vimprobable2 (1), diff --git a/vimprobablerc.5 b/vimprobablerc.5 new file mode 100644 index 0000000..666eb0d --- /dev/null +++ b/vimprobablerc.5 @@ -0,0 +1,237 @@ +.\" Process this file with +.\" groff -man -Tascii vimprobablerc.1 +.\" +.TH VIMPROBABLERC 5 "December 2009" "Linux User Manuals" +.SH NAME +vimprobablerc \- The configuration file for Vimprobable +.SH DESCRIPTION +If you have a .config/vimprobable/vimprobablerc in your home directory, Vimprobable +will read it at startup. +.PP +The vimprobablerc file consists of a series of configuration options, one per line. Blank lines and lines starting with a +colon (:) are seen as comments and will be ignored. +.SH FILES +.I $HOME/.config/vimprobable/vimprobablerc +.PP +Per user configuration file. +.SH FORMAT +.IP set +.RS +set is used to alter a default setting. For possible options that can be altered, +see the SETTINGS section below. + +Each line looks like this: + +.I " " set what=value + +Vimprobable is not picky about white space in these lines. +.RE +.IP map +.RS +map is used to change the default key-binding. For possible options that +can be altered see the MAPPING section below. + +Each line looks like this: + +.I " " map what=value + +Vimprobable is not picky about white space in these lines. + +.RE +.IP misc +.RS +Any command listed under colon commands in vimprobable2(1) will be accepted in the config file as well. + + +.SH FORMAT MODIFIED KEYS + +It is possible to map keys modified with eiter Control, Shift or Modkeys. +To map a key modified with Control, use this format: <C-h> +where C stands for the Control-key and h for the h-key. +or <S-k> where S stands for the Shift-key and k for the k-key. +<M1-j> maps the combination of Mod1 and the j-key. Mod1 is +usually the "Alt" key, Mod4 the "Windows" key. + +Examples: +<C-h> : Ctrl-h +<C-k> : Ctrl-k +z<S-i>: z followed by Shift-i + +.RE + +.SH SETTINGS + +This section describes the possible options that can be changed from +their default value. + +.IP completioncase=[true|false] +Case sensitive (true) or insensitive tab completion. + +.IP homepage=URL +Set the URL of the homepage. + +.IP useragent=<useragent-string> +Replace the default useragent-string. + +.IP acceptlanguage=<acceptlanguage-string> +Replace the default acceptlanguage-string. + +.IP scripts=[true|false] +Enable or disable scripts. + +.IP plugins=[true|false] +Enable or disable plugins. + +.IP java=[true|false] +Enable or disable Java applets. + +.IP images=[true|false] +Enable or disable autoload of images. + +.IP shrinkimages=[true|false] +Enable or disable autoshrink of images. + +.IP cursivefont=cursivefont-family +Replace the default cursive font family + +.IP defaultencoding=encoding +Replace the default encoding + +.IP defaultfont=default-font-family +Replace the default font family + +.IP defaultsearch=searchengine-shortcut +Replace the default search engine + +.IP fontsize=integer +Replace the default fontsize + +.IP monofontsize=integer +Replace the default monospace fontsize + +.IP caret=[true|false] +Enable or disable caret browsing + +.IP fantasyfont=fantasy-font-family +Replace the default fantasy font family + +.IP minimumfontsize=integer +Replace the default minimum font size + +.IP monofont=default-monospace-font-family +Replace the default monospace font family + +.IP proxy=[true|false] +Whether to read and use the http_proxy environment variable + +.IP backgrounds=[true|false] +Enable or disable print backgrounds + +.IP sansfont=default-sans-font-family +Replace the default sans-serif font family + +.IP scrollbars=[true|false] +Enable or disable scrollbars. + +.IP statusbar=[true|false] +Show or hide the status bar. + +.IP inputbox=[true|false] +Show or hide the input box. + +.IP seriffont=default-serif-font-family +Replace the default serif font family + +.IP stylesheet=URL +Replace the user stylesheet + +.IP webinspector=[true|false] +Enable or disable webinspector + +.SH MAPPINGS + +Keys can be mapped to the following functions: + +.IP quit +Close the browser + +.IP stop +Stop the current loading process + +.IP bookmark +Save the current website in the bookmarks + +.IP source +Toggle HTML source view + +.IP jumpleft +Scroll to left edge + +.IP jumpright +Scroll to right edge + +.IP jumptop +Scroll to top of the page + +.IP jumpbottom +Scroll to bottom of the page + +.IP pageup +Scroll one screensize up + +.IP pagedown +Scroll one screensize down + +.IP navigationback +Go to previous page in browser-history + +.IP navigationforward +Go to next page in browser-history + +.IP reload +Reload current page + +.IP scrollleft +Scroll the page one step to the left + +.IP scrollright +Scroll the page one step to the right + +.IP scrollup +Scroll the page one step up + +.IP scrolldown +Scroll the page one step down + +Example: +To map the 'R' key to reload to current page, add the following +line into ~/.config/vimprobable/vimprobablerc: + +map <S-R> reload + +.SH MAPPING COLON COMMANDS + +Key can be mapped to any colon commands. Instead of entering an +internal symbol for the key combination to be mapped to, enter +a command line as you would enter it within a running browser +instance. For example: + +map <C-s>=:set scripts=false + +This would map Control-s to disable Javascript. + +map i=:javascript console.log('insertmode_on') + +This maps the i key to manually activate INSERT mode. + +.SH INTERACTIVE SETTING +All settings can be changed on the fly by entering +:set followed by one of the commands in the SETTINGS section +above. + +.SH BUGS +There has not been any significant bug-hunting yet. +.SH AUTHORS +Hannes Schueller and Matto Fransen +.SH "SEE ALSO" +.BR vimprobable2 (1), -- 1.7.3.4 |
From: Hans-Peter D. <hpd...@gm...> - 2011-09-22 15:23:06
|
Modifiers that change the key's symbol shouldn't be considered when comparing keys, because they can vary between different keyboard layouts. For example, the semicolon is shifted on DE keyboards and isn't on US keyboards, so we should just use ';' for the binding and ignore the shift modifier in the key event handler. NOTE: Keybindings like 'S-x' in vimprobablerc will stop working and should now be written as simply 'X'. --- keymap.h | 39 +++++++++++++++++++-------------------- main.c | 14 ++++++++++++-- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/keymap.h b/keymap.h index 4a2cece..e501794 100644 --- a/keymap.h +++ b/keymap.h @@ -26,9 +26,9 @@ Key keys[] = { { 0, GDK_q, GDK_8, quickmark, { .s = "8" } }, { 0, GDK_q, GDK_9, quickmark, { .s = "9" } }, { 0, 0, GDK_0, scroll, {ScrollJumpTo | DirectionLeft} }, - { GDK_SHIFT_MASK, 0, GDK_dollar, scroll, {ScrollJumpTo | DirectionRight} }, + { 0, 0, GDK_dollar, scroll, {ScrollJumpTo | DirectionRight} }, { 0, GDK_g, GDK_g, scroll, {ScrollJumpTo | DirectionTop} }, - { GDK_SHIFT_MASK, 0, GDK_G, scroll, {ScrollJumpTo | DirectionBottom} }, + { 0, 0, GDK_G, scroll, {ScrollJumpTo | DirectionBottom} }, { 0, 0, GDK_h, scroll, {ScrollMove | DirectionLeft | UnitLine} }, { 0, 0, GDK_j, scroll, {ScrollMove | DirectionBottom | UnitLine} }, { 0, 0, GDK_k, scroll, {ScrollMove | DirectionTop | UnitLine} }, @@ -43,7 +43,7 @@ Key keys[] = { { GDK_CONTROL_MASK, 0, GDK_y, scroll, {ScrollMove | DirectionTop | UnitLine} }, { 0, GDK_g, GDK_t, fake_key_event, { .s = "l", .i = ShiftMask + ControlMask } }, - { GDK_SHIFT_MASK, GDK_g, GDK_T, fake_key_event, { .s = "h", .i = ShiftMask + ControlMask } }, + { 0, GDK_g, GDK_T, fake_key_event, { .s = "h", .i = ShiftMask + ControlMask } }, { 0, GDK_g, GDK_1, fake_key_event, { .s = "1", .i = ControlMask } }, { 0, GDK_g, GDK_2, fake_key_event, { .s = "2", .i = ControlMask } }, { 0, GDK_g, GDK_3, fake_key_event, { .s = "3", .i = ControlMask } }, @@ -57,10 +57,10 @@ Key keys[] = { { GDK_CONTROL_MASK, 0, GDK_i, navigate, {NavigationBack} }, { GDK_CONTROL_MASK, 0, GDK_o, navigate, {NavigationForward} }, - { GDK_SHIFT_MASK, 0, GDK_H, navigate, {NavigationBack} }, - { GDK_SHIFT_MASK, 0, GDK_L, navigate, {NavigationForward} }, + { 0, 0, GDK_H, navigate, {NavigationBack} }, + { 0, 0, GDK_L, navigate, {NavigationForward} }, { 0, 0, GDK_r, navigate, {NavigationReload} }, - { GDK_SHIFT_MASK, 0, GDK_R, navigate, {NavigationForceReload} }, + { 0, 0, GDK_R, navigate, {NavigationForceReload} }, { GDK_CONTROL_MASK, 0, GDK_c, navigate, {NavigationCancel} }, { 0, 0, GDK_plus, zoom, {ZoomIn | ZoomText} }, @@ -70,37 +70,36 @@ Key keys[] = { { 0, GDK_z, GDK_i, zoom, {ZoomIn | ZoomText} }, { 0, GDK_z, GDK_o, zoom, {ZoomOut | ZoomText} }, { 0, GDK_z, GDK_z, zoom, {ZoomReset | ZoomText} }, - { GDK_SHIFT_MASK, GDK_z, GDK_I, zoom, {ZoomIn | ZoomFullContent} }, - { GDK_SHIFT_MASK, GDK_z, GDK_O, zoom, {ZoomOut | ZoomFullContent} }, - { GDK_SHIFT_MASK, GDK_z, GDK_Z, zoom, {ZoomReset | ZoomFullContent} }, + { 0, GDK_z, GDK_I, zoom, {ZoomIn | ZoomFullContent} }, + { 0, GDK_z, GDK_O, zoom, {ZoomOut | ZoomFullContent} }, + { 0, GDK_z, GDK_Z, zoom, {ZoomReset | ZoomFullContent} }, { 0, 0, GDK_y, yank, {SourceURL | ClipboardPrimary | ClipboardGTK} }, - { GDK_SHIFT_MASK, 0, GDK_Y, yank, {SourceSelection| ClipboardPrimary | ClipboardGTK} }, + { 0, 0, GDK_Y, yank, {SourceSelection| ClipboardPrimary | ClipboardGTK} }, { 0, GDK_g, GDK_u, descend, {NthSubdir} }, - { GDK_SHIFT_MASK, GDK_g, GDK_U, descend, {Rootdir} }, + { 0, GDK_g, GDK_U, descend, {Rootdir} }, { 0, GDK_g, GDK_h, open_arg, {TargetCurrent, startpage} }, - { GDK_SHIFT_MASK, GDK_g, GDK_H, open_arg, {TargetNew, startpage} }, + { 0, GDK_g, GDK_H, open_arg, {TargetNew, startpage} }, { 0, 0, GDK_p, paste, {TargetCurrent | ClipboardPrimary | ClipboardGTK} }, - { GDK_SHIFT_MASK, 0, GDK_P, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} }, + { 0, 0, GDK_P, paste, {TargetNew | ClipboardPrimary | ClipboardGTK} }, { GDK_CONTROL_MASK, 0, GDK_a, number, {Increment} }, { GDK_CONTROL_MASK, 0, GDK_x, number, {Decrement} }, { 0, 0, GDK_n, search, {DirectionNext | CaseInsensitive | Wrapping} }, - { GDK_SHIFT_MASK, 0, GDK_N, search, {DirectionPrev | CaseInsensitive | Wrapping} }, + { 0, 0, GDK_N, search, {DirectionPrev | CaseInsensitive | Wrapping} }, - { GDK_SHIFT_MASK, 0, GDK_colon, input, {.s = ":" } }, + { 0, 0, GDK_colon, input, {.s = ":" } }, { 0, 0, GDK_o, input, {.s = ":open "} }, - { GDK_SHIFT_MASK, 0, GDK_O, input, {.s = ":open ", .i = InsertCurrentURL} }, + { 0, 0, GDK_O, input, {.s = ":open ", .i = InsertCurrentURL} }, { 0, 0, GDK_t, input, {.s = ":tabopen "} }, - { GDK_SHIFT_MASK, 0, GDK_T, input, {.s = ":tabopen ", .i = InsertCurrentURL} }, + { 0, 0, GDK_T, input, {.s = ":tabopen ", .i = InsertCurrentURL} }, { 0, 0, GDK_slash, input, {.s = "/"} }, - { GDK_SHIFT_MASK, 0, GDK_slash, input, {.s = "/"} }, { 0, 0, GDK_KP_Divide, input, {.s = "/"} }, - { GDK_SHIFT_MASK, 0, GDK_question, input, {.s = "?"} }, + { 0, 0, GDK_question, input, {.s = "?"} }, { 0, 0, GDK_period, input, {.s = "."} }, { 0, 0, GDK_comma, input, {.s = ","} }, @@ -110,7 +109,7 @@ Key keys[] = { { GDK_CONTROL_MASK, 0, GDK_z, set, {ModePassThrough} }, { GDK_CONTROL_MASK, 0, GDK_v, set, {ModeSendKey} }, { 0, 0, GDK_f, input, {.s = "."} }, - { GDK_SHIFT_MASK, 0, GDK_F, input, {.s = ","} }, + { 0, 0, GDK_F, input, {.s = ","} }, { 0, GDK_g, GDK_i, focus_input,{} }, { 0, 0, GDK_u, revive, {} }, diff --git a/main.c b/main.c index 9520ca6..58a94d2 100644 --- a/main.c +++ b/main.c @@ -120,6 +120,7 @@ static GtkWidget *status_state; static WebKitWebView *webview; static SoupSession *session; static GtkClipboard *clipboards[2]; +static GdkKeymap *keymap; static char **args; static unsigned int mode = ModeNormal; @@ -329,14 +330,21 @@ download_progress(WebKitDownload *d, GParamSpec *pspec) { gboolean process_keypress(GdkEventKey *event) { KeyList *current; + guint keyval; + GdkModifierType irrelevant; + + /* Get a mask of modifiers that shouldn't be considered for this event. + * E.g.: It shouldn't matter whether ';' is shifted or not. */ + gdk_keymap_translate_keyboard_state(keymap, event->hardware_keycode, + event->state, event->group, &keyval, NULL, NULL, &irrelevant); current = keylistroot; while (current != NULL) { - if (current->Element.mask == CLEAN(event->state) + if (current->Element.mask == (CLEAN(event->state) & ~irrelevant) && (current->Element.modkey == current_modkey || (!current->Element.modkey && !current_modkey) || current->Element.modkey == GDK_VoidSymbol ) /* wildcard */ - && current->Element.key == event->keyval + && current->Element.key == keyval && current->Element.func) if (current->Element.func(¤t->Element.arg)) { current_modkey = count = 0; @@ -2082,6 +2090,8 @@ setup_gui() { gtk_widget_set_name(GTK_WIDGET(window), "Vimprobable2"); gtk_window_set_geometry_hints(window, NULL, &hints, GDK_HINT_MIN_SIZE); + keymap = gdk_keymap_get_default(); + #ifdef DISABLE_SCROLLBAR viewport = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(viewport), GTK_POLICY_NEVER, GTK_POLICY_NEVER); -- 1.7.3.4 |
From: Hannes S. <ha...@yl...> - 2011-09-21 20:47:28
|
Hans-Peter Deifel <hpd...@gm...> wrote: > @Hannes: Why didn't you call webview_download_cb directly? Yes, that would probably be easier - no unnecessary level of indirection. I'll change it in the next iteration. Hannes |
From: Daniel C. <dan...@gm...> - 2011-09-21 18:24:45
|
Hi Hans-Peter! On Tue, Sep 20, 2011 at 11:36:16PM +0200, Hans-Peter Deifel wrote: > Could you please try the attached patch? I think this function needs > another argument. The patch worked and vimprobable didn't crash anymore. Nice work! Daniel |
From: Hans-Peter D. <hpd...@gm...> - 2011-09-20 22:34:09
|
To tired to send mails. > Jumanji seems to have fixed the same problem with this patch: [1] [1] http://git.pwmt.org/?p=jumanji.git;a=commitdiff;h=de4b010e9bb806c18900dd6165279b85565dc756 |
From: Hans-Peter D. <hpd...@gm...> - 2011-09-20 22:29:54
|
Hi, > + { GDK_SHIFT_MASK, 0, GDK_semicolon, input, {.s = ";"} }, This doesn't work for users with us layout, because ';' doesn't require shift. The problem is that there are two kinds of keys: Those that send a different key symbol with shift ("Q" or ";") and those that don't ("Shift-Space"). I did a quick search and found a function that appears to do exactly what we need: gdk_keymap_translate_keyboard_state() Jumanji seems to have fixed the same problem with this patch: [1] If I find the time and nobody is quicker, I'll try that out tomorrow (actually tomorrow it already today). Regards, HP |
From: Hans-Peter D. <hpd...@gm...> - 2011-09-20 21:33:59
|
Hi! > #2 0xb6526e3d in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 Could you please try the attached patch? I think this function needs another argument. @Hannes: Why didn't you call webview_download_cb directly? Regards, HP |
From: Daniel C. <dan...@gm...> - 2011-09-20 20:34:11
|
Hi! I forgot a backtrace I made with gdb. #:~/code/c/vimprobable$ env G_DEBUG=fatal_criticals libtool --mode=execute gdb --args ./vimprobable2 GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/daniel/code/c/vimprobable/vimprobable2...done. (gdb) run Starting program: /home/daniel/code/c/vimprobable/vimprobable2 [Thread debugging using libthread_db enabled] [New Thread 0xb4605b70 (LWP 6832)] [New Thread 0xb3cdcb70 (LWP 6833)] [New Thread 0xb3338b70 (LWP 6834)] Program received signal SIGSEGV, Segmentation fault. 0xb65383b1 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (gdb) bt full #0 0xb65383b1 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #1 0xb6526c1b in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #2 0xb6526e3d in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #3 0x0804f5fe in script (arg=0xbfffcd3c) at main.c:1402 value = 0x847ee00 "download;file:///home/daniel/docs/wiki/target/linux/git.html" message = 0x0 a = {i = 0, s = 0x1 <Address 0x1 out of bounds>} request = 0x84a1ec8 download = 0x84862c8 #4 0x0804cce7 in inputbox_changed_cb (entry=0x80d4838, user_data=0x0) at main.c:650 a = {i = 8, s = 0x84af3a0 "hints.createHints('Gi', 'd');"} text = 0x84af9f0 "Download git.html started (unknown size)..." length = 3 forward = 0 #5 0xb652748c in g_cclosure_marshal_VOID__VOID () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #6 0xb650b372 in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #7 0xb651e048 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #8 0xb6526b29 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #9 0xb6526e3d in g_signal_emit_by_name () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #10 0xb6a2631a in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. #11 0xb6527e48 in g_cclosure_marshal_VOID__PARAM () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #12 0xb650b372 in g_closure_invoke () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #13 0xb651e048 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #14 0xb6526b29 in g_signal_emit_valist () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #15 0xb6526cc2 in g_signal_emit () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #16 0xb650d0e1 in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #17 0xb650c3ef in ?? () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #18 0xb650f379 in g_object_notify () from /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 No symbol table info available. #19 0xb6a317dc in ?? () from /usr/lib/libgtk-x11-2.0.so.0 No symbol table info available. ---Type <return> to continue, or q <return> to quit---q Quit (gdb) quit |
From: Daniel C. <dan...@gm...> - 2011-09-20 20:30:34
|
Hi! I switched from libwebkitgtk1.3.13 to libwebkitgtk1.4.0 but vimprobable also crashes if I download hints by only typing the Name. Hope somebody has any idea to fix or find the problem. Following outputs are generated by strace. ======= Working (used Tab Return to fire hint) open("/home/daniel/git.html", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = -1 EEXIST (File exists) open("/home/daniel/git.html", O_RDWR|O_CREAT|O_LARGEFILE|O_NOFOLLOW, 0666) = 8 fstat64(8, {st_mode=S_IFREG|0644, st_size=2655, ...}) = 0 gettimeofday({1316546913, 161085}, NULL) = 0 open("/home/daniel/.goutputstream-2AU61V", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 9 fchown32(9, 1000, 1000) = 0 fchmod(9, 0100644) = 0 close(8) = 0 poll([{fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 (Timeout) futex(0x8cf4cac, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x8cf4ca8, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1 futex(0x8cef550, FUTEX_WAKE_PRIVATE, 1) = 1 poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}]) writev(3, [{"<\0\2\0\275\0\300\1<\1\2\0\276\0\300\1<\4\2\0\277\0\300\1<%\2\0\300\0\300\1"..., 384}, {NULL, 0}, {"", 0}], 3) = 384 read(3, 0x8927c10, 4096) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 (Timeout) write(9, "<?xml version=\"1.0\" encoding=\"UT"..., 2655) = 2655 clock_gettime(CLOCK_MONOTONIC, {3220, 811570769}) = 0 futex(0x8cf4cac, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x8cf4ca8, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1 futex(0x8cef550, FUTEX_WAKE_PRIVATE, 1) = 1 read(3, 0x8927c10, 4096) = -1 EAGAIN (Resource temporarily unavailable) poll([{fd=4, events=POLLIN}, {fd=3, events=POLLIN}], 2, 0) = 0 (Timeout) fsync(9) = 0 unlink("/home/daniel/git.html~") = -1 ENOENT (No such file or directory) link("/home/daniel/git.html", "/home/daniel/git.html~") = 0 rename("/home/daniel/.goutputstream-2AU61V", "/home/daniel/git.html") = 0 fstat64(9, {st_mode=S_IFREG|0644, st_size=2655, ...}) = 0 close(9) = 0 clock_gettime(CLOCK_MONOTONIC, {3220, 874091005}) = 0 ======= Broken (Types the name of the hint) open("/home/daniel/git.html", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = -1 EEXIST (File exists) open("/home/daniel/git.html", O_RDWR|O_CREAT|O_LARGEFILE|O_NOFOLLOW, 0666) = 8 fstat64(8, {st_mode=S_IFREG|0644, st_size=2655, ...}) = 0 gettimeofday({1316547088, 405277}, NULL) = 0 open("/home/daniel/.goutputstream-8LOC2V", O_WRONLY|O_CREAT|O_EXCL|O_LARGEFILE, 0666) = 10 fchown32(10, 1000, 1000) = 0 fchmod(10, 0100644) = 0 close(8) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ Speicherzugriffsfehler Following outputs where made with valgrind. ======= Working (used Tab Return to fire hint) ==6292== Memcheck, a memory error detector ==6292== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==6292== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==6292== Command: ./vimprobable2 ==6292== (vimprobable2:6292): Gdk-CRITICAL **: IA__gdk_window_get_events: assertion `GDK_IS_WINDOW (window)' failed (vimprobable2:6292): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (vimprobable2:6292): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed ==6292== Conditional jump or move depends on uninitialised value(s) ==6292== at 0x5AFE3AC: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AECC1A: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x804F5FD: script (in /home/daniel/code/c/vimprobable/vimprobable2) ==6292== by 0x804C716: inputbox_keypress_cb (in /home/daniel/code/c/vimprobable/vimprobable2) ==6292== by 0x53F5A03: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6292== by 0x5AD1371: g_closure_invoke (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AE4047: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AEC8D6: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AECCC1: g_signal_emit (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x552A835: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6292== by 0x5542C4E: gtk_window_propagate_key_event (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6292== ==6292== Use of uninitialised value of size 4 ==6292== at 0x5AFE3B1: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AECC1A: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x804F5FD: script (in /home/daniel/code/c/vimprobable/vimprobable2) ==6292== by 0x804C716: inputbox_keypress_cb (in /home/daniel/code/c/vimprobable/vimprobable2) ==6292== by 0x53F5A03: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6292== by 0x5AD1371: g_closure_invoke (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AE4047: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AEC8D6: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x5AECCC1: g_signal_emit (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6292== by 0x552A835: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6292== by 0x5542C4E: gtk_window_propagate_key_event (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6292== ==6292== ==6292== HEAP SUMMARY: ==6292== in use at exit: 3,412,313 bytes in 126,609 blocks ==6292== total heap usage: 164,500 allocs, 37,891 frees, 8,792,594 bytes allocated ==6292== ==6292== LEAK SUMMARY: ==6292== definitely lost: 8,979 bytes in 77 blocks ==6292== indirectly lost: 18,860 bytes in 933 blocks ==6292== possibly lost: 227,148 bytes in 1,479 blocks ==6292== still reachable: 3,157,326 bytes in 124,120 blocks ==6292== suppressed: 0 bytes in 0 blocks ==6292== Rerun with --leak-check=full to see details of leaked memory ======= Broken (Types the name of the hint) ==6094== Memcheck, a memory error detector ==6094== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al. ==6094== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info ==6094== Command: ./vimprobable2 ==6094== ==6094== Conditional jump or move depends on uninitialised value(s) ==6094== at 0x5AFE3AC: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECC1A: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x804F5FD: script (in /home/daniel/code/c/vimprobable/vimprobable2) ==6094== by 0x804CCE6: inputbox_changed_cb (in /home/daniel/code/c/vimprobable/vimprobable2) ==6094== by 0x5AED48B: g_cclosure_marshal_VOID__VOID (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AD1371: g_closure_invoke (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AE4047: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECB28: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5373319: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6094== by 0x5AEDE47: g_cclosure_marshal_VOID__PARAM (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== ==6094== Use of uninitialised value of size 4 ==6094== at 0x5AFE3B1: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECC1A: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x804F5FD: script (in /home/daniel/code/c/vimprobable/vimprobable2) ==6094== by 0x804CCE6: inputbox_changed_cb (in /home/daniel/code/c/vimprobable/vimprobable2) ==6094== by 0x5AED48B: g_cclosure_marshal_VOID__VOID (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AD1371: g_closure_invoke (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AE4047: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECB28: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5373319: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6094== by 0x5AEDE47: g_cclosure_marshal_VOID__PARAM (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== ==6094== ==6094== Process terminating with default action of signal 11 (SIGSEGV) ==6094== Bad permissions for mapped region at address 0x5B80A2C ==6094== at 0x5AFE3B1: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECC1A: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x804F5FD: script (in /home/daniel/code/c/vimprobable/vimprobable2) ==6094== by 0x804CCE6: inputbox_changed_cb (in /home/daniel/code/c/vimprobable/vimprobable2) ==6094== by 0x5AED48B: g_cclosure_marshal_VOID__VOID (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AD1371: g_closure_invoke (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AE4047: ??? (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECB28: g_signal_emit_valist (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5AECE3C: g_signal_emit_by_name (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== by 0x5373319: ??? (in /usr/lib/libgtk-x11-2.0.so.0.2400.4) ==6094== by 0x5AEDE47: g_cclosure_marshal_VOID__PARAM (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.2800.6) ==6094== ==6094== HEAP SUMMARY: ==6094== in use at exit: 3,508,075 bytes in 127,041 blocks ==6094== total heap usage: 165,317 allocs, 38,276 frees, 8,523,068 bytes allocated ==6094== ==6094== LEAK SUMMARY: ==6094== definitely lost: 8,106 bytes in 67 blocks ==6094== indirectly lost: 18,840 bytes in 932 blocks ==6094== possibly lost: 343,389 bytes in 2,091 blocks ==6094== still reachable: 3,137,740 bytes in 123,951 blocks ==6094== suppressed: 0 bytes in 0 blocks ==6094== Rerun with --leak-check=full to see details of leaked memory ==6094== ==6094== For counts of detected and suppressed errors, rerun with: -v ==6094== Use --track-origins=yes to see where uninitialised values come from ==6094== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 206 from 13) Getötet During debugging webview_download_cb() was run sucessfully after that the segmentation fault occured. Daniel |
From: Daniel C. <dan...@gm...> - 2011-09-20 07:49:37
|
Hi Hannes! On Mon, Sep 19, 2011 at 07:46:07PM +0200, Hannes Schüller wrote: > I can't reproduce this. Could anyone else test it? I tested it at work on another machine and the browser didn't crash. I think I'll have time to get into the issue tomorrow. Daniel |
From: Hannes S. <ha...@yl...> - 2011-09-19 17:46:34
|
Hi Daniel! Daniel Carl <dan...@gm...> wrote: > The last patch to download via hints crashes vimprobable if the hint > where fired within the inputbox_changed_cb function, this is done if > you enter the downloadmode and fire the hint only by entering the > filter text wothout using tab or shift-tab nor a number to fire the > hint. I can't reproduce this. Could anyone else test it? Hannes |
From: Daniel C. <dan...@gm...> - 2011-09-18 23:47:10
|
Hi! I've extended the download of hints to also allow to download images that aren't descendants of a link. I don't know if there many pages where the feature can be used, because on most sites the images are surrounded by a link. To allow hinting for all images isn't usefull because the user can't see if the hint on an element refers to the link url or the image source and on sites with graphic menus we got to many hints. Daniel |
From: Daniel C. <dan...@gm...> - 2011-09-18 23:12:40
|
Hi Hannes! The last patch to download via hints crashes vimprobable if the hint where fired within the inputbox_changed_cb function, this is done if you enter the downloadmode and fire the hint only by entering the filter text wothout using tab or shift-tab nor a number to fire the hint. Daniel |