diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-11-07 18:51:08 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2011-11-07 18:51:08 +0000 |
commit | a98fb7c4ddb7e25373148dfdc7d5d1a2c0a296c2 (patch) | |
tree | e3b8807a06dbba2511e72526d7949f72d2c3089d | |
parent | 4ba282c9c9dafa124237aa50312125e5a003c375 (diff) | |
download | netsurf-a98fb7c4ddb7e25373148dfdc7d5d1a2c0a296c2.tar.gz netsurf-a98fb7c4ddb7e25373148dfdc7d5d1a2c0a296c2.tar.bz2 |
Reimplement the previous hotlist menu refresh code, as the bug causing the previous
problems was fixed ages ago. Make the timing configurable for now but default to off.
svn path=/trunk/netsurf/; revision=13135
-rwxr-xr-x | amiga/menu.c | 14 | ||||
-rw-r--r-- | amiga/options.h | 5 |
2 files changed, 9 insertions, 10 deletions
diff --git a/amiga/menu.c b/amiga/menu.c index 72c955c41..f55bedd30 100755 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -63,6 +63,7 @@ #include "desktop/selection.h" #include "desktop/textinput.h" #include "utils/messages.h" +#include "utils/schedule.h" #define IMAGE_MENU_ITEM(n, i, t) \ gwin->menulab[n] = LabelObject, \ @@ -254,7 +255,7 @@ void ami_init_menulabs(struct gui_window_2 *gwin) gwin->menutype[AMI_MENU_AREXX_MAX] = NM_END; } -/* Menu refresh for hotlist - disabled, see below. +/* Menu refresh for hotlist */ void ami_menu_refresh(struct gui_window_2 *gwin) { SetAttrs(gwin->objects[OID_MAIN], @@ -267,10 +268,7 @@ void ami_menu_refresh(struct gui_window_2 *gwin) SetAttrs(gwin->objects[OID_MAIN], WINDOW_NewMenu, gwin->menu, TAG_DONE); - - schedule(6000,(void *)ami_menu_refresh,gwin); } -*/ struct NewMenu *ami_create_menu(struct gui_window_2 *gwin) { @@ -299,11 +297,9 @@ struct NewMenu *ami_create_menu(struct gui_window_2 *gwin) ami_menu_scan(ami_tree_get_tree(hotlist_window), false, gwin); ami_menu_arexx_scan(gwin); -/* Set up scheduler to refresh the hotlist menu - Disabled as it causes everything to slow down to a halt after - several iterations - schedule(6000,(void *)ami_menu_refresh,gwin); -*/ +/* Set up scheduler to refresh the hotlist menu */ + if(option_menu_refresh > 0) + schedule(option_menu_refresh, (void *)ami_menu_refresh, gwin); return(gwin->menu); } diff --git a/amiga/options.h b/amiga/options.h index 74fe5a265..7a93774df 100644 --- a/amiga/options.h +++ b/amiga/options.h @@ -67,6 +67,7 @@ extern int option_amiga_ydpi; extern int option_monitor_aspect_x; extern int option_monitor_aspect_y; extern bool option_accept_lang_locale; +extern int option_menu_refresh; #define EXTRA_OPTION_DEFINE \ char *option_url_file = 0; \ @@ -116,6 +117,7 @@ int option_amiga_ydpi = 72; \ int option_monitor_aspect_x = 4; \ int option_monitor_aspect_y = 3; \ bool option_accept_lang_locale = true; \ +int option_menu_refresh = 0; \ #define EXTRA_OPTION_TABLE \ { "url_file", OPTION_STRING, &option_url_file }, \ @@ -164,5 +166,6 @@ bool option_accept_lang_locale = true; \ { "amiga_ydpi", OPTION_INTEGER, &option_amiga_ydpi}, \ { "monitor_aspect_x", OPTION_INTEGER, &option_monitor_aspect_x}, \ { "monitor_aspect_y", OPTION_INTEGER, &option_monitor_aspect_y}, \ -{ "accept_lang_locale", OPTION_BOOL, &option_accept_lang_locale}, +{ "accept_lang_locale", OPTION_BOOL, &option_accept_lang_locale}, \ +{ "menu_refresh", OPTION_INTEGER, &option_menu_refresh}, #endif |