/* */
/*****************************************************************************/
#include <stdio.h>
+#include <sys/types.h>
#include <sys/signal.h>
#include <X11/cursorfont.h>
#include "cmncbs.h"
#include "cmnrtns.h"
#include "CreateActionAppShell.h"
+#include "af_aux.h"
#include "ca_aux.h"
#include "icon_selection_dialog.h"
+/* from main.c */
+extern void UxDoEditPixmap(Widget wid, char *fname);
/******************************************************************************/
/* Initialize global values. */
XmFileSelectionBoxCallbackStruct *cbstruct)
{
Widget filter;
- Boolean use_bm = False;
+ XtArgVal /* Boolean */ use_bm = False;
static char *use_bm_filter = "*.m.bm";
static char *use_pm_filter = "*.m.pm";
char *search_path;
if (bIconEditorDisplayed) return;
- if ((int)client_data == CA_ACTION_ICONS) {
+ if ((int)(XtArgVal)client_data == CA_ACTION_ICONS) {
IsActionIcons = True;
widSelectedIcon = get_selected_action_icon();
widEditSource = CreateActionAppShell;
return;
}
+/* We use this so we can reuse an open help dialog window. */
+static Widget mainHelpDialog = NULL;
+
/******************************************************************************/
/* */
/* closeCB_mainHelpDialog */
XtPointer *cbs)
{
XtDestroyWidget(wid);
+ mainHelpDialog = NULL;
}
/******************************************************************************/
/******************************************************************************/
void DisplayHelpDialog(Widget wid, XtPointer client_data, XtPointer cbs)
{
- static Widget mainHelpDialog = NULL;
Widget parent;
int i;
Arg args[10];
sprintf(pszTitle, "%s - %s", GETMESSAGE(3, 10, "Create Action"),
GETMESSAGE(2, 53, "Help"));
*/
- sprintf(pszTitle, "%s - ", GETMESSAGE(3, 10, "Create Action"));
- strcat(pszTitle, GETMESSAGE(2, 53, "Help"));
+ snprintf(pszTitle, sizeof(pszTitle), "%s - %s", GETMESSAGE(3, 10, "Create Action"), GETMESSAGE(2, 53, "Help"));
XtSetArg(args[i], XmNtitle, pszTitle); i++;
/***********************************************************************/
XtSetArg(args[i], DtNhelpVolume, "CreatAct"); i++;
XtSetArg(args[i], DtNlocationId, pszTopic); i++;
- switch ((int)client_data) {
+ switch ((XtArgVal)client_data) {
case HELP_OVERVIEW:
strcpy(pszTopic, "_hometopic");
break;