diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-10-06 17:47:31 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2008-10-06 17:47:31 +0000 |
commit | 2808d77089a34eb3bdf98b6a7a71ebc7df9c5fac (patch) | |
tree | 96f4426249c44a227c843f6e5b4fb12801cd25e2 /amiga/gui.c | |
parent | be787cabb17dc2e28b4f93e3a35ae5d9bff5b879 (diff) | |
download | netsurf-2808d77089a34eb3bdf98b6a7a71ebc7df9c5fac.tar.gz netsurf-2808d77089a34eb3bdf98b6a7a71ebc7df9c5fac.tar.bz2 |
Full quit function and associated ARexx command (QUIT)
svn path=/trunk/netsurf/; revision=5498
Diffstat (limited to 'amiga/gui.c')
-rwxr-xr-x | amiga/gui.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 032a66798..76d1c2d9e 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -937,6 +937,40 @@ void ami_switch_tab(struct gui_window_2 *gwin,bool redraw) } } +void ami_quit_netsurf(void) +{ + struct nsObject *node; + struct nsObject *nnode; + struct gui_window_2 *gwin; + + node = (struct nsObject *)GetHead((struct List *)window_list); + + do + { + nnode=(struct nsObject *)GetSucc((struct Node *)node); + gwin = node->objstruct; + + switch(node->Type) + { + case AMINS_TVWINDOW: + ami_tree_close((struct treeview_window *)gwin); + break; + + case AMINS_WINDOW: + ami_close_all_tabs(gwin); + break; + } + + node = nnode; + } while(node = nnode); + + if(IsMinListEmpty(window_list)) + { + /* last window closed, so exit */ + netsurf_quit = true; + } +} + void gui_quit(void) { int i; @@ -1795,6 +1829,9 @@ void gui_window_set_scroll(struct gui_window *g, int sx, int sy) ULONG cur_tab = 0; if(!g) return; + if(sx<0) sx=0; + if(sy<0) sy=0; + /* if(g->tab_node) GetAttr(CLICKTAB_Current,g->shared->gadgets[GID_TABS],(ULONG *)&cur_tab); |