diff --git a/src/filesave.c b/src/filesave.c index 084cfe6..a408a3f 100644 --- a/src/filesave.c +++ b/src/filesave.c @@ -24,7 +24,7 @@ void saveFile(Widget parent) XmString theXmString; Arg args[1]; - theXmString = XM_STRING_CREATE("Save As"); + theXmString = XmStringCreateLocalized("Save As"); XtSetArg(args[0], XmNdialogTitle, theXmString); selDialog = XmCreateFileSelectionDialog(parent, "select", args, 1); XtAddCallback(selDialog, XmNokCallback, saveFileCbk, NULL); diff --git a/src/help.c b/src/help.c index da2c010..ee5c1b0 100644 --- a/src/help.c +++ b/src/help.c @@ -38,7 +38,7 @@ void createAboutBox(Widget parent) CLIENT_VERSION, sysState.systemInfo); theXmString = XM_STRING_GEN_COMP(theString); - theXmString2 = XM_STRING_CREATE("About"); + theXmString2 = XmStringCreateLocalized("About"); XtSetArg(args[0], XmNdialogTitle, theXmString2); XtSetArg(args[1], XmNmessageString, theXmString); aboutDlgBox = XmCreateInformationDialog(parent, "about", args, 2); @@ -67,7 +67,7 @@ void createCommandsHelpBox(Widget parent) Widget form; argcount = 0; - theXmString = XM_STRING_CREATE("Help"); + theXmString = XmStringCreateLocalized("Help"); XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++; XtSetArg(args[argcount], XmNautoUnmanage, True); argcount++; commandsHelpDlgBox = XmCreatePromptDialog(parent, "help", args, argcount); diff --git a/src/main.c b/src/main.c index d123540..484ab61 100644 --- a/src/main.c +++ b/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); menuBar = XmVaCreateSimpleMenuBar(mainWindow, "menubar", - XmVaCASCADEBUTTON, XM_STRING_CREATE("File"), 'F', - XmVaCASCADEBUTTON, XM_STRING_CREATE("User"), 'U', + XmVaCASCADEBUTTON, XmStringCreateLocalized("File"), 'F', + XmVaCASCADEBUTTON, XmStringCreateLocalized("User"), 'U', NULL); XmVaCreateSimplePulldownMenu(menuBar, "file_menu", 0, fileMenuCall, - XmVaPUSHBUTTON, XM_STRING_CREATE("Preferences..."), 'P', NULL, NULL, - XmVaPUSHBUTTON, XM_STRING_CREATE("Save Conversation"), 'S', NULL, NULL, - XmVaPUSHBUTTON, XM_STRING_CREATE("Quit"), 'Q', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Preferences..."), 'P', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Save Conversation"), 'S', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Quit"), 'Q', NULL, NULL, NULL); XmVaCreateSimplePulldownMenu(menuBar, "user_menu", 1, userMenuCall, - XmVaPUSHBUTTON, XM_STRING_CREATE("Whois"), 'W', NULL, NULL, - XmVaPUSHBUTTON, XM_STRING_CREATE("Client version"), '\0', NULL, NULL, - XmVaPUSHBUTTON, XM_STRING_CREATE("Op"), 'O', NULL, NULL, - XmVaPUSHBUTTON, XM_STRING_CREATE("Deop"), 'D', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Whois"), 'W', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Client version"), '\0', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Op"), 'O', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Deop"), 'D', NULL, NULL, NULL); helpMenu = XtVaCreateManagedWidget("Help", @@ -93,8 +93,8 @@ int main (int argc, char *argv[]) NULL); XmVaCreateSimplePulldownMenu(menuBar, "Help", 2, helpMenuCall, - XmVaPUSHBUTTON, XM_STRING_CREATE("About..."), 'A', NULL, NULL, - XmVaPUSHBUTTON, XM_STRING_CREATE("Commands"), 'C', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("About..."), 'A', NULL, NULL, + XmVaPUSHBUTTON, XmStringCreateLocalized("Commands"), 'C', NULL, NULL, NULL); XtVaSetValues(menuBar, XmNmenuHelpWidget, helpMenu, NULL); diff --git a/src/main.h b/src/main.h index 07b5c76..6da5a52 100644 --- a/src/main.h +++ b/src/main.h @@ -56,14 +56,6 @@ void rmvFdToSelectMask(int fd); void quitApplication(); 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 */ #ifdef HAVE_XMSTRINGGENERATE diff --git a/src/preferences.c b/src/preferences.c index eb9f6cb..23cd9ab 100644 --- a/src/preferences.c +++ b/src/preferences.c @@ -87,7 +87,7 @@ void helpButtStartupCbk() Widget startupPrefsHelpDlgBox; argcount = 0; - theXmString = XM_STRING_CREATE("Help"); + theXmString = XmStringCreateLocalized("Help"); 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."); XtSetArg(args[argcount], XmNmessageString, theXmString2); argcount++; @@ -123,7 +123,7 @@ void setPreferences(Widget mainWin) char myName[MAX_NAME_LEN]; argcount = 0; - labelString = XM_STRING_CREATE("Startup Prefs"); + labelString = XmStringCreateLocalized("Startup Prefs"); XtSetArg(args[argcount], XmNdialogTitle, labelString); argcount++; XtSetArg(args[argcount], XmNautoUnmanage, True); argcount++; startPrefDiag = XmCreatePromptDialog(mainWin, "startup_prefs", args, argcount); @@ -138,7 +138,7 @@ void setPreferences(Widget mainWin) prefForm = XtVaCreateWidget("form", xmFormWidgetClass, startPrefDiag, XmNfractionBase, 18, NULL); - labelString = XM_STRING_CREATE("Name:"); + labelString = XmStringCreateLocalized("Name:"); XtVaCreateManagedWidget("name_label", xmLabelWidgetClass, prefForm, XmNlabelString, labelString, @@ -147,7 +147,7 @@ void setPreferences(Widget mainWin) NULL); XmStringFree(labelString); - labelString = XM_STRING_CREATE("Nick:"); + labelString = XmStringCreateLocalized("Nick:"); XtVaCreateManagedWidget("nick_label", xmLabelWidgetClass, prefForm, XmNlabelString, labelString, @@ -156,7 +156,7 @@ void setPreferences(Widget mainWin) NULL); XmStringFree(labelString); - labelString = XM_STRING_CREATE("Server:"); + labelString = XmStringCreateLocalized("Server:"); XtVaCreateManagedWidget("server_label", xmLabelWidgetClass, prefForm, XmNlabelString, labelString, @@ -190,7 +190,7 @@ void setPreferences(Widget mainWin) XmNrightAttachment, XmATTACH_POSITION, XmNrightPosition, 18, NULL); - labelString = XM_STRING_CREATE("Port: "); + labelString = XmStringCreateLocalized("Port: "); portLabel = XtVaCreateManagedWidget("port_label", xmLabelWidgetClass, prefForm, XmNlabelString, labelString, @@ -324,7 +324,7 @@ void helpButtPrefCbk() Widget startupPrefsHelpDlgBox; argcount = 0; - theXmString = XM_STRING_CREATE("Help"); + theXmString = XmStringCreateLocalized("Help"); XtSetArg(args[argcount], XmNdialogTitle, theXmString); argcount++; theXmString2 = XM_STRING_GEN_COMP("This panel sets the startup preferences.\n\ Ok will save them to the user\'s defaults.\n\n\ diff --git a/src/userlist.c b/src/userlist.c index 1388c67..d366072 100644 --- a/src/userlist.c +++ b/src/userlist.c @@ -13,7 +13,7 @@ void addUserToList(char *nick, Widget listWidget) { XmString tempXmString; - tempXmString = XM_STRING_CREATE(nick); + tempXmString = XmStringCreateLocalized(nick); if (XmListItemExists(listWidget, tempXmString) == False) XmListAddItem(listWidget, tempXmString, 0); XmStringFree(tempXmString); @@ -23,7 +23,7 @@ void removeUserFromList(char *nick, Widget listWidget) { XmString tempXmString; - tempXmString = XM_STRING_CREATE(nick); + tempXmString = XmStringCreateLocalized(nick); XmListDeleteItem(listWidget, tempXmString); XmStringFree(tempXmString); } @@ -32,7 +32,7 @@ void renameUserInList(char *oldNick, char *newNick, Widget listWidget) { XmString tempXmString; - tempXmString = XM_STRING_CREATE(oldNick); + tempXmString = XmStringCreateLocalized(oldNick); if (XmListItemPos(listWidget, tempXmString)) { removeUserFromList(oldNick, listWidget);