[project @ 2006-03-26 21:35:54 by rjek]

Implement Home button in GTK build

svn path=/import/netsurf/; revision=2184
This commit is contained in:
Rob Kendrick 2006-03-26 21:35:54 +00:00
parent 8cb8c74d40
commit 94a3993be6

View File

@ -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)
{