summaryrefslogtreecommitdiff
path: root/windows/gui.c
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2012-03-22 09:34:34 +0000
committerVincent Sanders <vince@netsurf-browser.org>2012-03-22 09:34:34 +0000
commit1490b52a6b96b6a69a0c4fe9e0515dc717425128 (patch)
tree8caba44a9da98e6cebf4f188e3232534b1596a4d /windows/gui.c
parent0797bf5a5731b2c8d55105b453530584ea4e1f5b (diff)
downloadnetsurf-1490b52a6b96b6a69a0c4fe9e0515dc717425128.tar.gz
netsurf-1490b52a6b96b6a69a0c4fe9e0515dc717425128.tar.bz2
NetSurf options rework (a=vince r=daniels,jmb)
svn path=/trunk/netsurf/; revision=13548
Diffstat (limited to 'windows/gui.c')
-rw-r--r--windows/gui.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/windows/gui.c b/windows/gui.c
index f3a2a730d..b98bde469 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -832,7 +832,7 @@ nsws_window_command(HWND hwnd,
break;
case IDM_NAV_HOME:
- browser_window_go(gw->bw, option_homepage_url, 0, true);
+ browser_window_go(gw->bw, nsoption_charp(homepage_url), 0, true);
break;
case IDM_NAV_STOP:
@@ -893,11 +893,11 @@ nsws_window_command(HWND hwnd,
case IDM_VIEW_SAVE_WIN_METRICS: {
RECT r;
GetWindowRect(gw->main, &r);
- option_window_x = r.left;
- option_window_y = r.top;
- option_window_width = r.right - r.left;
- option_window_height = r.bottom - r.top;
- options_write(options_file_location);
+ nsoption_set_int(window_x, r.left);
+ nsoption_set_int(window_y, r.top);
+ nsoption_set_int(window_width, r.right - r.left);
+ nsoption_set_int(window_height, r.bottom - r.top);
+ nsoption_write(options_file_location);
break;
}
@@ -1140,16 +1140,16 @@ static HWND nsws_window_create(struct gui_window *gw)
nscss_screen_dpi = get_window_dpi(hwnd);
- if ((option_window_width >= 100) &&
- (option_window_height >= 100) &&
- (option_window_x >= 0) &&
- (option_window_y >= 0)) {
+ if ((nsoption_int(window_width) >= 100) &&
+ (nsoption_int(window_height) >= 100) &&
+ (nsoption_int(window_x) >= 0) &&
+ (nsoption_int(window_y) >= 0)) {
LOG(("Setting Window position %d,%d %d,%d",
- option_window_x, option_window_y,
- option_window_width, option_window_height));
+ nsoption_int(window_x), nsoption_int(window_y),
+ nsoption_int(window_width), nsoption_int(window_height)));
SetWindowPos(hwnd, HWND_TOP,
- option_window_x, option_window_y,
- option_window_width, option_window_height,
+ nsoption_int(window_x), nsoption_int(window_y),
+ nsoption_int(window_width), nsoption_int(window_height),
SWP_SHOWWINDOW);
}