From 7180bedbc91efa454b9d5886e9491d4711c7852b Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Mon, 25 Jul 2011 19:09:49 +0000 Subject: remove the scrollbars_visible variable it doesn't work on GTK3, and discussion on the webkit-gtk mailing list suggests that it was never intended to work. instead, GTK theming can be used to hide scrollbars. --- README | 3 --- src/callbacks.c | 6 ------ src/callbacks.h | 3 --- src/uzbl-core.c | 11 ----------- src/uzbl-core.h | 1 - src/variables.c | 11 ----------- 6 files changed, 35 deletions(-) diff --git a/README b/README index 1432b80..0d65084 100644 --- a/README +++ b/README @@ -319,9 +319,6 @@ file). * `fifo_dir`: location to store FIFOs. * `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). (Note: This option does nothing - on GTK3 due to ) * `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/callbacks.c b/src/callbacks.c index ef2005d..d3501b7 100644 --- a/src/callbacks.c +++ b/src/callbacks.c @@ -634,12 +634,6 @@ populate_popup_cb(WebKitWebView *v, GtkMenu *m, void *c) { } } -gboolean -scrollbars_policy_cb(WebKitWebView *view) { - (void) view; - return TRUE; -} - void window_object_cleared_cb(WebKitWebView *webview, WebKitWebFrame *frame, JSGlobalContextRef *context, JSObjectRef *object) { diff --git a/src/callbacks.h b/src/callbacks.h index 176cb40..e9240b5 100644 --- a/src/callbacks.h +++ b/src/callbacks.h @@ -78,9 +78,6 @@ scroll_vert_cb(GtkAdjustment *adjust, void *w); gboolean scroll_horiz_cb(GtkAdjustment *adjust, void *w); -gboolean -scrollbars_policy_cb(WebKitWebView *view); - void window_object_cleared_cb(WebKitWebView *webview, WebKitWebFrame *frame, JSGlobalContextRef *context, JSObjectRef *object); diff --git a/src/uzbl-core.c b/src/uzbl-core.c index d6bd589..af60767 100644 --- a/src/uzbl-core.c +++ b/src/uzbl-core.c @@ -779,13 +779,6 @@ create_scrolled_win() { g->web_view = WEBKIT_WEB_VIEW(webkit_web_view_new()); g->scrolled_win = gtk_scrolled_window_new(NULL, NULL); - WebKitWebFrame *wf = webkit_web_view_get_main_frame (g->web_view); - -#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), @@ -816,10 +809,6 @@ create_scrolled_win() { "signal::focus-out-event", (GCallback)focus_cb, NULL, "signal::window-object-cleared", (GCallback)window_object_cleared_cb,NULL, NULL); - - g_object_connect (G_OBJECT (wf), - "signal::scrollbars-policy-changed", (GCallback)scrollbars_policy_cb, NULL, - NULL); } diff --git a/src/uzbl-core.h b/src/uzbl-core.h index db9c32e..fb7d993 100644 --- a/src/uzbl-core.h +++ b/src/uzbl-core.h @@ -69,7 +69,6 @@ typedef struct { /* Scrolling */ GtkAdjustment* bar_v; /* Information about document length */ GtkAdjustment* bar_h; /* and scrolling position */ - int scrollbars_visible; /* Web page */ WebKitWebView* web_view; diff --git a/src/variables.c b/src/variables.c index d69ac6c..cf179d7 100644 --- a/src/variables.c +++ b/src/variables.c @@ -500,13 +500,6 @@ set_accept_languages() { } } -void -cmd_scrollbars_visibility() { - GtkPolicyType policy = uzbl.gui.scrollbars_visible ? GTK_POLICY_AUTOMATIC : GTK_POLICY_NEVER; - - gtk_scrolled_window_set_policy ( GTK_SCROLLED_WINDOW (uzbl.gui.scrolled_win), policy, policy ); -} - /* requires webkit >=1.1.14 */ void cmd_view_source() { @@ -594,10 +587,6 @@ const struct var_name_to_ptr_t { { "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)}, { "WEBKIT_MINOR", PTR_C_INT(uzbl.info.webkit_minor, NULL)}, -- cgit v1.2.3