From 738c0a53692efc77a6888a2f683c2481ca844628 Mon Sep 17 00:00:00 2001 From: Sebastian Geerken Date: Fri, 18 Jul 2014 23:25:17 +0200 Subject: New dillorc option 'adjust_min_width'. Also fixed bug in textblock extremes calculation. --- src/dillo.cc | 2 ++ src/prefs.c | 1 + src/prefs.h | 1 + src/prefsparser.cc | 1 + 4 files changed, 5 insertions(+) (limited to 'src') 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 }, -- cgit v1.2.3