aboutsummaryrefslogtreecommitdiff
path: root/sb.c
diff options
context:
space:
mode:
Diffstat (limited to 'sb.c')
-rw-r--r--sb.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/sb.c b/sb.c
index 1e099f0..4a503d4 100644
--- a/sb.c
+++ b/sb.c
@@ -43,18 +43,21 @@ if(b) {
/* Basic reload function */
void tab_reload(gboolean b) {
+
struct tab *t = get_tab(NULL, gtk_notebook_get_current_page(w.notebook));
+
if(b) {
-webkit_web_view_reload(t->view);
-}
-else {
-webkit_web_view_reload_bypass_cache(t->view);
-}
+ webkit_web_view_reload(t->view);
+ }
+ else {
+ webkit_web_view_reload_bypass_cache(t->view);
+ }
}
/* close tab, and quit if there are no tabs */
void tab_close() {
+
struct tab *t = get_tab(NULL, gtk_notebook_get_current_page(w.notebook));
gtk_notebook_remove_page(w.notebook, gtk_notebook_get_current_page(w.notebook));
g_free(t);
@@ -64,7 +67,10 @@ if(gtk_notebook_get_n_pages(w.notebook) == 1) {
gtk_widget_grab_focus(gtk_notebook_get_nth_page(w.notebook, gtk_notebook_get_current_page(w.notebook)));
focus_view();
}
-if (gtk_notebook_get_n_pages(w.notebook) == 0) { gtk_main_quit(); }
+
+if(gtk_notebook_get_n_pages(w.notebook) == 0) {
+ gtk_main_quit();
+ }
}
@@ -87,7 +93,7 @@ u = g_strrstr(uri, "://") ? g_strdup(uri)
: g_strdup_printf("http://%s", uri);
webkit_web_view_load_uri(t->view, u);
g_free(u);
-};
+}
/*increase or decrease the zoom of the page */
@@ -202,7 +208,7 @@ gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(t->scroll), GTK_POLICY_NEVER,
stylesheet = g_strconcat("file://", g_get_home_dir(), "/", DEFAULT_STYLE_SHEET, NULL);
-g_object_set(G_OBJECT(w.webkitsettings), "enable-page-cache", TRUE,
+g_object_set(G_OBJECT(w.webkitsettings), "disable-page-cache", TRUE,
"enable-java-applet", FALSE,
"user-stylesheet-uri", stylesheet , NULL);
g_free(stylesheet);
@@ -278,7 +284,6 @@ gtk_notebook_set_scrollable(w.notebook, TRUE);
gtk_notebook_set_show_border(w.notebook, FALSE);
//gtk_notebook_set_tab_border(w.notebook, 0);
-gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(w.status), FALSE);
gtk_box_pack_start(GTK_BOX (w.vbox), w.bar, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(w.vbox), GTK_WIDGET(w.notebook), TRUE, TRUE, 0);