On Sun, 27 Sep 2009 23:35:51 +0200 Moritz Wilhelmy <n0nse...@n0nsense.xinutec.org> wrote:
> On Sun, Sep 27, 2009 at 11:28:42PM +0200, Moritz Wilhelmy wrote: > > My internet connection is sometimes very connected and I feel the > > need to disable images sometimes. Is there a patch? > > > > Regards, > > Moritz > > > > Sorry, I meant limited instead of connected > I don't know what's wrong with my brain but I should probably check > it -.- > > Here you go. Patch your config.h with this. MODKEY-Shift-i will disable images auto loading. This function can be modified with just about anything from http://webkitgtk.org/reference/webkitgtk-WebKitWebSettings.html
--- config.def.h 2009-09-11 02:40:39.000000000 -0500 +++ config.h 2009-09-27 17:27:45.000000000 -0500 @@ -1,6 +1,9 @@ /* modifier 0 means no modifier */ static gchar *progress = "#FF0000"; static gchar *progress_trust = "#00FF00"; + +static void hideimages(Client *c, const Arg *arg); + #define MODKEY GDK_CONTROL_MASK static Key keys[] = { /* modifier keyval function arg Focus */ @@ -28,5 +31,12 @@ static Key keys[] = { { GDK_SHIFT_MASK, GDK_Return, searchtext, { .b = FALSE }, SEARCHBAR }, { 0, GDK_Return, loaduri, { .v = NULL }, URLBAR }, { 0, GDK_Return, hideurl, { 0 }, URLBAR }, + { MODKEY|GDK_SHIFT_MASK,GDK_i, hideimages, { 0 }, ALWAYS }, }; +void +hideimages(Client *c, const Arg *arg) { + WebKitWebSettings *settings; + settings = webkit_web_view_get_settings(c->view); + g_object_set(G_OBJECT(settings), "auto-load-images", 0, NULL); +} \ No newline at end of file