From: Daniel Carl Date: Sat, 30 Mar 2013 14:11:51 +0000 (+0100) Subject: Disable the scrollbars from within the application. X-Git-Url: https://git.owens.tech/assets/static/git.owens.tech/assets/static/git.owens.tech/git?a=commitdiff_plain;h=f4ac73866de30171ede250a386e348d451c19c03;p=vimb.git Disable the scrollbars from within the application. Maybe it's not so nice to configure the .gtkrc-2.0 if someone start playing around with the vimb browser. So we disable the scrollbars programmatic. But for now this will not work when vimb is compiled agains gtk3 libs. --- diff --git a/src/main.c b/src/main.c index 06022f4..e43ba57 100644 --- a/src/main.c +++ b/src/main.c @@ -676,6 +676,7 @@ static void vb_init_core(void) gui->scroll = gtk_scrolled_window_new(NULL, NULL); gui->adjust_h = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(gui->scroll)); gui->adjust_v = gtk_scrolled_window_get_vadjustment(GTK_SCROLLED_WINDOW(gui->scroll)); + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(gui->scroll), GTK_POLICY_NEVER, GTK_POLICY_NEVER); /* Prepare the inputbox */ gui->inputbox = gtk_entry_new(); @@ -771,6 +772,8 @@ static void vb_read_config(void) static void vb_setup_signals() { + WebKitWebFrame *frame = webkit_web_view_get_main_frame(vb.gui.webview); + /* Set up callbacks so that if either the main window or the browser * instance is closed, the program will exit */ g_signal_connect(vb.gui.window, "destroy", G_CALLBACK(vb_destroy_window_cb), NULL); @@ -788,6 +791,9 @@ static void vb_setup_signals() NULL ); + g_signal_connect(G_OBJECT(frame), "scrollbars-policy-changed", G_CALLBACK(gtk_true), NULL); + + g_object_connect( G_OBJECT(vb.gui.inputbox), "signal::activate", G_CALLBACK(vb_inputbox_activate_cb), NULL,