summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastian Geerken <devnull@localhost>2014-07-18 23:25:17 +0200
committerSebastian Geerken <devnull@localhost>2014-07-18 23:25:17 +0200
commit738c0a53692efc77a6888a2f683c2481ca844628 (patch)
tree8faef1cb0e1d1d9589c35cb1ac71cbea2da4ac9a /src
parent9d9b0c76a3b04a8ea5971e9d9cc8c9cd790b8b49 (diff)
New dillorc option 'adjust_min_width'. Also fixed bug in textblock extremes calculation.
Diffstat (limited to 'src')
-rw-r--r--src/dillo.cc2
-rw-r--r--src/prefs.c1
-rw-r--r--src/prefs.h1
-rw-r--r--src/prefsparser.cc1
4 files changed, 5 insertions, 0 deletions
diff --git a/src/dillo.cc b/src/dillo.cc
index 4d96988f..d67ba3af 100644
--- a/src/dillo.cc
+++ b/src/dillo.cc
@@ -56,6 +56,7 @@
#include "lout/debug.hh"
#include "dw/fltkcore.hh"
+#include "dw/widget.hh"
#include "dw/textblock.hh"
/*
@@ -483,6 +484,7 @@ int main(int argc, char **argv)
a_UIcmd_init();
StyleEngine::init();
+ dw::core::Widget::setAdjustMinWidth (prefs.adjust_min_width);
dw::Textblock::setPenaltyHyphen (prefs.penalty_hyphen);
dw::Textblock::setPenaltyHyphen2 (prefs.penalty_hyphen_2);
dw::Textblock::setPenaltyEmDashLeft (prefs.penalty_em_dash_left);
diff --git a/src/prefs.c b/src/prefs.c
index 56e02006..b0213fcc 100644
--- a/src/prefs.c
+++ b/src/prefs.c
@@ -68,6 +68,7 @@ void a_Prefs_init(void)
prefs.http_referer = dStrdup(PREFS_HTTP_REFERER);
prefs.http_user_agent = dStrdup(PREFS_HTTP_USER_AGENT);
prefs.limit_text_width = FALSE;
+ prefs.adjust_min_width = FALSE;
prefs.load_images=TRUE;
prefs.load_background_images=FALSE;
prefs.load_stylesheets=TRUE;
diff --git a/src/prefs.h b/src/prefs.h
index 0e54e0fc..b742e6e7 100644
--- a/src/prefs.h
+++ b/src/prefs.h
@@ -66,6 +66,7 @@ typedef struct {
int panel_size;
bool_t small_icons;
bool_t limit_text_width;
+ bool_t adjust_min_width;
bool_t w3c_plus_heuristics;
bool_t focus_new_tab;
double font_factor;
diff --git a/src/prefsparser.cc b/src/prefsparser.cc
index ce420eac..33f6cf51 100644
--- a/src/prefsparser.cc
+++ b/src/prefsparser.cc
@@ -79,6 +79,7 @@ int PrefsParser::parseOption(char *name, char *value)
{ "http_referer", &prefs.http_referer, PREFS_STRING },
{ "http_user_agent", &prefs.http_user_agent, PREFS_STRING },
{ "limit_text_width", &prefs.limit_text_width, PREFS_BOOL },
+ { "adjust_min_width", &prefs.adjust_min_width, PREFS_BOOL },
{ "load_images", &prefs.load_images, PREFS_BOOL },
{ "load_background_images", &prefs.load_background_images, PREFS_BOOL },
{ "load_stylesheets", &prefs.load_stylesheets, PREFS_BOOL },