X-Git-Url: http://git.draconx.ca/gitweb/rrace.git/blobdiff_plain/7aac229d09956b35cf96a3d76900c1adb7b1f42e..b579e346cef958bd5ef42a3c22b15232542db5f9:/src/motif_ui.c diff --git a/src/motif_ui.c b/src/motif_ui.c index c650031..e1b523a 100644 --- a/src/motif_ui.c +++ b/src/motif_ui.c @@ -1,6 +1,6 @@ /* * X11 GUI for slide puzzle game - * Copyright © 2022 Nick Bowler + * Copyright © 2022-2023 Nick Bowler * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +26,8 @@ #include "xcounter.h" #include "version.h" +#define tree_strtab strtab + /* XXX generate this list? */ enum { widgetMainWindow, @@ -267,13 +269,13 @@ void ui_initialize(struct app_state *state, Widget shell) construct_widgets(mainwin, shell, 0); - menubar = XtNameToWidget(shell, "*menuBar"); + menubar = XtNameToWidget(shell, &strtab[glob_menuBar]); construct_menu(mainmenu, menubar, 0); - help = XtNameToWidget(menubar, "helpMenu"); + help = XtNameToWidget(menubar, tree_strtab+helpMenu); XtVaSetValues(menubar, XmNmenuHelpWidget, help, (char *)NULL); - configure_mainwin(state, XtNameToWidget(shell, "*game")); + configure_mainwin(state, XtNameToWidget(shell, &strtab[glob_game])); XtAddCallback(state->game, XmNresizeCallback, resize, state); XtAddCallback(state->game, XmNexposeCallback, expose, state); @@ -304,7 +306,7 @@ void ui_show_about(struct app_state *state, Widget shell) construct_widgets(dialog, shell, 0); - w = XtNameToWidget(shell, "*aboutDialog"); + w = XtNameToWidget(shell, &strtab[glob_aboutDialog]); XtUnmanageChild(XmMessageBoxGetChild(w, XmDIALOG_CANCEL_BUTTON)); XtAddCallback(w, XmNunmapCallback, dialog_close, NULL); @@ -322,7 +324,7 @@ void ui_show_about(struct app_state *state, Widget shell) (char *)NULL); free(msg); - l = XtNameToWidget(w, "*licenseBlurb"); + l = XtNameToWidget(w, &strtab[glob_licenseBlurb]); XmTextSetString(l, "This program is free software: you can redistribute it and/or modify\n" "it under the terms of the GNU General Public License as published by\n"