Remove XM_STRING_CREATE. Replace it with XmStringCreateLocalized.
This commit is contained in:
parent
0e9ed3e250
commit
48e0af8465
@ -24,7 +24,7 @@ void saveFile(Widget parent)
|
|||||||
XmString theXmString;
|
XmString theXmString;
|
||||||
Arg args[1];
|
Arg args[1];
|
||||||
|
|
||||||
theXmString = XM_STRING_CREATE("Save As");
|
theXmString = XmStringCreateLocalized("Save As");
|
||||||
XtSetArg(args[0], XmNdialogTitle, theXmString);
|
XtSetArg(args[0], XmNdialogTitle, theXmString);
|
||||||
selDialog = XmCreateFileSelectionDialog(parent, "select", args, 1);
|
selDialog = XmCreateFileSelectionDialog(parent, "select", args, 1);
|
||||||
XtAddCallback(selDialog, XmNokCallback, saveFileCbk, NULL);
|
XtAddCallback(selDialog, XmNokCallback, saveFileCbk, NULL);
|
||||||
|
@ -38,7 +38,7 @@ void createAboutBox(Widget parent)
|
|||||||
CLIENT_VERSION, sysState.systemInfo);
|
CLIENT_VERSION, sysState.systemInfo);
|
||||||
theXmString = XM_STRING_GEN_COMP(theString);
|
theXmString = XM_STRING_GEN_COMP(theString);
|
||||||
|
|
||||||
theXmString2 = XM_STRING_CREATE("About");
|
theXmString2 = XmStringCreateLocalized("About");
|
||||||
XtSetArg(args[0], XmNdialogTitle, theXmString2);
|
XtSetArg(args[0], XmNdialogTitle, theXmString2);
|
||||||
XtSetArg(args[1], XmNmessageString, theXmString);
|
XtSetArg(args[1], XmNmessageString, theXmString);
|
||||||
aboutDlgBox = XmCreateInformationDialog(parent, "about", args, 2);
|
aboutDlgBox = XmCreateInformationDialog(parent, "about", args, 2);
|
||||||
@ -67,7 +67,7 @@ void createCommandsHelpBox(Widget parent)
|
|||||||
Widget form;
|
Widget form;
|
||||||
|
|
||||||
argcount = 0;
|
argcount = 0;
|
||||||
theXmString = XM_STRING_CREATE("Help");
|
theXmString = XmStringCreateLocalized("Help");
|
||||||
XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++;
|
XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++;
|
||||||
XtSetArg(args[argcount], XmNautoUnmanage, True); argcount++;
|
XtSetArg(args[argcount], XmNautoUnmanage, True); argcount++;
|
||||||
commandsHelpDlgBox = XmCreatePromptDialog(parent, "help", args, argcount);
|
commandsHelpDlgBox = XmCreatePromptDialog(parent, "help", args, argcount);
|
||||||
|
22
src/main.c
22
src/main.c
@ -68,23 +68,23 @@ int main (int argc, char *argv[])
|
|||||||
mainWindow = XtVaCreateManagedWidget("main_window", xmMainWindowWidgetClass, topWidget, XmNcommandWindowLocation, XmCOMMAND_BELOW_WORKSPACE, XmNwidth, 600, XmNheight, 500, NULL);
|
mainWindow = XtVaCreateManagedWidget("main_window", xmMainWindowWidgetClass, topWidget, XmNcommandWindowLocation, XmCOMMAND_BELOW_WORKSPACE, XmNwidth, 600, XmNheight, 500, NULL);
|
||||||
|
|
||||||
menuBar = XmVaCreateSimpleMenuBar(mainWindow, "menubar",
|
menuBar = XmVaCreateSimpleMenuBar(mainWindow, "menubar",
|
||||||
XmVaCASCADEBUTTON, XM_STRING_CREATE("File"), 'F',
|
XmVaCASCADEBUTTON, XmStringCreateLocalized("File"), 'F',
|
||||||
XmVaCASCADEBUTTON, XM_STRING_CREATE("User"), 'U',
|
XmVaCASCADEBUTTON, XmStringCreateLocalized("User"), 'U',
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
XmVaCreateSimplePulldownMenu(menuBar, "file_menu", 0,
|
XmVaCreateSimplePulldownMenu(menuBar, "file_menu", 0,
|
||||||
fileMenuCall,
|
fileMenuCall,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Preferences..."), 'P', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Preferences..."), 'P', NULL, NULL,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Save Conversation"), 'S', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Save Conversation"), 'S', NULL, NULL,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Quit"), 'Q', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Quit"), 'Q', NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
XmVaCreateSimplePulldownMenu(menuBar, "user_menu", 1,
|
XmVaCreateSimplePulldownMenu(menuBar, "user_menu", 1,
|
||||||
userMenuCall,
|
userMenuCall,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Whois"), 'W', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Whois"), 'W', NULL, NULL,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Client version"), '\0', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Client version"), '\0', NULL, NULL,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Op"), 'O', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Op"), 'O', NULL, NULL,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Deop"), 'D', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Deop"), 'D', NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
helpMenu = XtVaCreateManagedWidget("Help",
|
helpMenu = XtVaCreateManagedWidget("Help",
|
||||||
@ -93,8 +93,8 @@ int main (int argc, char *argv[])
|
|||||||
NULL);
|
NULL);
|
||||||
XmVaCreateSimplePulldownMenu(menuBar, "Help", 2,
|
XmVaCreateSimplePulldownMenu(menuBar, "Help", 2,
|
||||||
helpMenuCall,
|
helpMenuCall,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("About..."), 'A', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("About..."), 'A', NULL, NULL,
|
||||||
XmVaPUSHBUTTON, XM_STRING_CREATE("Commands"), 'C', NULL, NULL,
|
XmVaPUSHBUTTON, XmStringCreateLocalized("Commands"), 'C', NULL, NULL,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
XtVaSetValues(menuBar, XmNmenuHelpWidget, helpMenu, NULL);
|
XtVaSetValues(menuBar, XmNmenuHelpWidget, helpMenu, NULL);
|
||||||
|
@ -56,14 +56,6 @@ void rmvFdToSelectMask(int fd);
|
|||||||
void quitApplication();
|
void quitApplication();
|
||||||
void appendText(char *msg);
|
void appendText(char *msg);
|
||||||
|
|
||||||
#ifdef HAVE_XMSTRINGCREATELOCALIZED
|
|
||||||
#define XM_STRING_CREATE(str)\
|
|
||||||
XmStringCreateLocalized(str)
|
|
||||||
#else
|
|
||||||
#define XM_STRING_CREATE(str)\
|
|
||||||
XmStringCreateSimple(str)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* remember to check for XmFONTLIST_DEFAULT_TAG when used */
|
/* remember to check for XmFONTLIST_DEFAULT_TAG when used */
|
||||||
|
|
||||||
#ifdef HAVE_XMSTRINGGENERATE
|
#ifdef HAVE_XMSTRINGGENERATE
|
||||||
|
@ -87,7 +87,7 @@ void helpButtStartupCbk()
|
|||||||
Widget startupPrefsHelpDlgBox;
|
Widget startupPrefsHelpDlgBox;
|
||||||
|
|
||||||
argcount = 0;
|
argcount = 0;
|
||||||
theXmString = XM_STRING_CREATE("Help");
|
theXmString = XmStringCreateLocalized("Help");
|
||||||
XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++;
|
XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++;
|
||||||
theXmString2 = XM_STRING_GEN_COMP("Set nickname and name you want to use.\n\nEnter the server you want to connect to.");
|
theXmString2 = XM_STRING_GEN_COMP("Set nickname and name you want to use.\n\nEnter the server you want to connect to.");
|
||||||
XtSetArg(args[argcount], XmNmessageString, theXmString2); argcount++;
|
XtSetArg(args[argcount], XmNmessageString, theXmString2); argcount++;
|
||||||
@ -123,7 +123,7 @@ void setPreferences(Widget mainWin)
|
|||||||
char myName[MAX_NAME_LEN];
|
char myName[MAX_NAME_LEN];
|
||||||
|
|
||||||
argcount = 0;
|
argcount = 0;
|
||||||
labelString = XM_STRING_CREATE("Startup Prefs");
|
labelString = XmStringCreateLocalized("Startup Prefs");
|
||||||
XtSetArg(args[argcount], XmNdialogTitle, labelString); argcount++;
|
XtSetArg(args[argcount], XmNdialogTitle, labelString); argcount++;
|
||||||
XtSetArg(args[argcount], XmNautoUnmanage, True); argcount++;
|
XtSetArg(args[argcount], XmNautoUnmanage, True); argcount++;
|
||||||
startPrefDiag = XmCreatePromptDialog(mainWin, "startup_prefs", args, argcount);
|
startPrefDiag = XmCreatePromptDialog(mainWin, "startup_prefs", args, argcount);
|
||||||
@ -138,7 +138,7 @@ void setPreferences(Widget mainWin)
|
|||||||
prefForm = XtVaCreateWidget("form", xmFormWidgetClass, startPrefDiag,
|
prefForm = XtVaCreateWidget("form", xmFormWidgetClass, startPrefDiag,
|
||||||
XmNfractionBase, 18, NULL);
|
XmNfractionBase, 18, NULL);
|
||||||
|
|
||||||
labelString = XM_STRING_CREATE("Name:");
|
labelString = XmStringCreateLocalized("Name:");
|
||||||
XtVaCreateManagedWidget("name_label",
|
XtVaCreateManagedWidget("name_label",
|
||||||
xmLabelWidgetClass, prefForm,
|
xmLabelWidgetClass, prefForm,
|
||||||
XmNlabelString, labelString,
|
XmNlabelString, labelString,
|
||||||
@ -147,7 +147,7 @@ void setPreferences(Widget mainWin)
|
|||||||
NULL);
|
NULL);
|
||||||
XmStringFree(labelString);
|
XmStringFree(labelString);
|
||||||
|
|
||||||
labelString = XM_STRING_CREATE("Nick:");
|
labelString = XmStringCreateLocalized("Nick:");
|
||||||
XtVaCreateManagedWidget("nick_label",
|
XtVaCreateManagedWidget("nick_label",
|
||||||
xmLabelWidgetClass, prefForm,
|
xmLabelWidgetClass, prefForm,
|
||||||
XmNlabelString, labelString,
|
XmNlabelString, labelString,
|
||||||
@ -156,7 +156,7 @@ void setPreferences(Widget mainWin)
|
|||||||
NULL);
|
NULL);
|
||||||
XmStringFree(labelString);
|
XmStringFree(labelString);
|
||||||
|
|
||||||
labelString = XM_STRING_CREATE("Server:");
|
labelString = XmStringCreateLocalized("Server:");
|
||||||
XtVaCreateManagedWidget("server_label",
|
XtVaCreateManagedWidget("server_label",
|
||||||
xmLabelWidgetClass, prefForm,
|
xmLabelWidgetClass, prefForm,
|
||||||
XmNlabelString, labelString,
|
XmNlabelString, labelString,
|
||||||
@ -190,7 +190,7 @@ void setPreferences(Widget mainWin)
|
|||||||
XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, 18,
|
XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, 18,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
labelString = XM_STRING_CREATE("Port: ");
|
labelString = XmStringCreateLocalized("Port: ");
|
||||||
portLabel = XtVaCreateManagedWidget("port_label",
|
portLabel = XtVaCreateManagedWidget("port_label",
|
||||||
xmLabelWidgetClass, prefForm,
|
xmLabelWidgetClass, prefForm,
|
||||||
XmNlabelString, labelString,
|
XmNlabelString, labelString,
|
||||||
@ -324,7 +324,7 @@ void helpButtPrefCbk()
|
|||||||
Widget startupPrefsHelpDlgBox;
|
Widget startupPrefsHelpDlgBox;
|
||||||
|
|
||||||
argcount = 0;
|
argcount = 0;
|
||||||
theXmString = XM_STRING_CREATE("Help");
|
theXmString = XmStringCreateLocalized("Help");
|
||||||
XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++;
|
XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++;
|
||||||
theXmString2 = XM_STRING_GEN_COMP("This panel sets the startup preferences.\n\
|
theXmString2 = XM_STRING_GEN_COMP("This panel sets the startup preferences.\n\
|
||||||
Ok will save them to the user\'s defaults.\n\n\
|
Ok will save them to the user\'s defaults.\n\n\
|
||||||
|
@ -13,7 +13,7 @@ void addUserToList(char *nick, Widget listWidget)
|
|||||||
{
|
{
|
||||||
XmString tempXmString;
|
XmString tempXmString;
|
||||||
|
|
||||||
tempXmString = XM_STRING_CREATE(nick);
|
tempXmString = XmStringCreateLocalized(nick);
|
||||||
if (XmListItemExists(listWidget, tempXmString) == False)
|
if (XmListItemExists(listWidget, tempXmString) == False)
|
||||||
XmListAddItem(listWidget, tempXmString, 0);
|
XmListAddItem(listWidget, tempXmString, 0);
|
||||||
XmStringFree(tempXmString);
|
XmStringFree(tempXmString);
|
||||||
@ -23,7 +23,7 @@ void removeUserFromList(char *nick, Widget listWidget)
|
|||||||
{
|
{
|
||||||
XmString tempXmString;
|
XmString tempXmString;
|
||||||
|
|
||||||
tempXmString = XM_STRING_CREATE(nick);
|
tempXmString = XmStringCreateLocalized(nick);
|
||||||
XmListDeleteItem(listWidget, tempXmString);
|
XmListDeleteItem(listWidget, tempXmString);
|
||||||
XmStringFree(tempXmString);
|
XmStringFree(tempXmString);
|
||||||
}
|
}
|
||||||
@ -32,7 +32,7 @@ void renameUserInList(char *oldNick, char *newNick, Widget listWidget)
|
|||||||
{
|
{
|
||||||
XmString tempXmString;
|
XmString tempXmString;
|
||||||
|
|
||||||
tempXmString = XM_STRING_CREATE(oldNick);
|
tempXmString = XmStringCreateLocalized(oldNick);
|
||||||
if (XmListItemPos(listWidget, tempXmString))
|
if (XmListItemPos(listWidget, tempXmString))
|
||||||
{
|
{
|
||||||
removeUserFromList(oldNick, listWidget);
|
removeUserFromList(oldNick, listWidget);
|
||||||
|
Loading…
Reference in New Issue
Block a user