From: Dieter Plaetinck Date: Tue, 2 Jun 2009 20:52:12 +0000 (+0200) Subject: merge in uranthers zoomlevel thingie. doesnt work yet because of strof not recognized... X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=dfd89110a7a965d417ebda0d16dd024bcfbbf2f5;p=uzbl-mobile merge in uranthers zoomlevel thingie. doesnt work yet because of strof not recognized. stay tuned... --- dfd89110a7a965d417ebda0d16dd024bcfbbf2f5 diff --cc AUTHORS index 4ee7f0c,24597f1..8a55a32 --- a/AUTHORS +++ b/AUTHORS @@@ -18,7 -18,6 +18,8 @@@ Contributors Sylvester Johansson (scj) - form filler script & different take on link follower (mxf) - uzblcat Mark Nevill - misc patches + Uli Schlachter (psychon) - basic mime_policy_cb & Makefile patch ++ (uranther) - zoom level Originaly based on http://trac.webkit.org/browser/trunk/WebKitTools/GtkLauncher/main.c Which is copyrighted: diff --cc examples/configs/sampleconfig-dev index c1c2e1d,939fa7e..c8eddd0 --- a/examples/configs/sampleconfig-dev +++ b/examples/configs/sampleconfig-dev @@@ -104,6 -104,6 +104,7 @@@ bind r = reloa bind R = reload_ign_cache bind + = zoom_in bind - = zoom_out ++bind 0 = sh "echo set zoom_level = 1.0 > $4" bind t = toggle_status # Hilight matches. Notice the * after the slash - it makes the command incremental, i.e. gets called # on every character you type. You can do `bind /_ = search %s' if you want it less interactive. diff --cc uzbl.c index b444c97,8e6b51b..ba5a98a --- a/uzbl.c +++ b/uzbl.c @@@ -36,13 -36,17 +36,15 @@@ #include #include #include - -#include #include #include +#include +#include #include #include -#include - #include + #include + #include #include #include @@@ -1541,12 -1529,13 +1544,17 @@@ set_var_value(gchar *name, gchar *val) if (c->type == TYPE_STR) { buf = expand_vars(val); g_free(*c->ptr); - *c->ptr = g_strdup(val); - } else if (c->type == TYPE_INT) { + *c->ptr = buf; + } else if(c->type == TYPE_INT) { int *ip = (int *)c->ptr; - *ip = (int)strtoul(val, &endp, 10); + buf = expand_vars(val); + *ip = (int)strtoul(buf, &endp, 10); + g_free(buf); + } else if (c->type == TYPE_FLOAT) { + float *fp = (float *)c->ptr; - *fp = strtof(val, &endp); ++ buf = expand_vars(val); ++ *fp = strtof(buf, &endp); ++ g_free(buf); } /* invoke a command specific function */