summaryrefslogtreecommitdiff
path: root/atari/global_evnt.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-07-27 14:08:17 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-07-27 14:08:17 +0100
commit72fe92d9ca0d3ba06c56cc258575e42102d502c6 (patch)
tree21169416bde287d6defc6d644299369a7e521707 /atari/global_evnt.c
parent41f88e693798a186f27a92f9ad087447a62f78d5 (diff)
parent7d011c62ff249161dfb03ee8ecf0716d41d3d353 (diff)
downloadnetsurf-72fe92d9ca0d3ba06c56cc258575e42102d502c6.tar.gz
netsurf-72fe92d9ca0d3ba06c56cc258575e42102d502c6.tar.bz2
Merge branch 'master' of git://git.netsurf-browser.org/netsurf
Diffstat (limited to 'atari/global_evnt.c')
-rwxr-xr-xatari/global_evnt.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/atari/global_evnt.c b/atari/global_evnt.c
index 24e65b511..f002f3f5a 100755
--- a/atari/global_evnt.c
+++ b/atari/global_evnt.c
@@ -52,7 +52,6 @@
#include "atari/settings.h"
#include "cflib.h"
-extern const char * cfg_homepage_url;
extern struct gui_window *input_window;
extern OBJECT * h_gem_menu;
extern int mouse_click_time[3];
@@ -60,7 +59,14 @@ extern int mouse_hold_start[3];
extern browser_mouse_state bmstate;
extern short last_drag_x;
extern short last_drag_y;
-extern bool html_redraw_debug;
+extern bool html_redraw_debug;
+
+extern const char * option_homepage_url;
+extern int option_window_width;
+extern int option_window_height;
+extern int option_window_x;
+extern int option_window_y;
+extern char options[PATH_MAX];
/* Zero based resource tree ids: */
#define T_ABOUT 0
@@ -96,7 +102,7 @@ static void __CDECL menu_about(WINDOW *win, int item, int title, void *data)
static void __CDECL menu_new_win(WINDOW *win, int item, int title, void *data)
{
LOG(("%s", __FUNCTION__));
- browser_window_create(cfg_homepage_url, 0, 0, true, false);
+ browser_window_create(option_homepage_url, 0, 0, true, false);
}
static void __CDECL menu_open_url(WINDOW *win, int item, int title, void *data)
@@ -257,7 +263,21 @@ static void __CDECL menu_toolbars(WINDOW *win, int item, int title, void *data)
static void __CDECL menu_savewin(WINDOW *win, int item, int title, void *data)
{
- LOG(("%s", __FUNCTION__));
+ LOG(("%s", __FUNCTION__));
+ if (input_window && input_window->browser) {
+ GRECT rect;
+ wind_get_grect(input_window->root->handle->handle, WF_CURRXYWH, &rect);
+ option_window_width = rect.g_w;
+ option_window_height = rect.g_h;
+ option_window_x = rect.g_x;
+ option_window_y = rect.g_y;
+ nsoption_set_int(window_width, rect.g_w);
+ nsoption_set_int(window_height, rect.g_h);
+ nsoption_set_int(window_x, rect.g_x);
+ nsoption_set_int(window_y, rect.g_y);
+ nsoption_write((const char*)&options);
+ }
+
}
static void __CDECL menu_debug_render(WINDOW *win, int item, int title, void *data)