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
This commit is contained in:
Chris Young 2011-11-07 18:51:08 +00:00
parent 4ba282c9c9
commit a98fb7c4dd
2 changed files with 9 additions and 10 deletions

View File

@ -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);
}

View File

@ -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