75 |
antiright_set_bitmap_from_file(button, argv[(*counter_int)]); |
antiright_set_bitmap_from_file(button, argv[(*counter_int)]); |
76 |
} |
} |
77 |
void |
void |
78 |
|
arshell_add_lower_button() |
79 |
|
{ |
80 |
|
Widget button; |
81 |
|
arshell_row_layout(); |
82 |
|
assert(arshell.gui.layout.row_widget); |
83 |
|
button=antiright_button(arshell.gui.layout.row_widget, "Lower", |
84 |
|
arshell_lower_mainwindow_cb, NULL); |
85 |
|
antiright_set_tooltip(button, "Lower the panel."); |
86 |
|
|
87 |
|
} |
88 |
|
void |
89 |
arshell_handle_construction_arguments(int *counter_int, char **argv) |
arshell_handle_construction_arguments(int *counter_int, char **argv) |
90 |
{ |
{ |
91 |
switch(argv[(*counter_int)][2]) |
switch(argv[(*counter_int)][2]) |
102 |
case 'i': /* Add an icon without a label. */ |
case 'i': /* Add an icon without a label. */ |
103 |
arshell_add_icon_button(counter_int, argv); |
arshell_add_icon_button(counter_int, argv); |
104 |
break; |
break; |
105 |
|
case 'L': /* Add a Lower button. */ |
106 |
|
arshell_add_lower_button(); |
107 |
|
break; |
108 |
case 'l': /* Add a label. */ |
case 'l': /* Add a label. */ |
109 |
(*counter_int)++; |
(*counter_int)++; |
110 |
ARCLARG; |
ARCLARG; |
128 |
} |
} |
129 |
|
|
130 |
void |
void |
131 |
|
arshell_handle_long_options(int *counter_int, char **argv) |
132 |
|
{ |
133 |
|
int length=strlen(argv[(*counter_int)]), counter; |
134 |
|
char *option=(char*)malloc(length-1); |
135 |
|
for(counter=2; counter <= length; counter++) |
136 |
|
{ |
137 |
|
option[counter-2]=argv[(*counter_int)][counter]; |
138 |
|
} |
139 |
|
printf("LENGTH:%d;COUNTER:%d;OPTION:%s\n", length, counter, option); |
140 |
|
fflush(stdout); |
141 |
|
if(!strncmp(option, "help", length-2)) |
142 |
|
{ |
143 |
|
arshell_usage(); |
144 |
|
} |
145 |
|
if(!strncmp(option, "test", length-2)) |
146 |
|
{ |
147 |
|
puts("test"); |
148 |
|
exit(0); |
149 |
|
} |
150 |
|
} |
151 |
|
|
152 |
|
void |
153 |
arshell_process_options(int *counter_int, char **argv) |
arshell_process_options(int *counter_int, char **argv) |
154 |
{ |
{ |
155 |
/* The code for the case statements should be clear as to |
/* The code for the case statements should be clear as to |
185 |
case 'W': |
case 'W': |
186 |
arshell_set_window_title_and_work_filename(counter_int, argv); |
arshell_set_window_title_and_work_filename(counter_int, argv); |
187 |
break; |
break; |
188 |
|
case '-': |
189 |
|
arshell_handle_long_options(counter_int, argv); |
190 |
|
break; |
191 |
default: |
default: |
192 |
arshell_usage(); |
arshell_usage(); |
193 |
break; |
break; |