diff options
author | Rob Kendrick <rjek@netsurf-browser.org> | 2006-03-26 21:35:54 +0000 |
---|---|---|
committer | Rob Kendrick <rjek@netsurf-browser.org> | 2006-03-26 21:35:54 +0000 |
commit | 94a3993be61c075072ac87da2fd69cae2f6481ae (patch) | |
tree | fc6f6cfe182157a577659d0e7d3bfd4dbb1648b8 /gtk/gtk_window.c | |
parent | 8cb8c74d403433f75a4cd1d2cb7b5cc78d4af9a5 (diff) | |
download | netsurf-94a3993be61c075072ac87da2fd69cae2f6481ae.tar.gz netsurf-94a3993be61c075072ac87da2fd69cae2f6481ae.tar.bz2 |
[project @ 2006-03-26 21:35:54 by rjek]
Implement Home button in GTK build
svn path=/import/netsurf/; revision=2184
Diffstat (limited to 'gtk/gtk_window.c')
-rw-r--r-- | gtk/gtk_window.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c index aa6e80601..80d40b5c3 100644 --- a/gtk/gtk_window.c +++ b/gtk/gtk_window.c @@ -64,6 +64,7 @@ static void gui_window_zoom100_button_event(GtkWidget *widget, gpointer data); static void gui_window_zoomout_button_event(GtkWidget *widget, gpointer data); static void gui_window_history_button_event(GtkWidget *widget, gpointer data); static void gui_window_reload_button_event(GtkWidget *widget, gpointer data); +static void gui_window_home_button_event(GtkWidget *widget, gpointer data); static void gui_window_stop_button_event(GtkWidget *widget, gpointer data); static void gui_window_back_button_event(GtkWidget *widget, gpointer data); @@ -279,6 +280,7 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw, NS_SIGNAL_CONNECT(g->reload_button, "clicked", gui_window_reload_button_event, g); NS_SIGNAL_CONNECT(history_button, "clicked", gui_window_history_button_event, g); + NS_SIGNAL_CONNECT(home_button, "clicked", gui_window_home_button_event, g); /* History window events */ NS_SIGNAL_CONNECT(history_area, "expose_event", @@ -371,6 +373,18 @@ void gui_window_reload_button_event(GtkWidget *widget, gpointer data) browser_window_reload(g->bw, true); } +void gui_window_home_button_event(GtkWidget *widget, gpointer data) +{ + struct gui_window *g = data; + char *referer = 0; + + if (g->bw->current_content && g->bw->current_content->url) + referer = g->bw->current_content->url; + + browser_window_go(g->bw, "http://netsurf.sourceforge.net/", + referer); +} + gboolean gui_window_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) { |