aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.mk4
-rw-r--r--sb.c9
2 files changed, 8 insertions, 5 deletions
diff --git a/config.mk b/config.mk
index 316df10..af227fc 100644
--- a/config.mk
+++ b/config.mk
@@ -17,7 +17,7 @@ INCS = -I. -I/usr/include ${GTKINC}
LIBS = -L/usr/lib -lc ${GTKLIB}
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
-CFLAGS = -std=c99 -O2 ${INCS} ${CPPFLAGS}
+CFLAGS = -std=c99 -O3 -Wall ${INCS} ${CPPFLAGS}
LDFLAGS = -s ${LIBS}
# Solaris
@@ -25,4 +25,4 @@ LDFLAGS = -s ${LIBS}
#LDFLAGS = ${LIBS}
# compiler and linker
-CC = cc
+CC = gcc
diff --git a/sb.c b/sb.c
index e3e34e2..2966f45 100644
--- a/sb.c
+++ b/sb.c
@@ -130,6 +130,7 @@ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(w.notebook), TRUE);
static void tab_switch(gboolean b) {
gint(current) = gtk_notebook_get_current_page(GTK_NOTEBOOK(w.notebook));
+printf("%d \n", current);
if(b) {
if (current == gtk_notebook_get_n_pages(GTK_NOTEBOOK(w.notebook)) -1 ) { current = 0; }
@@ -143,6 +144,7 @@ else {current = current -1; }
gtk_notebook_set_current_page(GTK_NOTEBOOK(w.notebook), current);
}
+
WebKitWebView * tab_new_requested(WebKitWebView *v, WebKitWebFrame *f) {
tab_new();
struct tab *t = get_tab(NULL, gtk_notebook_get_current_page(GTK_NOTEBOOK(w.notebook)));
@@ -193,7 +195,7 @@ g_object_set (G_OBJECT(t->settings), "print-backgrounds", FALSE, NULL);
webkit_web_view_set_settings (WEBKIT_WEB_VIEW(t->view), t->settings);
gtk_widget_show_all(w.win);
-
+gtk_widget_hide(w.search);
gtk_notebook_set_current_page(GTK_NOTEBOOK(w.notebook), index);
//gtk_widget_grab_focus(w.bar);
//gchar *url;
@@ -203,15 +205,16 @@ gtk_notebook_set_current_page(GTK_NOTEBOOK(w.notebook), index);
static void tab_focus(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data) {
struct tab *t = get_tab(NULL, page_num);
-const char *title = webkit_web_view_get_title(t->view);
const char *url = webkit_web_view_get_uri(t->view);
+gtk_entry_set_text(GTK_ENTRY(w.bar), url);
+const char *title = webkit_web_view_get_title(t->view);
if (title == NULL && url == NULL) {
title = "sb";
url = "";
}
gtk_window_set_title(GTK_WINDOW(w.win), title);
-gtk_entry_set_text(GTK_ENTRY(w.bar), url);
+
}
static void config() {