From c2632899c0da1f0ab2034c54cbe5d7570319a203 Mon Sep 17 00:00:00 2001 From: mutantturkey Date: Fri, 24 Aug 2012 14:06:35 -0400 Subject: typographical error --- sb.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/sb.c b/sb.c index 819f228..1ee4108 100644 --- a/sb.c +++ b/sb.c @@ -1,10 +1,3 @@ -/* Simple browser my attempt at an even less-sucking browser than surf. - * original code is from alot of places, gtkforums.com, gtkwebkit.org provided - * alot of nice API examples :), and of course, surf (though i was careful not - * to steal any code because of the damned MIT/X license) - * uzbl also helped inspire me. along with a previous surf fork named inferno. -*/ - #include #include #include @@ -99,7 +92,10 @@ void load_uri(gchar *uri) { gchar *u; struct tab *t = get_tab(NULL, gtk_notebook_get_current_page(w.notebook)); - /*Borrowed from surf, no point creating another method, this seems to work well */ + /*Borrowed from surf, no point creating another method, this seems to work well + * these few lines of code were distributed under the MIT/X license by the + * suckless project. */ + u = g_strrstr(uri, "://") ? g_strdup(uri) : g_strdup_printf("http://%s", uri); webkit_web_view_load_uri(t->view, u); @@ -303,12 +299,14 @@ void tab_focus(GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer gtk_entry_set_text(GTK_ENTRY(w.bar), url); } + /* focus on view */ void focus_view() { struct tab *t = get_tab(NULL, gtk_notebook_get_current_page(w.notebook)); gtk_widget_grab_focus(GTK_WIDGET(t->view)); } + /* misc functions to help initialization */ void window_setup() { @@ -318,7 +316,7 @@ void window_setup() { w.hbox = gtk_hbox_new(FALSE, 0); w.notebook = gtk_notebook_new(); - w.bar = gtk_entry_new (); + w.bar = gtk_entry_new(); w.searchbar = gtk_entry_new(); w.status = gtk_statusbar_new(); @@ -358,6 +356,7 @@ void window_setup() { } + /* main function */ int main (int argc, char* argv[]) { gtk_init (&argc, &argv); -- cgit v1.2.1