23 |
#include "arshell.h" |
#include "arshell.h" |
24 |
|
|
25 |
void |
void |
|
arshell_initialize_layout_values() |
|
|
{ |
|
|
arshell.gui.layout.row_manager_widget=NULL; |
|
|
arshell.gui.layout.row_widget=NULL; |
|
|
arshell.gui.layout.row_counter_int=0; |
|
|
arshell.gui.layout.rows_int=8; |
|
|
} |
|
|
void |
|
|
arshell_hack_transparency_with_pixmap() |
|
|
{ |
|
|
char *icon; |
|
|
|
|
|
asprintf(&icon, "%s/handtoface.xpm", (char*)ICONDIR); |
|
|
antiright_set_bitmap_from_file(antiright.parent_widget, icon); |
|
|
free(icon); |
|
|
arshell.transparency_hacked=True; |
|
|
} |
|
|
void |
|
|
arshell_transparency_hack() |
|
|
{ |
|
|
if((arshell.gui.widgets.work==NULL) & !arshell.transparency_hacked) |
|
|
{ |
|
|
arshell_hack_transparency_with_pixmap(); |
|
|
} |
|
|
} |
|
|
void |
|
|
arshell_add_bitmap_button(int *counter_int, char **argv) |
|
|
{ |
|
|
Widget button; |
|
|
arshell_transparency_hack(); |
|
|
(*counter_int)++; |
|
|
arshell_row_layout(); |
|
|
button=antiright_icon_button(arshell.gui.layout.row_widget, |
|
|
argv[(*counter_int)], argv[(*counter_int)+1], |
|
|
arshell_system_cb, argv[(*counter_int)]); |
|
|
antiright_set_tooltip(button, argv[(*counter_int)]); |
|
|
(*counter_int)++; |
|
|
} |
|
|
void |
|
|
arshell_add_icon_button(int *counter_int, char **argv) |
|
|
{ |
|
|
Widget button; |
|
|
arshell_transparency_hack(); |
|
|
(*counter_int)++; |
|
|
arshell_row_layout(); |
|
|
button=antiright_button(arshell.gui.layout.row_widget, argv[(*counter_int)], |
|
|
arshell_system_cb, argv[(*counter_int)]); |
|
|
antiright_set_tooltip(button, argv[(*counter_int)]); |
|
|
(*counter_int)++; |
|
|
antiright_set_bitmap_from_file(button, argv[(*counter_int)]); |
|
|
} |
|
|
void |
|
26 |
arshell_add_lower_button() |
arshell_add_lower_button() |
27 |
{ |
{ |
28 |
Widget button; |
Widget button; |
29 |
arshell_row_layout(); |
arshell_row_layout(); |
30 |
assert(arshell.gui.layout.row_widget); |
assert(arshell.gui.layout.row_widget); |
31 |
button=antiright_button(arshell.gui.layout.row_widget, "Lower", |
button=antiright_panel_button(arshell.gui.layout.row_widget, "Lower", |
32 |
arshell_lower_mainwindow_cb, NULL); |
arshell_lower_mainwindow_cb, NULL); |
33 |
antiright_set_tooltip(button, "Lower the panel."); |
antiright_set_tooltip(button, "Lower the panel."); |
|
|
|
34 |
} |
} |
35 |
void |
void |
36 |
arshell_handle_construction_arguments(int *counter_int, char **argv) |
arshell_handle_construction_arguments(int *counter_int, char **argv) |
85 |
} |
} |
86 |
printf("LENGTH:%d;COUNTER:%d;OPTION:%s\n", length, counter, option); |
printf("LENGTH:%d;COUNTER:%d;OPTION:%s\n", length, counter, option); |
87 |
fflush(stdout); |
fflush(stdout); |
88 |
if(!strncmp(option, "help", length-2)) |
length-=2; |
89 |
|
if(!strncmp(option, "help", length)) |
90 |
{ |
{ |
91 |
arshell_usage(); |
arshell_usage(); |
92 |
} |
} |
93 |
if(!strncmp(option, "test", length-2)) |
if(!strncmp(option, "fifo", length)) |
94 |
|
{ |
95 |
|
(*counter_int)++; |
96 |
|
antiright_fifo_server(argv[(*counter_int)], argv[(*counter_int)+1]); |
97 |
|
(*counter_int)++; |
98 |
|
} |
99 |
|
if(!strncmp(option, "test", length)) |
100 |
{ |
{ |
101 |
puts("test"); |
puts("TESTING"); |
102 |
|
antiright_pipe_write("cut -d ' ' -f 2", "num 1 2 3"); |
103 |
|
puts("TESTING"); |
104 |
exit(0); |
exit(0); |
105 |
} |
} |
106 |
} |
} |