aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--examples/config/uzbl/config1
-rw-r--r--uzbl.c9
-rw-r--r--uzbl.h3
4 files changed, 14 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 83b87a1..1253144 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -25,6 +25,7 @@ Contributors:
neutralinsomniac - load_progress = 0 fix
Maximilian Gaß (mxey) - small patches
Abel Camarillo (00z) - make it compile on OpenBSD
+ (israellevin) - toggle_zoom_type
Originaly based on http://trac.webkit.org/browser/trunk/WebKitTools/GtkLauncher/main.c
Which is copyrighted:
diff --git a/examples/config/uzbl/config b/examples/config/uzbl/config
index bbe3a75..714daa2 100644
--- a/examples/config/uzbl/config
+++ b/examples/config/uzbl/config
@@ -104,6 +104,7 @@ bind r = reload
bind R = reload_ign_cache
bind + = zoom_in
bind - = zoom_out
+bind T = toggle_zoom_type
bind 1 = sh "echo set zoom_level = 1.0 > $4"
bind 2 = sh "echo set zoom_level = 2.0 > $4"
bind t = toggle_status
diff --git a/uzbl.c b/uzbl.c
index 7b810dc..6c74959 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -487,6 +487,14 @@ cmd_set_status() {
}
static void
+toggle_zoom_type (WebKitWebView* page, GArray *argv) {
+ (void)page;
+ (void)argv;
+
+ webkit_web_view_set_full_content_zoom (page, !webkit_web_view_get_full_content_zoom (page));
+}
+
+static void
toggle_status_cb (WebKitWebView* page, GArray *argv) {
(void)page;
(void)argv;
@@ -614,6 +622,7 @@ static struct {char *name; Command command[2];} cmdlist[] =
{ "stop", {view_stop_loading, 0}, },
{ "zoom_in", {view_zoom_in, 0}, }, //Can crash (when max zoom reached?).
{ "zoom_out", {view_zoom_out, 0}, },
+ { "toggle_zoom_type", {toggle_zoom_type, 0}, },
{ "uri", {load_uri, NOSPLIT} },
{ "js", {run_js, NOSPLIT} },
{ "script", {run_external_js, 0} },
diff --git a/uzbl.h b/uzbl.h
index 2e7ccf9..67fbbb5 100644
--- a/uzbl.h
+++ b/uzbl.h
@@ -260,6 +260,9 @@ static gboolean
download_cb (WebKitWebView *web_view, GObject *download, gpointer user_data);
static void
+toggle_zoom_type (WebKitWebView* page, GArray *argv);
+
+static void
toggle_status_cb (WebKitWebView* page, GArray *argv);
static void