aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--examples/configs/sampleconfig-dev13
-rw-r--r--uzbl.c21
-rw-r--r--uzbl.h14
3 files changed, 46 insertions, 2 deletions
diff --git a/examples/configs/sampleconfig-dev b/examples/configs/sampleconfig-dev
index 73c61c8..8652cc1 100644
--- a/examples/configs/sampleconfig-dev
+++ b/examples/configs/sampleconfig-dev
@@ -36,6 +36,19 @@ set font_size = 11
## enable/disable JavaScript
#set disbale_scripts = 1
+## Whether text areas are resizable
+#set resizeable_text_areas = 1
+
+## The default encoding used to display text
+#set default_encoding = iso-8859-1
+
+## Whether background images should be printed
+#set print_background = 0
+
+## Enforce a resolution of 96 DPI. This is meant for compatibility with
+## web pages which cope badly with different screen resolutions
+#set enforce_96_dpi = 1
+
#
# use with bind ... = sh <shell-oneliner>
diff --git a/uzbl.c b/uzbl.c
index 2b983cb..e7eb5d5 100644
--- a/uzbl.c
+++ b/uzbl.c
@@ -129,6 +129,9 @@ const struct {
{ "enable_private", PTR(uzbl.behave.enable_private, INT, cmd_enable_private)},
{ "print_backgrounds", PTR(uzbl.behave.print_bg, INT, cmd_print_bg)},
{ "stylesheet_uri", PTR(uzbl.behave.style_uri, STR, cmd_style_uri)},
+ { "resizable_text_areas",PTR(uzbl.behave.resizable_txt, INT, cmd_resizable_txt)},
+ { "default_encoding", PTR(uzbl.behave.default_encoding, STR, cmd_default_encoding)},
+ { "enforce_96_dpi", PTR(uzbl.behave.enforce_96dpi, INT, cmd_enforce_96dpi)},
{ NULL, {.ptr = NULL, .type = TYPE_INT, .func = NULL}}
}, *n2v_p = var_name_to_ptr;
@@ -1260,6 +1263,24 @@ cmd_style_uri() {
uzbl.behave.style_uri, NULL);
}
+static void
+cmd_resizable_txt() {
+ g_object_set (G_OBJECT(view_settings()), "resizable-text-areas",
+ uzbl.behave.resizable_txt, NULL);
+}
+
+static void
+cmd_default_encoding() {
+ g_object_set (G_OBJECT(view_settings()), "default-encoding",
+ uzbl.behave.default_encoding, NULL);
+}
+
+static void
+cmd_enforce_96dpi() {
+ g_object_set (G_OBJECT(view_settings()), "enforce-96-dpi",
+ uzbl.behave.enforce_96dpi, NULL);
+}
+
static void
cmd_cookie_handler() {
gchar **split = g_strsplit(uzbl.behave.cookie_handler, " ", 2);
diff --git a/uzbl.h b/uzbl.h
index d640492..3f5e60f 100644
--- a/uzbl.h
+++ b/uzbl.h
@@ -163,8 +163,9 @@ typedef struct {
guint enable_private;
guint print_bg;
gchar* style_uri;
-
-
+ guint resizable_txt;
+ gchar* default_encoding;
+ guint enforce_96dpi;
/* command list: name -> Command */
GHashTable* commands;
@@ -470,5 +471,14 @@ cmd_print_bg();
static void
cmd_style_uri();
+static void
+cmd_resizable_txt();
+
+static void
+cmd_default_encoding();
+
+static void
+cmd_enforce_96dpi();
+
/* vi: set et ts=4: */