[project @ 2006-03-29 15:26:53 by rjek]
Moved homepage_url option into core from riscos, and use it in the GTK frontend svn path=/import/netsurf/; revision=2481
This commit is contained in:
parent
5d4761973d
commit
5d434ff002
|
@ -76,7 +76,8 @@ char *option_ca_bundle = 0;
|
|||
char *option_cookie_file = 0;
|
||||
/** Cookie jar loaction */
|
||||
char *option_cookie_jar = 0;
|
||||
|
||||
/** Home page location */
|
||||
char *option_homepage_url = 0;
|
||||
/* Fetcher configuration */
|
||||
/** Maximum simultaneous active fetchers */
|
||||
int option_max_fetchers = 24;
|
||||
|
@ -118,6 +119,7 @@ struct {
|
|||
{ "ca_bundle", OPTION_STRING, &option_ca_bundle },
|
||||
{ "cookie_file", OPTION_STRING, &option_cookie_file },
|
||||
{ "cookie_jar", OPTION_STRING, &option_cookie_jar },
|
||||
{ "homepage_url", OPTION_STRING, &option_homepage_url },
|
||||
/* Fetcher options */
|
||||
{ "max_fetchers", OPTION_INTEGER, &option_max_fetchers },
|
||||
{ "max_fetchers_per_host",
|
||||
|
|
|
@ -49,6 +49,7 @@ extern int option_font_default; /* a css_font_family */
|
|||
extern char *option_ca_bundle;
|
||||
extern char *option_cookie_file;
|
||||
extern char *option_cookie_jar;
|
||||
extern char *option_homepage_url;
|
||||
|
||||
/* Fetcher configuration. */
|
||||
extern int option_max_fetchers;
|
||||
|
|
|
@ -139,6 +139,10 @@ void gui_init(int argc, char** argv)
|
|||
void gui_init2(int argc, char** argv)
|
||||
{
|
||||
const char *addr = "http://netsurf.sourceforge.net/";
|
||||
|
||||
if (option_homepage_url != NULL)
|
||||
addr = option_homepage_url;
|
||||
|
||||
if (argc > 1) addr = argv[1];
|
||||
browser_window_create(addr, 0, 0);
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "netsurf/desktop/gui.h"
|
||||
#include "netsurf/desktop/netsurf.h"
|
||||
#include "netsurf/desktop/plotters.h"
|
||||
#include "netsurf/desktop/options.h"
|
||||
#include "netsurf/gtk/gtk_gui.h"
|
||||
#include "netsurf/gtk/gtk_plotters.h"
|
||||
#include "netsurf/gtk/gtk_window.h"
|
||||
|
@ -377,12 +378,15 @@ void gui_window_home_button_event(GtkWidget *widget, gpointer data)
|
|||
{
|
||||
struct gui_window *g = data;
|
||||
char *referer = 0;
|
||||
char *addr = "http://netsurf.sourceforge.net/";
|
||||
|
||||
if (option_homepage_url != NULL)
|
||||
addr = option_homepage_url;
|
||||
|
||||
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);
|
||||
browser_window_go(g->bw, addr, referer);
|
||||
}
|
||||
|
||||
gboolean gui_window_expose_event(GtkWidget *widget,
|
||||
|
|
|
@ -44,7 +44,6 @@ extern bool option_window_size_clone;
|
|||
extern bool option_background_images;
|
||||
extern bool option_buffer_animations;
|
||||
extern bool option_buffer_everything;
|
||||
extern char *option_homepage_url;
|
||||
extern bool option_open_browser_at_startup;
|
||||
extern bool option_no_plugins;
|
||||
extern char *option_font_sans;
|
||||
|
@ -146,7 +145,6 @@ char *option_theme_save = 0;
|
|||
{ "background_images", OPTION_BOOL, &option_background_images }, \
|
||||
{ "buffer_animations", OPTION_BOOL, &option_buffer_animations }, \
|
||||
{ "buffer_everything", OPTION_BOOL, &option_buffer_everything }, \
|
||||
{ "homepage_url", OPTION_STRING, &option_homepage_url }, \
|
||||
{ "open_browser_at_startup",OPTION_BOOL, &option_open_browser_at_startup }, \
|
||||
{ "no_plugins", OPTION_BOOL, &option_no_plugins }, \
|
||||
{ "font_sans", OPTION_STRING, &option_font_sans }, \
|
||||
|
|
Loading…
Reference in New Issue