/*
* 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
#include "xcounter.h"
#include "version.h"
+#define tree_strtab strtab
+
/* XXX generate this list? */
enum {
widgetMainWindow,
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);
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);
(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"