diff options
author | mutantturkey <crazycal00@gmail.com> | 2010-05-28 22:17:10 -0400 |
---|---|---|
committer | mutantturkey <crazycal00@gmail.com> | 2010-05-28 22:17:10 -0400 |
commit | c06e0968515a4ce5636d038ef7bf28370ff1bcb9 (patch) | |
tree | b5f26737ca731a4d055fbb0a78ed02a8e42c269f /sb.c | |
parent | d33f538809587bef8337188bcc857ccb287a3374 (diff) |
fixed the newtab bux
Signed-off-by: mutantturkey <crazycal00@gmail.com>
Diffstat (limited to 'sb.c')
-rw-r--r-- | sb.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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() { |