diff options
Diffstat (limited to 'actions.c')
-rw-r--r-- | actions.c | 26 |
1 files changed, 16 insertions, 10 deletions
@@ -41,11 +41,17 @@ in this Software without prior written authorization from The Open Group. * Private data. */ +//struct ActionValues { +// String name; +// int type; +//}; + struct ActionValues { - String name; - int type; + const char * name; + int type; }; + static struct ActionValues select_values[] = { { "widget", (int) SelectWidget }, { "all", (int) SelectAll }, @@ -76,7 +82,7 @@ static void PopdownFileDialogAction ( Widget w, XEvent *event, static void ActionQuit ( Widget w, XEvent *event, String *params, Cardinal *num_params ); static WNode * FindTreeNodeFromWidget ( Widget w ); -static Boolean CheckAndFindEntry ( String action_name, +static Boolean CheckAndFindEntry ( const char *action_name, String * params, Cardinal num_params, struct ActionValues * table, Cardinal num_table, int * type ); @@ -245,12 +251,12 @@ ActionQuit(Widget w, XEvent *event, String *params, Cardinal *num_params) */ static XtActionsRec actions[] = { - {"EnableGetVal", EnableGetVal}, - {"Select", SelectAction}, - {"SVActiveEntry", ModifySVEntry}, - {"Relabel", RelabelAction}, - {"PopdownFileDialog", PopdownFileDialogAction}, - {"quit", ActionQuit} + {(String)"EnableGetVal", EnableGetVal}, + {(String)"Select", SelectAction}, + {(String)"SVActiveEntry", ModifySVEntry}, + {(String)"Relabel", RelabelAction}, + {(String)"PopdownFileDialog", PopdownFileDialogAction}, + {(String)"quit", ActionQuit} }; void @@ -279,7 +285,7 @@ SetApplicationActions(XtAppContext app_con) */ static Boolean -CheckAndFindEntry(String action_name, String *params, Cardinal num_params, +CheckAndFindEntry(const char *action_name, String *params, Cardinal num_params, struct ActionValues *table, Cardinal num_table, int *type) { char buf[BUFSIZ]; |