* details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with these librararies and programs; if not, write
+ * License along with these libraries and programs; if not, write
* to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301 USA
*/
-/* $TOG: WmHelp.c /main/8 1997/06/18 17:30:51 samborn $ */
-#ifdef WSM
/*
* (c) Copyright 1987, 1988, 1989, 1990, 1992, 1993 HEWLETT-PACKARD COMPANY
* (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC.
* ALL RIGHTS RESERVED
-*/
-#ifdef REV_INFO
-#ifndef lint
-static char rcsid[] = ""
-#endif
-#endif
+*/
/*
* Included Files:
#include "WmHelp.h"
#include "WmCDecor.h"
#include "WmResParse.h"
-#ifdef PANELIST
#include "WmPanelP.h"
-#endif /* PANELIST */
#include "WmResNames.h"
#include "WmWrkspace.h"
#include "DataBaseLoad.h"
pTemp = pSD->cachedHelp;
/* Search our Cache List for the closed help dialog */
- while ((pTemp->helpDialog != helpDialog) && (pTemp != NULL))
+ while (pTemp && (pTemp->helpDialog != helpDialog))
{
pTemp = pTemp->pNext;
}
do
{
ptr = DtStrchr (pTemp->workspaces, '*');
- if (ptr != NULL) *ptr = NULL;
+ if (ptr != NULL) *ptr = '\0';
atom_names =
(char **) XtRealloc ((char *)atom_names,
Widget helpButton = NULL;
Widget backButton = NULL;
Widget closeButton = NULL;
+#ifdef NO_MESSAGE_CATALOG
XmString label = NULL;
+#endif
if((versionWidget != NULL) &&
(XtIsManaged(versionWidget)))
#endif
XtSetValues(closeButton, setArgs2, n2);
+#ifdef NO_MESSAGE_CATALOG
if(label)XmStringFree(label);
+#endif
printButton = DtHelpQuickDialogGetChild( versionWidget,
DtHELP_QUICK_PRINT_BUTTON );
WmPanelistObject pPanelist;
char *theHelpVolume = WM_DT_HELP_VOLUME;
char *theHelpTopic = WM_DT_HELP_TOPIC;
- char volume[MAXWMPATH + 1];
- char topic[MAXWMPATH + 1];
+ unsigned char volume[MAXWMPATH + 1];
+ unsigned char topic[MAXWMPATH + 1];
int argCount = 0;
pPanelist = (WmPanelistObject) pSD->wPanelist;
- if (theWidget = O_Panel(pPanelist))
+ if ((theWidget = O_Panel(pPanelist)))
{
if (args )
{
/*
* parse args for volume and topic
*/
- WmDtGetHelpArgs((unsigned char*)args, &volume, &topic, &argCount);
+ WmDtGetHelpArgs(args, volume, topic, &argCount);
if (argCount == 1)
{
WmDtDisplayTopic(pSD->screenTopLevelW1,
theHelpVolume,
- topic,
+ (char *)topic,
DtHELP_TYPE_TOPIC, theWidget, True,
NULL, 0, NULL, False, NULL);
}
else
{
WmDtDisplayTopic(pSD->screenTopLevelW1,
- volume,
- topic,
+ (char *)volume,
+ (char *)topic,
DtHELP_TYPE_TOPIC, theWidget, False,
NULL, 0, NULL, False, NULL);
}
int iStatus;
String sTmp, sMessage, sTitle;
- iStatus = WmDtReturnSelectedWidget(wmGD.topLevelW, NULL,
+ iStatus = WmDtReturnSelectedWidget(wmGD.topLevelW, None,
&selectedWidget);
switch (iStatus)
int wsCnt;
int cCount;
int cachedCount=0;
- char dialogName[10];
+ char dialogName[18];
ClientData *pCD = NULL;
char *tTitle = NULL;
}
xrm_name [0] = XrmStringToQuark ("wsHelp");
xrm_name [1] = XrmStringToQuark ("onScreen");
- xrm_name [2] = NULL;
+ xrm_name [2] = NULLQUARK;
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
xrm_name [0] = XrmStringToQuark ("cachedHelp");
xrm_name [1] = XrmStringToQuark ("cachedCount");
- xrm_name [2] = NULL;
+ xrm_name [2] = NULLQUARK;
if (XrmQGetResource (db, xrm_name, xrm_name, &rep_type, &value))
{
sprintf (dialogName, "oWsHelp%d", cCount);
xrm_name [0] = XrmStringToQuark (dialogName);
- xrm_name [1] = NULL;
- xrm_name [2] = NULL;
+ xrm_name [1] = NULLQUARK;
+ xrm_name [2] = NULLQUARK;
displayTopicInfo.xPos = 0;
displayTopicInfo.xPos = 0;
XrmDestroyDatabase(db);
}
#endif /* NO_DT */
+
+ return True;
} /* END OF FUNCTION RestoreHelpDialogs */
/*************************************<->*************************************
res_class = DT_WM_RESOURCE_CLASS;
}
- sprintf (screenName, "%d\0", pSD->screen);
+ sprintf (screenName, "%d", pSD->screen);
sprintf (buffer, "%s*%s*%s: \\n ", res_class, screenName,
WmNhelpResources);
if (pCDforHelp)
{
thisCnt = 0;
- sprintf(workspaces,"");
+ sprintf(workspaces, "%s", "");
for (wsCnt = 0; wsCnt < pSD->numWorkspaces;
wsCnt++)
{
int n;
XFontStruct *font;
Dimension height;
- Window wGroup;
+ Window wGroup = None;
int x, y;
ClientData *pCDforHelp;
}
else
{
- if (wGroup != 0)
+ if (wGroup != None)
{
HideHelpDialog (pSD, True);
}
unsigned int mask;
Dimension dWidth, dHeight;
Position x, y;
-#ifdef PANELIST
WmPanelistObject pPanelist;
-#endif /* PANELIST */
xmsMessage =
XmStringCreateLocalized (sMessage);
if (pSD->dtHelp.errorDialog == NULL)
{
+#ifdef NO_MESSAGE_CATALOG
XmString tmpXmString = (XmString)NULL;
+#endif
ac = 0;
XtSetArg (al[ac], XmNmessageString, xmsMessage); ac++;
pSD->dtHelp.errorDialog =
XmCreateErrorDialog (wParent, "Error Dialog", al, ac);
+#ifdef NO_MESSAGE_CATALOG
if (tmpXmString)
XmStringFree(tmpXmString);
+#endif
wTemp = XmMessageBoxGetChild (pSD->dtHelp.errorDialog,
XmDIALOG_HELP_BUTTON);
} /* END OF FUNCTION wmDtErrorDialogPopupCB */
/**************************** eof ***************************/
-#endif /* WSM */