aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brendan Taylor <whateley@gmail.com>2011-04-30 08:34:38 -0600
committerGravatar Brendan Taylor <whateley@gmail.com>2011-04-30 08:34:38 -0600
commit1509787676376447ca7ec41b15ff85ff90f0d842 (patch)
treedf3caa41dfe89db8ab778d4839d2e3159304b588
parentcb839c2f1c1bdd360ae51ac1cce98cdbae0de796 (diff)
GTK3 always has scrollbars, workaround for https://bugs.webkit.org/show_bug.cgi?id=59197
:(
-rw-r--r--README3
-rw-r--r--src/uzbl-core.c16
2 files changed, 11 insertions, 8 deletions
diff --git a/README b/README
index 08c6356..7c5a673 100644
--- a/README
+++ b/README
@@ -319,7 +319,8 @@ file).
* `socket_dir`: location to store sockets.
* `http_debug`: HTTP debug mode (value 0-3).
* `scrollbars_visible`: set to 1 to have GTK scrollbars if the document
- doesn't fit into the window (defaults to 0)
+ doesn't fit into the window (defaults to 0). (Note: This option does nothing
+ on GTK3 due to <https://bugs.webkit.org/show_bug.cgi?id=59197>)
* `javascript_windows`: Whether javascript can open windows automatically
* `shell_cmd`: Alias which will be expanded to use shell commands (eg `sh -c`).
* `print_events`: show events on stdout
diff --git a/src/uzbl-core.c b/src/uzbl-core.c
index 56d2f86..0dbff4f 100644
--- a/src/uzbl-core.c
+++ b/src/uzbl-core.c
@@ -137,7 +137,10 @@ const struct var_name_to_ptr_t {
{ "current_encoding", PTR_V_STR(uzbl.behave.current_encoding, 1, set_current_encoding)},
{ "enforce_96_dpi", PTR_V_INT(uzbl.behave.enforce_96dpi, 1, cmd_enforce_96dpi)},
{ "caret_browsing", PTR_V_INT(uzbl.behave.caret_browsing, 1, cmd_caret_browsing)},
+
+#if !GTK_CHECK_VERSION(3,0,0)
{ "scrollbars_visible", PTR_V_INT(uzbl.gui.scrollbars_visible, 1, cmd_scrollbars_visibility)},
+#endif
/* constants (not dumpable or writeable) */
{ "WEBKIT_MAJOR", PTR_C_INT(uzbl.info.webkit_major, NULL)},
@@ -1254,8 +1257,7 @@ parse_command(const char *cmd, const char *params, GString *result) {
void
move_statusbar() {
- if (!uzbl.gui.scrolled_win &&
- !uzbl.gui.mainbar)
+ if (!uzbl.gui.scrolled_win && !uzbl.gui.mainbar)
return;
g_object_ref(uzbl.gui.scrolled_win);
@@ -1442,11 +1444,11 @@ create_scrolled_win() {
g->scrolled_win = gtk_scrolled_window_new(NULL, NULL);
WebKitWebFrame *wf = webkit_web_view_get_main_frame (g->web_view);
- gtk_scrolled_window_set_policy(
- GTK_SCROLLED_WINDOW(g->scrolled_win),
- GTK_POLICY_NEVER,
- GTK_POLICY_NEVER
- );
+#if !GTK_CHECK_VERSION(3,0,0)
+ /* hide the scrollbars by default */
+ uzbl.gui.scrollbars_visible = 0;
+ cmd_scrollbars_visibility();
+#endif
gtk_container_add(
GTK_CONTAINER(g->scrolled_win),