- /* webview */
- c->view = WEBKIT_WEB_VIEW(webkit_web_view_new());
- g_signal_connect(G_OBJECT(c->view), "title-changed", G_CALLBACK(titlechange), c);
- g_signal_connect(G_OBJECT(c->view), "load-progress-changed", G_CALLBACK(progresschange), c);
- g_signal_connect(G_OBJECT(c->view), "load-finished", G_CALLBACK(loadfinished), c);
- g_signal_connect(G_OBJECT(c->view), "load-committed", G_CALLBACK(loadcommit), c);
- g_signal_connect(G_OBJECT(c->view), "load-started", G_CALLBACK(loadstart), c);
- g_signal_connect(G_OBJECT(c->view), "hovering-over-link", G_CALLBACK(linkhover), c);
- g_signal_connect(G_OBJECT(c->view), "create-web-view", G_CALLBACK(createwindow), c);
- g_signal_connect(G_OBJECT(c->view), "new-window-policy-decision-requested", G_CALLBACK(decidewindow), c);
- g_signal_connect(G_OBJECT(c->view), "download-requested", G_CALLBACK(initdownload), c);
- g_signal_connect(G_OBJECT(c->view), "window-object-cleared", G_CALLBACK(windowobjectcleared), c);
- g_signal_connect(G_OBJECT(c->view), "focus-in-event", G_CALLBACK(focusview), c);
- g_signal_connect(G_OBJECT(c->view), "populate-popup", G_CALLBACK(context), c);
-
- /* uribar */
- c->uribar = gtk_entry_new();
- gtk_entry_set_has_frame(GTK_ENTRY(c->uribar), FALSE);
-
- /* searchbar */
- c->searchbar = gtk_entry_new();
- gtk_entry_set_has_frame(GTK_ENTRY(c->searchbar), FALSE);
-
- /* indicator */
- c->indicator = gtk_drawing_area_new();
- gtk_widget_set_size_request(c->indicator, 0, 2);
- g_signal_connect (G_OBJECT (c->indicator), "expose_event",
- G_CALLBACK (exposeindicator), c);
+ frame = webkit_web_view_get_main_frame(WEBKIT_WEB_VIEW(c->view));
+ g_signal_connect(G_OBJECT(frame), "scrollbars-policy-changed",
+ G_CALLBACK(gtk_true), NULL);
+
+ if(!enablescrollbars) {
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(c->scroll),
+ GTK_POLICY_NEVER, GTK_POLICY_NEVER);
+ } else {
+ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(c->scroll),
+ GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+ }