/[antiright]/antiright/src/arshell/appendage.c
ViewVC logotype

Diff of /antiright/src/arshell/appendage.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jefbed, Wed Dec 29 02:43:54 2004 UTC revision 1.2 by jefbed, Wed Dec 29 18:17:04 2004 UTC
# Line 25  Line 25 
25  Widget  Widget
26  arshell_add_appendage(Widget container)  arshell_add_appendage(Widget container)
27  {  {
28              char *command;
29            Widget button;
30            command=antiright_pipe_read("arshell -ADp 'Enter the command for the new button.'");
31            button=arshell_optioned_button(container, arshell_system_cb, command);
32            free(command);
33            return(button);
34  }  }
35    
36  Widget  Widget
37  arshell_add_predefined_appendage(Widget container, char *command)  arshell_add_predefined_appendage(Widget container, char *command)
38  {  {
39            return(arshell_optioned_button(container, arshell_system_cb, command));
40    }
41    
42    void
43    arshell_appendage_append_callback(Widget caller, XtPointer client, XtPointer call)
44    {
45            arshell_add_appendage((Widget)client);
46            caller=NULL;
47            call=NULL;
48    }
49    
50    void
51    arshell_appendage_append_predefined_callback(Widget caller,
52                    XtPointer client, XtPointer call)
53    {
54            char *command;
55            call=NULL;
56            ARCLARG;
57            antiright_set(XmNlabelString, (XtArgVal)&command);
58            antiright_get_values(caller);
59            ARCLARG;
60            arshell_add_predefined_appendage((Widget)client, command);
61            XtFree(command);
62    }
63    
64    Widget
65    arshell_add_predefined_appendage_button(Widget parent, Widget container, char *command)
66    {
67            Widget button;
68            button=antiright_button(parent, command, arshell_appendage_append_predefined_callback,
69                                    (XtPointer)container);
70            antiright_label_string(button, command);
71            return(button);
72  }  }
73    
74  Widget  Widget
75  arshell_add_appendage_button(Widget parent, Widget container)  arshell_add_appendage_button(Widget parent, Widget container)
76  {  {
77            Widget button;
78            button=antiright_button(parent, "Append", arshell_appendage_append_callback,
79                            (XtPointer)container);
80            antiright_label_string(button, "Append...");
81            return(button);
82  }  }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26