diff options
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/gui.c | 3 | ||||
-rwxr-xr-x | amiga/gui_options.c | 4 | ||||
-rwxr-xr-x | amiga/help.c | 4 | ||||
-rwxr-xr-x | amiga/help.h | 3 |
4 files changed, 7 insertions, 7 deletions
diff --git a/amiga/gui.c b/amiga/gui.c index 9483fd4e3..7b5d30e78 100644 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -442,7 +442,6 @@ void ami_open_resources(void) TAG_DONE))) die(messages_get("NoMemory")); ami_file_req_init(); - ami_help_init(NULL); } static UWORD ami_system_colour_scrollbar_fgpen(struct DrawInfo *drinfo) @@ -2181,7 +2180,7 @@ void ami_handle_msg(void) break; case RAWKEY_HELP: // help - ami_help_open(AMI_HELP_GUI); + ami_help_open(AMI_HELP_GUI, scrn); break; } } diff --git a/amiga/gui_options.c b/amiga/gui_options.c index a5568dac6..d3f713060 100755 --- a/amiga/gui_options.c +++ b/amiga/gui_options.c @@ -1930,10 +1930,10 @@ BOOL ami_gui_opts_event(void) case WMHI_GADGETHELP: if((result & WMHI_GADGETMASK) == 0) { /* Pointer not over our window */ - ami_help_open(AMI_HELP_MAIN); + ami_help_open(AMI_HELP_MAIN, scrn); } else { /* TODO: Make this sensitive to the tab the user is currently on */ - ami_help_open(AMI_HELP_PREFS); + ami_help_open(AMI_HELP_PREFS, scrn); } break; diff --git a/amiga/help.c b/amiga/help.c index 214e59d96..24eaa7dc6 100755 --- a/amiga/help.c +++ b/amiga/help.c @@ -45,8 +45,9 @@ void ami_help_init(struct Screen *screen) TAG_DONE);
}
-void ami_help_open(ULONG node)
+void ami_help_open(ULONG node, struct Screen *screen)
{
+ if(AmigaGuideObject == NULL) ami_help_init(screen);
SetAttrs(AmigaGuideObject, AMIGAGUIDE_ContextID, node, TAG_DONE);
IDoMethod(AmigaGuideObject, AGM_OPEN, NULL);
}
@@ -62,5 +63,6 @@ void ami_help_free(void) void ami_help_new_screen(struct Screen *screen)
{
+ if(AmigaGuideObject == NULL) return;
SetAttrs(AmigaGuideObject, AMIGAGUIDE_Screen, screen, TAG_DONE);
}
diff --git a/amiga/help.h b/amiga/help.h index 4baa2a0e2..ce3a462c6 100755 --- a/amiga/help.h +++ b/amiga/help.h @@ -29,8 +29,7 @@ enum { struct Screen; -void ami_help_init(struct Screen *screen); -void ami_help_open(ULONG node); +void ami_help_open(ULONG node, struct Screen *screen); void ami_help_free(void); void ami_help_new_screen(struct Screen *screen); #endif |