diff options
author | 2009-11-03 12:56:09 +0100 | |
---|---|---|
committer | 2009-11-03 12:56:09 +0100 | |
commit | f9bb1855e4839675ac39eecbfba77dfffcdf36cb (patch) | |
tree | 804fcb1685f9d2f7df29ae7d371334032ca5de23 | |
parent | 9fe687b21c31dd56a398f30c946bd354cb6b169f (diff) | |
parent | a9363df274c555c6480ab89704fdc9fb8dc95b30 (diff) |
Merge branch 'experimental' of git://github.com/Dieterbe/uzbl into prompt
-rw-r--r-- | callbacks.c | 9 | ||||
-rw-r--r-- | callbacks.h | 3 | ||||
-rwxr-xr-x | uzbl-browser | 18 | ||||
-rw-r--r-- | uzbl-core.c | 1 | ||||
-rw-r--r-- | uzbl-core.h | 1 |
5 files changed, 22 insertions, 10 deletions
diff --git a/callbacks.c b/callbacks.c index a699c1d..f4199ce 100644 --- a/callbacks.c +++ b/callbacks.c @@ -267,8 +267,15 @@ cmd_view_source() { } void +cmd_set_zoom_type () { + if(uzbl.behave.zoom_type) + webkit_web_view_set_full_content_zoom (uzbl.gui.web_view, TRUE); + else + webkit_web_view_set_full_content_zoom (uzbl.gui.web_view, FALSE); +} + +void toggle_zoom_type (WebKitWebView* page, GArray *argv, GString *result) { - (void)page; (void)argv; (void)result; diff --git a/callbacks.h b/callbacks.h index 05dc618..cc34618 100644 --- a/callbacks.h +++ b/callbacks.h @@ -53,6 +53,9 @@ void cmd_zoom_level(); void +cmd_set_zoom_type(); + +void cmd_disable_plugins(); void diff --git a/uzbl-browser b/uzbl-browser index 7cc8002..5ff72e9 100755 --- a/uzbl-browser +++ b/uzbl-browser @@ -35,17 +35,17 @@ do echo "could not create $dir" >&2 exit 2 fi - # if we're initialising a new config directory, put the default (recommended) config in it - if [ "$dir" == $XDG_CONFIG_HOME/uzbl ] - then - if ! cp $PREFIX/share/uzbl/examples/config/uzbl/config $XDG_CONFIG_HOME/uzbl/config - then - echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 - exit 3 - fi - fi fi done +# if no config exists yet in the recommended location, put the default (recommended) config there +if [ ! -f $XDG_CONFIG_HOME/uzbl/config ] +then + if ! cp $PREFIX/share/uzbl/examples/config/uzbl/config $XDG_CONFIG_HOME/uzbl/config + then + echo "Could not copy default config to $XDG_CONFIG_HOME/uzbl/config" >&2 + exit 3 + fi +fi if [ ! -S $XDG_CACHE_HOME/uzbl/cookie_daemon_socket ] then diff --git a/uzbl-core.c b/uzbl-core.c index 3a59574..e6b427f 100644 --- a/uzbl-core.c +++ b/uzbl-core.c @@ -119,6 +119,7 @@ const struct var_name_to_ptr_t { /* exported WebKitWebSettings properties */ { "zoom_level", PTR_V_FLOAT(uzbl.behave.zoom_level, 1, cmd_zoom_level)}, + { "zoom_type", PTR_V_INT(uzbl.behave.zoom_type, 1, cmd_set_zoom_type)}, { "font_size", PTR_V_INT(uzbl.behave.font_size, 1, cmd_font_size)}, { "default_font_family", PTR_V_STR(uzbl.behave.default_font_family, 1, cmd_default_font_family)}, { "monospace_font_family", PTR_V_STR(uzbl.behave.monospace_font_family, 1, cmd_monospace_font_family)}, diff --git a/uzbl-core.h b/uzbl-core.h index 51b415b..67c1bda 100644 --- a/uzbl-core.h +++ b/uzbl-core.h @@ -152,6 +152,7 @@ typedef struct { guint monospace_size; guint minimum_font_size; gfloat zoom_level; + gboolean zoom_type; guint disable_plugins; guint disable_scripts; guint autoload_img; |