From dc3ce6372fae7edb01f6d1f79c3d4bf622cbb394 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 8 Apr 2010 21:27:55 +0000 Subject: Try to handle nonsense status bar width option settings. This is probably only mildly better than just leaving people with almost no status bar by default. svn path=/trunk/netsurf/; revision=10326 --- gtk/gtk_gui.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gtk') diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index c7c535fc5..27c0921ba 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -212,6 +212,16 @@ static void gui_init(int argc, char** argv) option_core_select_menu = true; + /* Attempt to handle nonsense status bar widths. These may exist + * in people's Choices as the GTK front end used to abuse the + * status bar width option by using it for an absolute value in px. + * The GTK front end now correctly uses it as a proportion of window + * width. Here we assume that a value of less than 15% is wrong + * and set to the default two thirds. */ + if (option_toolbar_status_width < 1500) { + option_toolbar_status_width = 6667; + } + /* check what the font settings are, setting them to a default font * if they're not set - stops Pango whinging */ -- cgit v1.2.3