#else
unsigned char extType) ;
#endif /* NeedWidePrototypes */
+/* Extracted from IconFileP.h */
+extern void XmeFlushIconFileCache(String path);
/* Extracted from MenuStateI.h */
extern void _XmSetInDragMode(
Widget widget,
/_XmShellIsExclusive/ { proto(); }
/_XmTextFieldSetDestination/ { proto(); }
/_XmGetActiveTopLevelMenu/ { proto(); }
+/XmeFlushIconFileCache/ { proto(); }
#include "dtcreate.h"
#include "af_aux.h"
#include "CreateActionAppShell.h"
+#include "FileCharacteristics.h"
#include "cmncbs.h"
#define CONTEXT_MACRO_ACCESS 1
int nbutton = 0;
Widget AF_ScrolledWindow;
Widget AF_BigForm;
- Dimension dim1, dim2, dim3;
+ XtArgVal /* Dimension */ dim1, dim2, dim3;
Widget AF_MED_IconForm, AF_TINY_IconForm;
IconData *pIconData;
char *pre, *suf, *title;
{
Widget rtrn;
_UxCAddFiletype *UxContext;
- Dimension dimHeight;
- Dimension dimWidth;
- Dimension dimTmp;
+ XtArgVal /* Dimension */ dimHeight;
+ XtArgVal /* Dimension */ dimWidth;
+ XtArgVal /* Dimension */ dimTmp;
Widget widScrolledWindow;
Widget widTmp;
#include <sys/signal.h>
#include "dtcreate.h"
+#include "ca_aux.h"
#include "UxXt.h"
#include "CreateActionAppShell.h"
#include <X11/Shell.h>
#include <X11/cursorfont.h>
+#include <Dt/Dt.h>
#include <Dt/Icon.h>
#include <Dt/Action.h>
+#include <Dt/HourGlass.h>
+#include <Dt/Wsm.h>
#include "dtcreate.h"
#include "UxXt.h"
+#include "af_aux.h"
#include "ca_aux.h"
#include "cmncbs.h"
#include "cmnrtns.h"
+#include "fileio.h"
#include "Confirmed.h"
+#include "ErrorDialog.h"
#define CONTEXT_MACRO_ACCESS 1
#include "CreateActionAppShell.h"
Includes, Defines, and Global variables from the Declarations Editor:
*******************************************************************************/
-Dimension winheight, xprtheight, newheight, wintypeheight;
+XtArgVal /* Dimension */ winheight, xprtheight, newheight, wintypeheight;
Widget FileTypes;
/*******************************************************************************
XtPointer UxCallbackArg)
{
AD.fsFlags &= (~(CA_WT_XWINDOWS | CA_WT_TERM | CA_WT_PERMTERM));
- switch ((int)UxClientData) {
+ switch ((int)(XtArgVal)UxClientData) {
case CA_WT_XWINDOWS :
AD.fsFlags |= CA_WT_XWINDOWS;
break;
Widget CA_WindowType_Pane;
Widget CA_WindowType_OptionMenu;
char mnemonic[2];
- Dimension dim1, dim2;
+ XtArgVal /* Dimension */ dim1, dim2;
Widget CA_MED_IconForm, CA_TINY_IconForm, CA_LRG_IconForm;
IconData *pIconData;
*******************************************************************************/
-void display_error_message (Widget parent, char *message);
+extern void display_error_message (Widget parent, char *message);
#endif /* _ERRORDIALOG_H_INCLUDED */
#include <stdio.h>
#include <sys/stat.h>
#include <string.h>
+#include <stdlib.h>
#include <Xm/Xm.h>
#include <Xm/MwmUtil.h>
#include <Xm/RowColumn.h>
#include <Xm/Form.h>
#include <Xm/ToggleBG.h>
+#include <Xm/Text.h>
#include <Xm/TextF.h>
#include <Xm/Label.h>
#include <Xm/PushBG.h>
#include "UxXt.h"
#include "dtcreate.h"
#include "cmncbs.h"
+#include "cmnrtns.h"
+#include "cmnutils.h"
+#include "ErrorDialog.h"
#define CONTEXT_MACRO_ACCESS 1
#include "FileCharacteristics.h"
} else if (XmToggleButtonGadgetGetState(FC_LongToggle)) {
return((ushort)CA_FT_CNTLONG);
}
+ /* NOTREACHED */
}
/******************************************************************************/
/*****************************************************************************/
void CalculateAND(void)
{
- Boolean set1, set2, set3, set4;
+ XtArgVal /* Boolean */ set1, set2, set3, set4;
int cnt;
XtVaGetValues(FC_NameOrPathToggle, XmNset, &set1, NULL);
XtPointer UxClientData,
XtPointer UxCallbackArg)
{
- Boolean set;
+ XtArgVal /* Boolean */ set;
XtVaGetValues(UxWidget, XmNset, &set, NULL);
XtSetSensitive(FC_PermissionLabel, set);
XtPointer UxClientData,
XtPointer UxCallbackArg)
{
- Boolean set;
+ XtArgVal /* Boolean */ set;
XtVaGetValues(UxWidget, XmNset, &set, NULL);
XtSetSensitive(FC_ContentsLabel, set);
XtPointer UxCallbackArg)
{
- Boolean set;
+ XtArgVal /* Boolean */ set;
XtVaGetValues(UxWidget, XmNset, &set, NULL);
XtSetSensitive(FC_NamePatternLabel, set);
Widget create_FileCharacteristics( swidget _UxUxParent )
{
Widget rtrn;
- Dimension dimHeight;
- Dimension dimWidth;
- Dimension dimTmp;
+ XtArgVal /* Dimension */ dimHeight;
+ XtArgVal /* Dimension */ dimWidth;
+ XtArgVal /* Dimension */ dimTmp;
Widget widScrolledWindow;
Widget widTmp;
#include "UxXt.h"
#include "dtcreate.h"
#include "cmnrtns.h"
+#include "cmncbs.h"
#include "ca_aux.h"
#include "fileio.h"
UxOpenFileContext = UxContext =
(_UxCOpenFile *) UxGetContext( UxWidget );
{
- DisplayHelpDialog(UxWidget, HELP_OPENFILE, UxCallbackArg);
+ DisplayHelpDialog(UxWidget, (XtPointer)HELP_OPENFILE, UxCallbackArg);
}
UxOpenFileContext = UxSaveCtx;
}
-----------------------------------------------------------------------------*/
static int handle_dialog_child( Widget wgt, void (*manage_func)(Widget) )
{
- int i, num_children;
+ XtArgVal i, num_children;
Widget *children;
int error_flag = UX_ERROR;
(void) XDeleteContext( XtDisplay( UxTopLevel ),
(Window) wgt,
- (XContext) client_data );
+ (XContext)(XtArgVal) client_data );
}
/******************************************************************************
return ( UX_ERROR );
XtAddCallback (wgt, XmNdestroyCallback,
- UxDeleteContextCB, (XtPointer) xcontext_id);
+ UxDeleteContextCB, (XtPointer)(XtArgVal) xcontext_id);
return ( UX_NO_ERROR );
}
/* The following are declarations of the functions in UxXt.c */
+extern void* UxNewContext (size_t size, int isSubclass);
extern int UxPopupInterface( Widget wgt, XtGrabKind grab_flag );
extern int UxPopdownInterface( Widget wgt );
extern int UxDestroyInterface( Widget wgt);
#include <Xm/RowColumnP.h>
#include <Xm/MessageB.h>
#include <Xm/FileSB.h>
+#include <Xm/List.h>
#include <sys/stat.h>
#if defined(AIXV3)
# include <sys/dir.h>
#include "dtcreate.h"
#include "af_aux.h"
+#include "cmncbs.h"
#include "cmnutils.h"
#include "cmnrtns.h"
+#include "ErrorDialog.h"
+#include "FileCharacteristics.h"
/******************************************************************************/
/* */
printf("DblClick icon callback.\n");
#endif
- activateCB_edit_icon(wid, CA_FILETYPE_ICONS, cbs);
+ activateCB_edit_icon(wid, (XtPointer)CA_FILETYPE_ICONS,
+ (XmPushButtonCallbackStruct *)cbs /* unused anyway */);
}
void init_AddFiletype (FiletypeData *);
void free_Filetypedata(FiletypeData *);
+void init_AddFiletype_dialog_fields(FiletypeData *pFtD);
void clear_AddFiletype_dialog_fields(void);
void AddFiletypeToList();
void UpdateFiletypeDataArray();
#include <Dt/IconFile.h>
#include "dtcreate.h"
+#include "af_aux.h"
#include "ca_aux.h"
-#include "cmnutils.h"
+#include "cmncbs.h"
#include "cmnrtns.h"
+#include "cmnutils.h"
#include "CreateActionAppShell.h"
#include "Confirmed.h"
+#include "ErrorDialog.h"
+#include "FileCharacteristics.h"
+
+/* from main.c */
+extern void RemoveTmpIconFiles( void );
/******************************************************************************/
/* */
/* External Variables */
/* */
/******************************************************************************/
-extern Dimension wintypeheight, winheight, xprtheight, newheight;
+extern XtArgVal /* Dimension */ wintypeheight, winheight, xprtheight, newheight;
/******************************************************************************/
/* */
void activateCB_ExpertOption (Widget wid, XtPointer client_data,
XtPointer *cbs)
{
- Dimension ca_width;
+ XtArgVal /* Dimension */ ca_width;
if (!XtIsManaged(XprtOptionForm)) {
/**********************************************************************/
printf("DblClick icon callback.\n");
#endif
- activateCB_edit_icon(wid, CA_ACTION_ICONS, cbs);
+ activateCB_edit_icon(wid, (XtPointer)CA_ACTION_ICONS,
+ (XmPushButtonCallbackStruct *)cbs /* unused anyway */);
}
return;
#include "UxXt.h"
-#if defined(USL) || defined(__uxp__)
#if !defined(_DIRENT_H)
#include <dirent.h>
#endif
#if !defined(_DtIcon_h_)
#include <Dt/Icon.h>
#endif
-#endif
/***************************************************************************/
/* */
/* */
/***************************************************************************/
+void initAD( ActionData *pAD );
void readCAFromGUI (struct _ActionData *ca_struct);
void getCAactionName (struct _ActionData *ca_struct);
void getCAdblClkCmd (struct _ActionData *ca_struct);
#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;
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;
void activateCB_edit_icon (Widget,XtPointer,XmPushButtonCallbackStruct *);
void DisplayHelpDialog (Widget, XtPointer, XtPointer);
void helpCB_general (Widget, XtPointer, XtPointer);
+void createCB_IconGadget(Widget wid, Boolean bActionIcons, enum icon_size_range IconSize);
+
#endif /* _CMNCBS_H_INCLUDED */
/*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
+#include <unistd.h>
#include <Dt/Icon.h>
#include <X11/cursorfont.h>
#include "UxXt.h"
#include <libgen.h>
+#include <Dt/HourGlass.h>
#include "dtcreate.h"
#include "CreateActionAppShell.h"
char *ptr;
newName = (char *)XtMalloc(strlen(pszName) + 1);
- memset(newName, 0, sizeof(newName));
+ memset(newName, 0, strlen(pszName) + 1);
strcpy(newName, pszName);
ptr = strrchr(newName, ' ');
if (ptr) {
name = pszFullName;
}
newName = (char *)malloc(strlen(name) + 1);
- memset(newName, 0, sizeof(newName));
+ memset(newName, 0, strlen(name) + 1);
strcpy(newName, name);
ptr = strrchr(newName, '.');
if (ptr) {
char *full_name, *path_and_base_name, *type_name, *size_name;
char *base_name;
char *ptr;
- int iSource;
+ XtArgVal /* int */ iSource;
FiletypeData *pFtD;
/*****************************************/
#include <Xm/RowColumnP.h>
#include <Xm/MessageB.h>
#include <Xm/Text.h>
+#include <Xm/List.h>
#include "cmnutils.h"
/********************************************************************************/
void delete_all_list_items (Widget list)
{
-int item_count = 0;
+XtArgVal /* int */ item_count = 0;
XtVaGetValues (list, XmNitemCount, &item_count, NULL);
if (item_count > 0) {
Widget show_working_dialog (void);
void show_info_dialog (void);
void free_XmStringTable (XmStringTable table);
-
+void clear_text (Widget textfield);
+void clear_text_field (Widget textfield);
+void delete_all_list_items (Widget list);
#endif /* _CMNUTILS_H_INCLUDED */
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
+#include <sys/types.h>
#include <fcntl.h>
+#include <unistd.h>
#include <Dt/Icon.h>
#include "dtcreate.h"
#include "cmnrtns.h"
#include "fileio.h"
+#include "parser.h"
+#include "ErrorDialog.h"
#define COMMENT_CHAR '#'
#define MAX_KEY 10000
case Medium_Icon :
strcpy(pszSize, MEDIUM_EXT);
break;
+ case Small_Icon :
+ strcpy(pszSize, SMALL_EXT);
+ break;
case Tiny_Icon :
strcpy(pszSize, TINY_EXT);
break;
+ case None_Selected :
+ pszSize[0] = 0;
}
if (bIsMask) {
strcat(pszSize, "_m");
/* */
/***************************************************************************/
-ushort WriteDefinitionFile(char *, ActionData *);
-ushort WriteActionFile(ActionData *);
-Boolean check_file_exists(char *);
-int OpenDefinitionFile(char *, ActionData *);
-ushort CopyIconFiles(ActionData *);
-char * CreateIconName(char *, char *, enum icon_size_range, char *, Boolean);
-Boolean ActionHasIcon (void);
-Boolean FiletypeHasIcon (FiletypeData *);
+extern ushort WriteDefinitionFile(char *, ActionData *);
+extern ushort WriteActionFile(ActionData *);
+extern Boolean check_file_exists(char *);
+extern int OpenDefinitionFile(char *, ActionData *);
+extern ushort CopyIconFiles(ActionData *);
+extern char * CreateIconName(char *, char *, enum icon_size_range, char *, Boolean);
+extern Boolean ActionHasIcon (void);
+extern Boolean FiletypeHasIcon (FiletypeData *);
#endif /* _FILEIO_H_INCLUDED */
#include <Xm/Form.h>
#include <Xm/RowColumn.h>
#include <Xm/MessageB.h>
+#include <Xm/XmPrivate.h> /* XmeFlushIconFileCache */
#include <X11/cursorfont.h>
#include <Dt/Icon.h>
#include "cmncbs.h"
#include "cmnrtns.h"
#include "cmnutils.h"
+#include "fileio.h"
+#include "ErrorDialog.h"
/*******************************************************************************
Includes, Defines, and Global variables from the Declarations Editor:
Widget widvScrollbar;
Widget widRowColumn;
int increment;
- Dimension height;
+ XtArgVal /* Dimension */ height;
XtVaGetValues(XtParent(UxWidget), XmNverticalScrollBar, &widvScrollbar, NULL);
widRowColumn = (Widget)UxClientData;
#include <Xm/Xm.h>
#include <Xm/Protocols.h>
#include <Xm/VendorSEP.h>
+#include <Xm/XmPrivate.h> /* XmeFlushIconFileCache */
+#include <Dt/Action.h>
+#include <Dt/GetDispRes.h>
#include <Dt/Icon.h>
#include <Dt/EnvControlP.h>
#include <Dt/UserMsg.h>
+#include <Dt/Session.h>
+#include <Dt/Wsm.h>
#define GETXMSTRING(s, m, d) XmStringCreateLocalized(GETMESSAGE(s,m,d))
#define CLASS_NAME "Dtcreate"
#include "dtcreate.h"
#include "ca_aux.h"
#include "cmnrtns.h"
+#include "ErrorDialog.h"
+#include "fileio.h"
#ifdef __TOOLTALK
#include <Tt/tttk.h>
* Insert application global declarations here
*---------------------------------------------*/
-extern Dimension wintypeheight;
+extern XtArgVal /* Dimension */ wintypeheight;
/* Structure used on a save session to see if a dt is iconic */
typedef struct {
static void
ExitCB (Widget dialog, XtPointer client_data, XtPointer call_data)
{
- exit((int) client_data);
+ exit((int)(XtArgVal) client_data);
}
void
display_error_message(XtParent(pIconData->wid), errPtr);
XtFree(errPtr);
tt_release( ttMark );
- return;
+ return (TT_CALLBACK_CONTINUE);
}
/*******************************************************************/
XtFree(errPtr);
tt_release( ttMark );
if (tmpfd > -1) close(tmpfd);
- return;
+ return (TT_CALLBACK_CONTINUE);
}
/*******************************************************************/
XtFree(errPtr);
tt_release( ttMark );
if (tmpfd > -1) close(tmpfd);
- return;
+ return (TT_CALLBACK_CONTINUE);
}
/****************************************************************/
display_error_message(XtParent(pIconData->wid), errPtr);
XtFree(errPtr);
tt_release( ttMark );
- return;
+ return (TT_CALLBACK_CONTINUE);
}
#ifdef DEBUG
XtFree(errPtr);
tt_release( ttMark );
if (tmpfd > -1) close(tmpfd);
- return;
+ return (TT_CALLBACK_CONTINUE);
}
/****************************************************************/
/* */
/* */
/*****************************************************************************/
+int
main(int argc, char *argv[])
{
/*-----------------------------------------------------------