diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-08 22:08:05 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-08 22:08:05 +0200 |
commit | fec21d748cfdc76268821dfa9aa861dc537e4187 (patch) | |
tree | abe544b618235cdc88c5ae292bfda2e874b41fa4 | |
parent | 63c75cbb67228924d5dc1c7f45054f40cd2d395f (diff) | |
parent | 871c102bbc93b4a1a528d16b8e41d1b0075dd7d7 (diff) |
israellevins zoom_type toggling
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | examples/config/uzbl/config | 1 | ||||
-rw-r--r-- | uzbl.c | 9 | ||||
-rw-r--r-- | uzbl.h | 3 |
4 files changed, 14 insertions, 0 deletions
@@ -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 @@ -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} }, @@ -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 |