diff options
author | mutantturkey <mutantturke@gmail.com> | 2012-08-24 14:06:35 -0400 |
---|---|---|
committer | mutantturkey <mutantturke@gmail.com> | 2012-08-24 14:06:35 -0400 |
commit | c2632899c0da1f0ab2034c54cbe5d7570319a203 (patch) | |
tree | 096af417d70043ebdcac03a8da6cff83315a1208 /sb.c | |
parent | b8b18a7adc7ec9830969bc691ddfadae3bd8bfac (diff) |
typographical error
Diffstat (limited to 'sb.c')
-rw-r--r-- | sb.c | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -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 <gdk/gdkkeysyms.h> #include <string.h> #include <unistd.h> @@ -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); |