/* AntiRight (c) 2003-2004 Jeffrey Bedard jefbed@e-list.net This file is part of AntiRight. AntiRight is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. AntiRight is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with AntiRight; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "arshell.h" 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)]); }