diff -pru wgbuilder-0.6.3/configure wgbuilder-0.6.4/configure --- wgbuilder-0.6.3/configure Sat Jun 9 05:09:43 2001 +++ wgbuilder-0.6.4/configure Fri Jul 20 06:12:47 2001 @@ -878,7 +878,7 @@ fi # Define the identity of the package. PACKAGE=wgbuilder -VERSION=0.6.3 +VERSION=0.6.4 cat >> confdefs.h <set_geometry (24, 368, 320, 16); + pntr->set_geometry (24, 368, 320, 18); pntr->set_visible (True); pntr->set_foreground (pntr->get_xcon()->display_server->get_black()); pntr->set_background (pntr->get_xcon()->display_server->get_black()); diff -pru wgbuilder-0.6.3/wgb_main/aboutlicense_window_init.c wgbuilder-0.6.4/wgb_main/aboutlicense_window_init.c --- wgbuilder-0.6.3/wgb_main/aboutlicense_window_init.c Fri Jul 20 16:29:47 2001 +++ wgbuilder-0.6.4/wgb_main/aboutlicense_window_init.c Fri Jul 20 05:26:20 2001 @@ -0,0 +1,461 @@ +/* + * aboutlicense_window_init.temp_c + * Initialisation file + * $Header$ + */ + +/* DO NOT EDIT THIS FILE -- AUTOMATICALLY GENERATED */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Static gadget declarations */ + +static WGLabel *aboutlicense_label14 = NULL; +static WGLabel *aboutlicense_label13 = NULL; +static WGLabel *aboutlicense_label12 = NULL; +static WGLabel *aboutlicense_label11 = NULL; +static WGLabel *aboutlicense_label10 = NULL; +static WGLabel *aboutlicense_label9 = NULL; +static WGLabel *aboutlicense_label8 = NULL; +static WGLabel *aboutlicense_label7 = NULL; +static WGLabel *aboutlicense_label6 = NULL; +static WGLabel *aboutlicense_label5 = NULL; +static WGLabel *aboutlicense_label4 = NULL; +static WGLabel *aboutlicense_label3 = NULL; +static WGLabel *aboutlicense_label2 = NULL; +static WGLabel *aboutlicense_label1 = NULL; +static WGLcarsEButton *aboutlicense_close = NULL; +static WGLcarsTitle *aboutlicense_title = NULL; +static WGLcarsPanel *aboutlicense_panel_license = NULL; +WGWindow *aboutlicense_window = NULL; + +/* Own prototypes */ + +void aboutlicense_label14_initfunc (WGLabel *pntr); +void aboutlicense_label13_initfunc (WGLabel *pntr); +void aboutlicense_label12_initfunc (WGLabel *pntr); +void aboutlicense_label11_initfunc (WGLabel *pntr); +void aboutlicense_label10_initfunc (WGLabel *pntr); +void aboutlicense_label9_initfunc (WGLabel *pntr); +void aboutlicense_label8_initfunc (WGLabel *pntr); +void aboutlicense_label7_initfunc (WGLabel *pntr); +void aboutlicense_label6_initfunc (WGLabel *pntr); +void aboutlicense_label5_initfunc (WGLabel *pntr); +void aboutlicense_label4_initfunc (WGLabel *pntr); +void aboutlicense_label3_initfunc (WGLabel *pntr); +void aboutlicense_label2_initfunc (WGLabel *pntr); +void aboutlicense_label1_initfunc (WGLabel *pntr); +void aboutlicense_close_initfunc (WGLcarsEButton *pntr); +void aboutlicense_title_initfunc (WGLcarsTitle *pntr); +void aboutlicense_panel_license_initfunc (WGLcarsPanel *pntr); +void aboutlicense_panel_license_parentcreate (WGLcarsPanel *pntr); +void aboutlicense_panel_license_parentdestroy (WGLcarsPanel *pntr); +void aboutlicense_window_initfunc (WGWindow *pntr); +void aboutlicense_window_parentcreate (WGWindow *pntr); +void aboutlicense_window_parentdestroy (WGWindow *pntr); + +/* Code */ + +void aboutlicense_label14_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 336, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("Fred Barnes (http://cern.ch/frmb/wg.html)"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label13_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 320, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("The primary contact for queries relating to this software is:"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label12_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 288, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("02111-1307 USA"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label11_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 272, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label10_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 256, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("along with this program; if not, write to the Free Software"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label9_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 240, 328, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("You should have received a copy of the GNU General Public License"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label8_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 216, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("See the GNU General Public License for more details."); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label7_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 200, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label6_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 184, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("but WITHOUT ANY WARRANTY; without even the implied warrenty of"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label5_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 168, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("This program is distributed in the hope that it will be useful,"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label4_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 144, 264, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("(at your option) any later version."); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label3_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 128, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("the Free Software Foundation; either version 2 of the License, or"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label2_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 112, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("it under the terms of the GNU General Public License as published by"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_label1_initfunc (WGLabel *pntr) +{ + pntr->set_geometry (56, 96, 336, 16); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_white()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("This program is free software; you can redistribute it and/or modify"); + pntr->set_font ("-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*"); + pntr->set_alignment (ALIGN_LEFT); + return; +} + +void aboutlicense_close_initfunc (WGLcarsEButton *pntr) +{ + pntr->set_geometry (24, 368, 392, 18); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_black()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_lcars_1 ("#666699"); + pntr->set_lcars_2 ("#99CCFF"); + pntr->set_font ("-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*"); + pntr->set_text ("Close this window"); + pntr->on_click = aboutlicense_close_click; + return; +} + +void aboutlicense_title_initfunc (WGLcarsTitle *pntr) +{ + pntr->set_geometry (24, 72, 384, 24); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_black()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_lcars_1 ("#FF6633"); + pntr->set_lcars_2 ("#FFFFFF"); + pntr->set_lcars_3 ("#FF9933"); + pntr->set_font ("-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*"); + pntr->set_text ("WG/WGBuilder licensing information"); + return; +} + +void aboutlicense_panel_license_initfunc (WGLcarsPanel *pntr) +{ + pntr->set_geometry (0, 0, 467, 417); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->display_server->get_black()); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_lcars_1 ("#9999CC"); + pntr->set_lcars_2 ("#996699"); + pntr->set_lcars_3 ("#996666"); + pntr->set_lcars_4 ("#DF6360"); + pntr->set_region (64, 392); + pntr->on_parentcreate = aboutlicense_panel_license_parentcreate; + pntr->on_parentdestroy = aboutlicense_panel_license_parentdestroy; + return; +} + +void aboutlicense_panel_license_parentcreate (WGLcarsPanel *pntr) +{ + aboutlicense_title = new WGLcarsTitle (pntr->get_xcon(), aboutlicense_title_initfunc, pntr); + if (!aboutlicense_title) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_close = new WGLcarsEButton (pntr->get_xcon(), aboutlicense_close_initfunc, pntr); + if (!aboutlicense_close) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label1 = new WGLabel (pntr->get_xcon(), aboutlicense_label1_initfunc, pntr); + if (!aboutlicense_label1) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label2 = new WGLabel (pntr->get_xcon(), aboutlicense_label2_initfunc, pntr); + if (!aboutlicense_label2) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label3 = new WGLabel (pntr->get_xcon(), aboutlicense_label3_initfunc, pntr); + if (!aboutlicense_label3) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label4 = new WGLabel (pntr->get_xcon(), aboutlicense_label4_initfunc, pntr); + if (!aboutlicense_label4) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label5 = new WGLabel (pntr->get_xcon(), aboutlicense_label5_initfunc, pntr); + if (!aboutlicense_label5) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label6 = new WGLabel (pntr->get_xcon(), aboutlicense_label6_initfunc, pntr); + if (!aboutlicense_label6) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label7 = new WGLabel (pntr->get_xcon(), aboutlicense_label7_initfunc, pntr); + if (!aboutlicense_label7) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label8 = new WGLabel (pntr->get_xcon(), aboutlicense_label8_initfunc, pntr); + if (!aboutlicense_label8) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label9 = new WGLabel (pntr->get_xcon(), aboutlicense_label9_initfunc, pntr); + if (!aboutlicense_label9) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label10 = new WGLabel (pntr->get_xcon(), aboutlicense_label10_initfunc, pntr); + if (!aboutlicense_label10) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label11 = new WGLabel (pntr->get_xcon(), aboutlicense_label11_initfunc, pntr); + if (!aboutlicense_label11) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label12 = new WGLabel (pntr->get_xcon(), aboutlicense_label12_initfunc, pntr); + if (!aboutlicense_label12) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label13 = new WGLabel (pntr->get_xcon(), aboutlicense_label13_initfunc, pntr); + if (!aboutlicense_label13) { + pntr->get_xcon()->memerror (pntr); + } + aboutlicense_label14 = new WGLabel (pntr->get_xcon(), aboutlicense_label14_initfunc, pntr); + if (!aboutlicense_label14) { + pntr->get_xcon()->memerror (pntr); + } + return; +} + +void aboutlicense_panel_license_parentdestroy (WGLcarsPanel *pntr) +{ + delete aboutlicense_title; + aboutlicense_title = NULL; + delete aboutlicense_close; + aboutlicense_close = NULL; + delete aboutlicense_label1; + aboutlicense_label1 = NULL; + delete aboutlicense_label2; + aboutlicense_label2 = NULL; + delete aboutlicense_label3; + aboutlicense_label3 = NULL; + delete aboutlicense_label4; + aboutlicense_label4 = NULL; + delete aboutlicense_label5; + aboutlicense_label5 = NULL; + delete aboutlicense_label6; + aboutlicense_label6 = NULL; + delete aboutlicense_label7; + aboutlicense_label7 = NULL; + delete aboutlicense_label8; + aboutlicense_label8 = NULL; + delete aboutlicense_label9; + aboutlicense_label9 = NULL; + delete aboutlicense_label10; + aboutlicense_label10 = NULL; + delete aboutlicense_label11; + aboutlicense_label11 = NULL; + delete aboutlicense_label12; + aboutlicense_label12 = NULL; + delete aboutlicense_label13; + aboutlicense_label13 = NULL; + delete aboutlicense_label14; + aboutlicense_label14 = NULL; + return; +} + +void aboutlicense_window_initfunc (WGWindow *pntr) +{ + pntr->set_geometry (430, 228, 467, 417); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); + pntr->set_background (pntr->get_xcon()->color_server->get_preferable (CPREF_BACKGROUND)); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_caption ("WG/WGBuilder licensing information"); + pntr->set_icon_name ("licensing information"); + pntr->set_style (WINDOW_BORDER); + pntr->set_position (WINPOS_CENTER); + pntr->set_save_under (False); + pntr->set_border_pixel (pntr->get_xcon()->display_server->get_black()); + pntr->set_border_width (0); + pntr->on_delete = aboutlicense_window_delete; + pntr->on_parentcreate = aboutlicense_window_parentcreate; + pntr->on_parentdestroy = aboutlicense_window_parentdestroy; + return; +} + +void aboutlicense_window_parentcreate (WGWindow *pntr) +{ + aboutlicense_panel_license = new WGLcarsPanel (pntr->get_xcon(), aboutlicense_panel_license_initfunc, pntr); + if (!aboutlicense_panel_license) { + pntr->get_xcon()->memerror (pntr); + } + return; +} + +void aboutlicense_window_parentdestroy (WGWindow *pntr) +{ + delete aboutlicense_panel_license; + aboutlicense_panel_license = NULL; + return; +} + + + + diff -pru wgbuilder-0.6.3/wgb_main/aboutlicense_window_init.h wgbuilder-0.6.4/wgb_main/aboutlicense_window_init.h --- wgbuilder-0.6.3/wgb_main/aboutlicense_window_init.h Fri Jul 20 16:29:48 2001 +++ wgbuilder-0.6.4/wgb_main/aboutlicense_window_init.h Fri Jul 20 05:26:20 2001 @@ -0,0 +1,26 @@ +/* + * aboutlicense_window_init.temp_h + * Initialisation prototypes + * $Header$ + */ + +/* DO NOT EDIT THIS FILE -- AUTOMATICALLY GENERATED */ +#define BUILDINIT + +#include +#include +#include +#include +#include +/* Gadget declarations */ + +extern WGWindow *aboutlicense_window; + +/* Global prototypes */ + +void aboutlicense_window_initfunc (WGWindow *pntr); +void aboutlicense_window_parentcreate (WGWindow *pntr); +void aboutlicense_window_parentdestroy (WGWindow *pntr); + + + diff -pru wgbuilder-0.6.3/wgb_main/aboutpeople_window_init.c wgbuilder-0.6.4/wgb_main/aboutpeople_window_init.c --- wgbuilder-0.6.3/wgb_main/aboutpeople_window_init.c Fri Jun 8 12:56:00 2001 +++ wgbuilder-0.6.4/wgb_main/aboutpeople_window_init.c Fri Jul 20 04:53:54 2001 @@ -140,7 +140,7 @@ void lcarssplit1_initfunc (WGLcarsSplit void aboutpeople_close_initfunc (WGLcarsEButton *pntr) { - pntr->set_geometry (24, 448, 416, 17); + pntr->set_geometry (24, 447, 416, 18); pntr->set_visible (True); pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); pntr->set_background (pntr->get_xcon()->display_server->get_black()); diff -pru wgbuilder-0.6.3/wgb_main/aboutwgbuilder_window_init.c wgbuilder-0.6.4/wgb_main/aboutwgbuilder_window_init.c --- wgbuilder-0.6.3/wgb_main/aboutwgbuilder_window_init.c Fri Jun 8 12:56:00 2001 +++ wgbuilder-0.6.4/wgb_main/aboutwgbuilder_window_init.c Fri Jul 20 05:34:12 2001 @@ -33,6 +33,7 @@ /* Static gadget declarations */ +static WGLcarsEButton *aboutwgbuilder_license = NULL; static WGLcarsEButton *aboutwgbuilder_closewindow = NULL; static WGLcarsEButton *aboutwgbuilder_who = NULL; static WGLcarsEButton *aboutwgbuilder_history = NULL; @@ -42,6 +43,7 @@ WGWindow *aboutwgbuilder_window = NULL; /* Own prototypes */ +void aboutwgbuilder_license_initfunc (WGLcarsEButton *pntr); void aboutwgbuilder_closewindow_initfunc (WGLcarsEButton *pntr); void aboutwgbuilder_who_initfunc (WGLcarsEButton *pntr); void aboutwgbuilder_history_initfunc (WGLcarsEButton *pntr); @@ -55,9 +57,25 @@ void aboutwgbuilder_window_parentdestroy /* Code */ +void aboutwgbuilder_license_initfunc (WGLcarsEButton *pntr) +{ + pntr->set_geometry (24, 152, 256, 18); + pntr->set_visible (True); + pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); + pntr->set_background (pntr->get_xcon()->display_server->get_black()); + pntr->set_tab_stop (-1); + pntr->set_enabled (True); + pntr->set_lcars_1 ("#666699"); + pntr->set_lcars_2 ("#99CCFF"); + pntr->set_font ("-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*"); + pntr->set_text ("WG/WGBuilder licensing information"); + pntr->on_click = aboutwgbuilder_license_click; + return; +} + void aboutwgbuilder_closewindow_initfunc (WGLcarsEButton *pntr) { - pntr->set_geometry (24, 208, 136, 16); + pntr->set_geometry (24, 208, 136, 18); pntr->set_visible (True); pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); pntr->set_background (pntr->get_xcon()->display_server->get_black()); @@ -73,7 +91,7 @@ void aboutwgbuilder_closewindow_initfunc void aboutwgbuilder_who_initfunc (WGLcarsEButton *pntr) { - pntr->set_geometry (24, 104, 256, 16); + pntr->set_geometry (24, 104, 256, 18); pntr->set_visible (True); pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); pntr->set_background (pntr->get_xcon()->display_server->get_black()); @@ -89,7 +107,7 @@ void aboutwgbuilder_who_initfunc (WGLcar void aboutwgbuilder_history_initfunc (WGLcarsEButton *pntr) { - pntr->set_geometry (24, 128, 256, 16); + pntr->set_geometry (24, 128, 256, 18); pntr->set_visible (True); pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); pntr->set_background (pntr->get_xcon()->display_server->get_black()); @@ -155,6 +173,10 @@ void aboutwgbuilder_panel_parentcreate ( if (!aboutwgbuilder_closewindow) { pntr->get_xcon()->memerror (pntr); } + aboutwgbuilder_license = new WGLcarsEButton (pntr->get_xcon(), aboutwgbuilder_license_initfunc, pntr); + if (!aboutwgbuilder_license) { + pntr->get_xcon()->memerror (pntr); + } return; } @@ -168,12 +190,14 @@ void aboutwgbuilder_panel_parentdestroy aboutwgbuilder_who = NULL; delete aboutwgbuilder_closewindow; aboutwgbuilder_closewindow = NULL; + delete aboutwgbuilder_license; + aboutwgbuilder_license = NULL; return; } void aboutwgbuilder_window_initfunc (WGWindow *pntr) { - pntr->set_geometry (780, 176, 420, 256); + pntr->set_geometry (501, 386, 420, 256); pntr->set_visible (True); pntr->set_foreground (pntr->get_xcon()->color_server->get_preferable (CPREF_FOREGROUND)); pntr->set_background (pntr->get_xcon()->color_server->get_preferable (CPREF_BACKGROUND)); diff -pru wgbuilder-0.6.3/wgb_main/console.c wgbuilder-0.6.4/wgb_main/console.c --- wgbuilder-0.6.3/wgb_main/console.c Fri Jun 8 17:03:56 2001 +++ wgbuilder-0.6.4/wgb_main/console.c Mon Jun 25 21:58:30 2001 @@ -84,8 +84,7 @@ static void conhist_clear_click (WGBitBt * void enable_console( void ) * Enables the console buttons once WGBuilder has loaded OK */ -void -enable_console (void) +void enable_console (void) { console_clear->enable (); console_hide->enable (); @@ -98,8 +97,7 @@ enable_console (void) * void console_put_error( WGB_Error *err ) * Prints a string onto the console */ -void -console_put_error (WGB_Error * err) +void console_put_error (WGB_Error *err) { char *buf; @@ -148,8 +146,7 @@ console_put_error (WGB_Error * err) * void show_console( void ) * Shows the console */ -void -show_console (void) +void show_console (void) { if (!console_window->visible) { console_window->show (); @@ -163,10 +160,10 @@ show_console (void) * void console_window_resize( WGWindow *pntr ) * Called when the console is resized */ -static void -console_window_resize (WGWindow * pntr) +static void console_window_resize (WGWindow *pntr) { WGBConsole->set_geometry (4, 4, pntr->width - 8, pntr->height - 36); + console_panel->set_geometry (0, 0, pntr->width, pntr->height); console_clear->set_geometry (4, pntr->height - 28, 96, 24); console_hide->set_geometry (100, pntr->height - 28, 96, 24); console_history->set_geometry (196, pntr->height - 28, 96, 24); @@ -178,8 +175,7 @@ console_window_resize (WGWindow * pntr) * void console_window_delete( WGWindow *pntr ) * Called when the console window tries to be deleted */ -static void -console_window_delete (WGWindow * pntr) +static void console_window_delete (WGWindow * pntr) { console_hide_click (console_hide, Button1); return; @@ -190,8 +186,7 @@ console_window_delete (WGWindow * pntr) * void console_clear_click( WGBitBtn *pntr, int button ) * Called when 'clear' button hit */ -static void -console_clear_click (WGBitBtn * pntr, int button) +static void console_clear_click (WGBitBtn * pntr, int button) { WGBConsole->clear (); return; @@ -202,8 +197,7 @@ console_clear_click (WGBitBtn * pntr, in * void console_hide_click( WGBitBtn *pntr, int button ) * Called when 'hide' button hit */ -static void -console_hide_click (WGBitBtn * pntr, int button) +static void console_hide_click (WGBitBtn * pntr, int button) { console_window->hide (); eventor_notify (EVOR_CONSOLE_HIDE, (void *) 0); @@ -215,8 +209,7 @@ console_hide_click (WGBitBtn * pntr, int * void console_history_click( WGBitBtn *btn, int button ) * Called when 'history' button clicked */ -static void -console_history_click (WGBitBtn * btn, int button) +static void console_history_click (WGBitBtn * btn, int button) { int i, j; @@ -253,10 +246,9 @@ console_history_click (WGBitBtn * btn, i /* * void WGBConsole_losetext( WGCMessageWin *pntr, char *text ) - * + * called when stuff scrolls off the console window */ -static void -WGBConsole_losetext (WGCMessageWin * pntr, char *text) +static void WGBConsole_losetext (WGCMessageWin * pntr, char *text) { if (!console_history_list) { console_history_list = new WGStringList (pntr->get_xcon (), 100); @@ -280,8 +272,7 @@ WGBConsole_losetext (WGCMessageWin * pnt * void conhist_window_delete( WGWindow *win ) * Called when the history window is deleted */ -static void -conhist_window_delete (WGWindow * win) +static void conhist_window_delete (WGWindow * win) { xcon->termloop (0); return; @@ -292,8 +283,7 @@ conhist_window_delete (WGWindow * win) * void conhist_scroll_scroll( WGScrollBar *scroll, long value ) * Called when the history window is scrolled */ -static void -conhist_scroll_scroll (WGScrollBar * scroll, long value) +static void conhist_scroll_scroll (WGScrollBar *scroll, long value) { if (value >= 0) { conhist_list->set_topidx (value); @@ -306,8 +296,7 @@ conhist_scroll_scroll (WGScrollBar * scr * void conhist_close_click( WGBitBtn *btn, int button ) * Called when the close button is clicked */ -static void -conhist_close_click (WGBitBtn * btn, int button) +static void conhist_close_click (WGBitBtn * btn, int button) { xcon->termloop (0); return; @@ -318,8 +307,7 @@ conhist_close_click (WGBitBtn * btn, int * void conhist_clear_click( WGBitBtn *btn, int button ) * Called when the clear button is clicked */ -static void -conhist_clear_click (WGBitBtn * btn, int button) +static void conhist_clear_click (WGBitBtn * btn, int button) { if (console_history_list) { console_history_list->clear (); @@ -331,3 +319,5 @@ conhist_clear_click (WGBitBtn * btn, int conhist_scroll->disable (); return; } + + diff -pru wgbuilder-0.6.3/wgb_main/edit_bits.c wgbuilder-0.6.4/wgb_main/edit_bits.c --- wgbuilder-0.6.3/wgb_main/edit_bits.c Fri Jun 8 17:03:56 2001 +++ wgbuilder-0.6.4/wgb_main/edit_bits.c Sun Jun 24 02:15:29 2001 @@ -97,8 +97,7 @@ static void exefile_abort_click (WGBitBt * Copy the callbacks file over or do nothing question * Returns 0=abort/no, 1=yes (don't copy) 2=yes (do copy) */ -int -copy_dispose_callbacks (WGB_LiveGadget * window) +int copy_dispose_callbacks (WGB_LiveGadget * window) { int rcde; @@ -118,8 +117,7 @@ copy_dispose_callbacks (WGB_LiveGadget * * Do you really want to set the filename to NULL ? * Returns 1 on 'yes' and 0 on 'no' or window deleted */ -int -lose_callbacks_file (WGB_LiveGadget * window) +int lose_callbacks_file (WGB_LiveGadget * window) { int rcde; @@ -138,8 +136,7 @@ lose_callbacks_file (WGB_LiveGadget * wi * void change_callback_filename( WGB_LiveGadget *window, char *filename, int copy ) * Changes the name of a callback file. 'copy' decides if the data is coppied (verbatim) */ -void -change_callback_filename (WGB_LiveGadget * window, char *filename, int copy) +void change_callback_filename (WGB_LiveGadget * window, char *filename, int copy) { int in_file, out_file, i, buf_size; char *in_fname, *out_fname, *buffer; @@ -227,8 +224,7 @@ change_callback_filename (WGB_LiveGadget * Creates the initial callback file (when going from NULL->filename) * Returns 1 on success, 0 on failure */ -int -create_initial_callbacks (WGB_LiveGadget * window, char *filename) +int create_initial_callbacks (WGB_LiveGadget * window, char *filename) { WGB_Error *err; @@ -255,8 +251,7 @@ create_initial_callbacks (WGB_LiveGadget * void edit_file( char *filename ) * Attempts to edit the specified file. NULL will make us ask the VDE */ -void -edit_file (char *filename) +void edit_file (char *filename) { WGB_LiveGadget *livewin; WGB_Error *err; @@ -292,8 +287,7 @@ edit_file (char *filename) * int file_already_exists( void ) * Throws up the "file already exists => FILE_EXISTS[_ABORT,_PRESERVE,_TRUNC]" */ -int -file_already_exists (void) +int file_already_exists (void) { int rcde; @@ -317,8 +311,7 @@ file_already_exists (void) * void losecall_window_delete( WGWindow *win ) * Called when the losecall_window is deleted */ -static void -losecall_window_delete (WGWindow * win) +static void losecall_window_delete (WGWindow * win) { xcon->termloop (0); return; @@ -329,8 +322,7 @@ losecall_window_delete (WGWindow * win) * void losecall_yes_click( WGBitBtn *btn, int button ) * Called when 'yes', lose callbacks is clicked */ -static void -losecall_yes_click (WGBitBtn * btn, int button) +static void losecall_yes_click (WGBitBtn * btn, int button) { xcon->termloop (1); return; @@ -341,8 +333,7 @@ losecall_yes_click (WGBitBtn * btn, int * void losecall_no_click( WGBitBtn *btn, int button ) * Called when 'no', don't lose callbacks is clicked */ -static void -losecall_no_click (WGBitBtn * btn, int button) +static void losecall_no_click (WGBitBtn * btn, int button) { xcon->termloop (0); return; @@ -358,8 +349,7 @@ losecall_no_click (WGBitBtn * btn, int b * void copydis_window_delete( WGWindow *win ) * Called when the window is deleted */ -static void -copydis_window_delete (WGWindow * win) +static void copydis_window_delete (WGWindow * win) { xcon->termloop (0); return; @@ -370,8 +360,7 @@ copydis_window_delete (WGWindow * win) * void copydis_no_click( WGBitBtn *btn, int button ) * Called when the 'no/abort' button is hit */ -static void -copydis_no_click (WGBitBtn * btn, int button) +static void copydis_no_click (WGBitBtn * btn, int button) { xcon->termloop (0); return; @@ -382,8 +371,7 @@ copydis_no_click (WGBitBtn * btn, int bu * void copydis_yes_copy_click( WGBitBtn *btn, int button ) * Called when the 'yes/copy' button is clicked */ -static void -copydis_yes_copy_click (WGBitBtn * btn, int button) +static void copydis_yes_copy_click (WGBitBtn * btn, int button) { xcon->termloop (2); return; @@ -394,8 +382,7 @@ copydis_yes_copy_click (WGBitBtn * btn, * void copydis_yes_nocopy_click( WGBitBtn *btn, int button ) * Called when the 'yes/nocopy' button is clicked */ -static void -copydis_yes_nocopy_click (WGBitBtn * btn, int button) +static void copydis_yes_nocopy_click (WGBitBtn * btn, int button) { xcon->termloop (1); return; @@ -411,8 +398,7 @@ copydis_yes_nocopy_click (WGBitBtn * btn * void exefile_window_delete( WGWindow *win ) * Called when the window is deleted */ -static void -exefile_window_delete (WGWindow * win) +static void exefile_window_delete (WGWindow * win) { xcon->termloop (FILE_EXISTS_ABORT); return; @@ -423,8 +409,7 @@ exefile_window_delete (WGWindow * win) * void exefile_trunc_click( WGBitBtn *btn, int button ) * Called when 'truncate' is clicked */ -static void -exefile_trunc_click (WGBitBtn * btn, int button) +static void exefile_trunc_click (WGBitBtn * btn, int button) { xcon->termloop (FILE_EXISTS_TRUNC); return; @@ -435,8 +420,7 @@ exefile_trunc_click (WGBitBtn * btn, int * void exefile_preserve_click( WGBitBtn *btn, int button ) * Called when 'preserve' is clicked */ -static void -exefile_preserve_click (WGBitBtn * btn, int button) +static void exefile_preserve_click (WGBitBtn * btn, int button) { xcon->termloop (FILE_EXISTS_PRESERVE); return; @@ -447,9 +431,10 @@ exefile_preserve_click (WGBitBtn * btn, * void exefile_abort_click( WGBitBtn *btn, int button ) * Called when the 'abort' button is clicked */ -static void -exefile_abort_click (WGBitBtn * btn, int button) +static void exefile_abort_click (WGBitBtn * btn, int button) { xcon->termloop (FILE_EXISTS_ABORT); return; } + + diff -pru wgbuilder-0.6.3/wgb_main/file_control.c wgbuilder-0.6.4/wgb_main/file_control.c --- wgbuilder-0.6.3/wgb_main/file_control.c Sat Jun 9 04:26:17 2001 +++ wgbuilder-0.6.4/wgb_main/file_control.c Fri Jul 20 04:36:50 2001 @@ -75,25 +75,19 @@ static void editfile_kill_click (WGBitBt * Own stuff */ -typedef struct TAG_actfilelist -{ +typedef struct TAG_actfilelist { char *cmd; /* just a pointer -- the string is full of terminators */ char **cmd_comp; /* real composed command (to exec) */ int cmd_count; /* including NULL at end */ pid_t chld_pid; /* obvious */ char *file_spec; /* specified file to edit */ char *file_path; /* file prefixed with project directory if necessary */ -} -actfilelist; +} actfilelist; -static volatile int signal_status; /* Incremented */ -static struct sigaction sigchld_action; static actfilelist **actfiles; static int actfile_cnt, actfile_max; -static void sigchld_handler (int sig); -static int sigchld_process (XConnection * lxcon); static char *determine_realpath (char *filename); static char **compose_args (long lineno, char *filename, char **buf_ret); @@ -107,8 +101,7 @@ static char **compose_args (long lineno, * char *file_realpath( char *filename ) * Returns a niced filename using project preferences. Returns NULL if it can't */ -char * -file_realpath (char *filename) +char *file_realpath (char *filename) { char *fixed_path; @@ -121,35 +114,10 @@ file_realpath (char *filename) * void file_ctl_init( void ) * Initalises us */ -void -file_ctl_init (void) +void file_ctl_init (void) { actfiles = NULL; actfile_cnt = actfile_max = 0; - xcon->add_immproc (sigchld_process); - signal_status = 0; - sigemptyset (&sigchld_action.sa_mask); - sigaddset (&sigchld_action.sa_mask, SIGCHLD); - sigchld_action.sa_handler = sigchld_handler; - sigchld_action.sa_flags = SA_NOCLDSTOP; /* Not interested -- prehaps should be ? */ - if (sigaction (SIGCHLD, &sigchld_action, NULL) == -1) { - fprintf (stderr, MAIN_FILECTL_FCI_SIGCHLDFAIL); - _exit (1); - } - /* Can catch signals from here */ - return; -} - - -/* - * void sigchld_handler( int sig ) - * Called when SIGCHLD happens - */ -static void -sigchld_handler (int sig) -{ - xcon->signal_immproc (); - signal_status++; return; } @@ -159,8 +127,7 @@ sigchld_handler (int sig) * Generates an absolute path from 'filename'. Must be free()d. * Can (and possibly will) return NULL. */ -static char * -determine_realpath (char *filename) +static char *determine_realpath (char *filename) { char *buf; WGB_ProjectPreferences *projpref; @@ -200,65 +167,76 @@ determine_realpath (char *filename) /* - * int sigchld_process( XConnection *lxcon ) - * Called by (a) the XConnection when we can safely fiddle structures + * void file_process_callout (void *xcon, void *uptr, int pid) + * called when XConnection has launched the process */ -static int -sigchld_process (XConnection * lxcon) +static void file_process_callout (void *xcon, void *uptr, int pid) { - WGB_Error *err; - pid_t chld; - int wret, i; - actfilelist *tmp; - WGB_ChildDeathInfo *chldinfo; + XConnection *v_xcon = (XConnection *)xcon; + actfilelist *v_act = (actfilelist *)uptr; - while (signal_status) { - signal_status--; - chld = waitpid (-1, &wret, WNOHANG); - if (!chld) { - /* Nothing terminated... */ - err = wgb_error (MAIN_FILECTL_SP_NOCHILD); - wgb_print_error (err); - wgb_free_error (err); - continue; - } - /* Quite possible we have this as an edited thing */ - for (i = 0; i < actfile_cnt; i++) { - if (actfiles[i]->chld_pid == chld) { - break; - } + v_act->chld_pid = pid; + return; +} + + +/* + * void file_process_callin (void *xcon, void *uptr, int pid, int status) + * called when an editor process finished + */ +static void file_process_callin (void *xcon, void *uptr, int pid, int status) +{ + XConnection *v_xcon = (XConnection *)xcon; + actfilelist *v_act = (actfilelist *)uptr; + int i; + + for (i=0; ipid = chld; - if (WIFEXITED (wret)) { - chldinfo->termstate = CHILD_TERMINATED_NORMAL; - chldinfo->termcode = WEXITSTATUS (wret); - } else if (WIFSIGNALED (wret)) { - chldinfo->termstate = CHILD_TERMINATED_SIGNAL; - chldinfo->termcode = WTERMSIG (wret); - } else if (WIFSIGNALED (wret)) { - chldinfo->termstate = CHILD_STOPPED; - chldinfo->termcode = WSTOPSIG (wret); - } else { - chldinfo->termstate = CHILD_DUNNO; - chldinfo->termcode = 0; - } - eventor_notify (EVOR_CHILD_DEATH, (void *) chldinfo); - free (chldinfo); - } else { - tmp = actfiles[i]; - free (tmp->cmd); - free (tmp->file_spec); - free (tmp->file_path); - if ((i + 1) < actfile_cnt) { - memmove ((void *) &(actfiles[i]), (void *) &(actfiles[i + 1]), (actfile_cnt - (i + 1)) * sizeof (actfilelist *)); - } - actfiles[--actfile_cnt] = NULL; + } + if (i == actfile_cnt) { + /* huh ? */ + } else { + free (v_act->cmd); + free (v_act->file_spec); + free (v_act->file_path); + if ((i + 1) < actfile_cnt) { + memmove ((void *) &(actfiles[i]), (void *) &(actfiles[i + 1]), (actfile_cnt - (i + 1)) * sizeof (actfilelist *)); } + actfiles[--actfile_cnt] = NULL; + } + return; +} + + +/* + * void other_process_callin (void *xcon, void *uptr, int pid, int status) + * called when non-editor processes finish + */ +static void other_process_callin (void *xcon, void *uptr, int pid, int status) +{ + XConnection *v_xcon = (XConnection *)xcon; + WGB_ChildDeathInfo *chldinfo; + + chldinfo = (WGB_ChildDeathInfo *)wgb_malloc (sizeof (WGB_ChildDeathInfo)); + chldinfo->pid = pid; + if (WIFEXITED (status)) { + chldinfo->termstate = CHILD_TERMINATED_NORMAL; + chldinfo->termcode = WEXITSTATUS (status); + } else if (WIFSIGNALED (status)) { + chldinfo->termstate = CHILD_TERMINATED_SIGNAL; + chldinfo->termcode = WTERMSIG (status); + } else if (WIFSIGNALED (status)) { + chldinfo->termstate = CHILD_STOPPED; + chldinfo->termcode = WSTOPSIG (status); + } else { + chldinfo->termstate = CHILD_DUNNO; + chldinfo->termcode = 0; } - return 0; /* Keep me */ + eventor_notify (EVOR_CHILD_DEATH, (void *)chldinfo); + free (chldinfo); + return; } @@ -266,10 +244,8 @@ sigchld_process (XConnection * lxcon) * WGB_Error *file_begin_edit( char *filename, long lineno ) * Starts a file editing session. Fails if it is already being edited (supposedly) * Specifying `lineno'==0 stops any %l argument being included. - * **NOTE** Dispite the seemingly obvious, there is no race condition in here. (XConnection prevents that) */ -WGB_Error * -file_begin_edit (char *filename, long lineno) +WGB_Error *file_begin_edit (char *filename, long lineno) { char *str_buf, *rpath; char **args, **walker; @@ -294,17 +270,24 @@ file_begin_edit (char *filename, long li return wgb_error (MAIN_FILECTL_FBE_CREAT (strerror (errno))); } } + args = compose_args (lineno, rpath, &str_buf); tmp = (actfilelist *) wgb_malloc (sizeof (actfilelist)); tmp->cmd = str_buf; tmp->cmd_comp = args; - for (walker = args, tmp->cmd_count = 0; *walker; walker++) { + tmp->cmd_count = 0; + if (!args) { + return wgb_error (MAIN_FILECTL_FBE_NOARGS); + } + for (walker = args; *walker; walker++) { tmp->cmd_count++; } + tmp->file_spec = (char *) wgb_malloc (strlen (filename) + 1); strcpy (tmp->file_spec, filename); tmp->file_path = (char *) wgb_malloc (strlen (rpath) + 1); strcpy (tmp->file_path, rpath); + if (actfile_cnt == actfile_max) { actfiles = (actfilelist **) srealloc (actfiles, actfile_max * sizeof (actfilelist *), (actfile_max + 5) * sizeof (actfilelist *)); if (!actfiles) { @@ -314,36 +297,10 @@ file_begin_edit (char *filename, long li actfile_max += 5; } actfiles[actfile_cnt++] = tmp; - switch ((tmp->chld_pid = fork ())) { - case -1: - /* Damn -- couldn't fork() */ - free (tmp->file_spec); - free (tmp->file_path); - free (tmp->cmd); - free (tmp); - actfiles[--actfile_cnt] = NULL; - return wgb_error (MAIN_FILECTL_FBE_FORK (strerror (errno))); - break; - case 0: - /* Child process */ - { - char debug_string[256]; - int i; - - *debug_string = '\0'; - for (i = 0; tmp->cmd_comp[i] != NULL; i++) { - strcat (debug_string, tmp->cmd_comp[i]); - strcat (debug_string, " "); - } - wgb_warning ("about to: %s", debug_string); - } - execv (*(tmp->cmd_comp), tmp->cmd_comp); - _exit (1); /* Quick -- lets get out of here... */ - break; - default: - /* Parent process */ - break; - } + + /* now done by XConnection :-) */ + tmp->chld_pid = -1; + xcon->start_process (*(tmp->cmd_comp), tmp->cmd_comp, tmp->cmd_count, file_process_callout, file_process_callin, (void *)tmp); return NULL; } @@ -352,8 +309,7 @@ file_begin_edit (char *filename, long li * WGB_Error *file_abort_edit( char *filename ) * Aborts an in-progress file edit. (use sparingly) */ -WGB_Error * -file_abort_edit (char *filename) +WGB_Error *file_abort_edit (char *filename) { int i; char *rpath; @@ -381,8 +337,7 @@ file_abort_edit (char *filename) * int file_is_editing( char *filename ) * Returns 1 if 'filename' is being editied */ -int -file_is_editing (char *filename) +int file_is_editing (char *filename) { int i; char *rpath; @@ -408,8 +363,7 @@ file_is_editing (char *filename) * int file_does_exist( char *filename ) * Returns 1 if 'filename' _exists_ after pathname munging */ -int -file_does_exist (char *filename) +int file_does_exist (char *filename) { char *rpath; int i; @@ -428,8 +382,7 @@ file_does_exist (char *filename) * char **compose_args( long lineno, char *filename, char **buf_ret ) * Composes arguments to form an execv()able string. Returns NULL on error. */ -static char ** -compose_args (long lineno, char *filename, char **buf_ret) +static char **compose_args (long lineno, char *filename, char **buf_ret) { WGB_UserPreferences *up; char **args; @@ -463,10 +416,20 @@ compose_args (long lineno, char *filenam ch += 2; } } + ch = up->edit_cmdline; + while (ch) { + ch = strstr (ch, "%l"); + if (ch) { + i += 5; + ch += 2; + } + } i += 2; xx_buf = (char *) wgb_malloc (i); /* Copy command-line subsituting arguments. */ - for (ch = up->edit_cmdline, dh = xx_buf; *ch != '\0'; ch++, dh++) { + ch = up->edit_cmdline; + dh = xx_buf; + while (*ch != '\0') { switch (*ch) { case '%': ch++; @@ -475,27 +438,31 @@ compose_args (long lineno, char *filenam if (lineno > 0) { sprintf (ii_buf, "%ld", lineno); strcpy (dh, ii_buf); - dh += (strlen (ii_buf) - 1); + dh += strlen (ii_buf); } else { for (; (*dh != ' ') && (*dh != '\t') && (dh > xx_buf); dh--); } break; case 'f': strcpy (dh, filename); - dh += (strlen (filename) - 1); + dh += strlen (filename); break; } break; default: *dh = *ch; + dh++; break; } + ch++; } *dh = '\0'; /* Should have a nicely formatted buffer now... */ *buf_ret = xx_buf; /* Munge into something nice -- destroys xx_buf formatting */ - for (i = 0, ch = xx_buf; *ch != '\0'; ch++) { + i = 0; + ch = xx_buf; + while (*ch != '\0') { switch (*ch) { case ' ': case '\t': @@ -508,6 +475,18 @@ compose_args (long lineno, char *filenam i--; } break; + case '\"': + /* jump over stuff until next quote */ + for (ch++; (*ch != '\"') && (*ch != '\0'); ch++); + if (*ch == '\0') { + /* okay, broken-ness.. */ + return NULL; + } + ch++; + break; + default: + ch++; + break; } } qh = ch; @@ -526,15 +505,17 @@ compose_args (long lineno, char *filenam } dh = ch; if (*ch != '\0') { - /* Some dumb idiot might shove whitespace on the end of a string */ + /* Some fool might shove whitespace on the end of a string */ i++; } break; + case '\"': + for (ch++; *ch != '\"'; ch++); + ch++; + break; default: /* Un-interesting */ - while ((*ch != ' ') && (*ch != '\t') && (*ch != '\0')) { - ch++; - } + ch++; break; } } @@ -551,8 +532,7 @@ compose_args (long lineno, char *filenam * void file_edit_list( void ) * Throws up the 'currently-editing' list */ -void -file_edit_list (void) +void file_edit_list (void) { int i, j; char somebuf[FILENAME_MAX + 20]; @@ -588,8 +568,7 @@ file_edit_list (void) * void editfile_window_delete( WGWindow *win ) * Called when the window is deleted */ -static void -editfile_window_delete (WGWindow * win) +static void editfile_window_delete (WGWindow *win) { xcon->termloop (0); return; @@ -600,8 +579,7 @@ editfile_window_delete (WGWindow * win) * void editfile_scroll_scroll( WGScrollBar *scroll, long value ) * Called when the scrollbar is moved (must have LOTS of open editing files ;)) */ -static void -editfile_scroll_scroll (WGScrollBar * scroll, long value) +static void editfile_scroll_scroll (WGScrollBar *scroll, long value) { if (value >= 0) { editfile_list->set_topidx (value); @@ -614,8 +592,7 @@ editfile_scroll_scroll (WGScrollBar * sc * void editfile_close_click( WGBitBtn *btn, int button ) * Called when the close button is clicked */ -static void -editfile_close_click (WGBitBtn * btn, int button) +static void editfile_close_click (WGBitBtn *btn, int button) { xcon->termloop (0); return; @@ -626,8 +603,7 @@ editfile_close_click (WGBitBtn * btn, in * void editfile_kill_click( WGBitBtn *btn, int button ) * Kills the selected edit session (uses file_abort_edit) */ -static void -editfile_kill_click (WGBitBtn * btn, int button) +static void editfile_kill_click (WGBitBtn *btn, int button) { int i, j; char somebuf[FILENAME_MAX + 20], *ch; diff -pru wgbuilder-0.6.3/wgb_main/hpd/abouthistory_window.hpd wgbuilder-0.6.4/wgb_main/hpd/abouthistory_window.hpd --- wgbuilder-0.6.3/wgb_main/hpd/abouthistory_window.hpd Fri Jun 8 09:10:59 2001 +++ wgbuilder-0.6.4/wgb_main/hpd/abouthistory_window.hpd Fri Jul 20 04:53:42 2001 @@ -64,7 +64,7 @@ X = 24 Y = 368 WIDTH = 320 - HEIGHT = 16 + HEIGHT = 18 VISIBLE = True FOREGROUND = pntr->get_xcon()->display_server->get_black() BACKGROUND = pntr->get_xcon()->display_server->get_black() diff -pru wgbuilder-0.6.3/wgb_main/hpd/aboutlicense_window.hpd wgbuilder-0.6.4/wgb_main/hpd/aboutlicense_window.hpd --- wgbuilder-0.6.3/wgb_main/hpd/aboutlicense_window.hpd Fri Jul 20 16:30:01 2001 +++ wgbuilder-0.6.4/wgb_main/hpd/aboutlicense_window.hpd Fri Jul 20 05:25:47 2001 @@ -0,0 +1,273 @@ +[__buildinit] + APP = foo + OPTIONS = RCS,AUTOTAB,INCLUDES + VERSION = 1.1 + TOPLVL = aboutlicense_window + + +[aboutlicense_window:WGWindow] + :GLOBAL + :CHILDREN = aboutlicense_panel_license + X = 430 + Y = 228 + WIDTH = 467 + HEIGHT = 417 + VISIBLE = True + FOREGROUND = CPREF_FOREGROUND + BACKGROUND = CPREF_BACKGROUND + TABSTOP = -1 + ENABLED = True + CAPTION = "WG/WGBuilder licensing information" + ICON_NAME = "licensing information" + STYLE = WINDOW_BORDER + POSITION = WINPOS_CENTER + SAVE_UNDER = False + BORDER_PIXEL = pntr->get_xcon()->display_server->get_black() + BORDER_WIDTH = 0 + +on_delete = aboutlicense_window_delete + +[aboutlicense_panel_license:WGLcarsPanel] + :CHILDREN = aboutlicense_title,aboutlicense_close,aboutlicense_label1,aboutlicense_label2,aboutlicense_label3,aboutlicense_label4,aboutlicense_label5,aboutlicense_label6,aboutlicense_label7,aboutlicense_label8,aboutlicense_label9,aboutlicense_label10,aboutlicense_label11,aboutlicense_label12,aboutlicense_label13,aboutlicense_label14 + X = 0 + Y = 0 + WIDTH = 467 + HEIGHT = 417 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_black() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + LCARS1 = "#9999CC" + LCARS2 = "#996699" + LCARS3 = "#996666" + LCARS4 = "#DF6360" + YSTART = 64 + YSTOP = 392 + +[aboutlicense_title:WGLcarsTitle] + X = 24 + Y = 72 + WIDTH = 384 + HEIGHT = 24 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_black() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + LCARS1 = "#FF6633" + LCARS2 = "#FFFFFF" + LCARS3 = "#FF9933" + FONT = "-adobe-helvetica-bold-r-*-*-14-*-*-*-*-*-*-*" + TEXT = "WG/WGBuilder licensing information" + +[aboutlicense_close:WGLcarsEButton] + X = 24 + Y = 368 + WIDTH = 392 + HEIGHT = 18 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_black() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + LCARS1 = "#666699" + LCARS2 = "#99CCFF" + FONT = "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*" + TEXT = "Close this window" + +on_click = aboutlicense_close_click + +[aboutlicense_label1:WGLabel] + X = 56 + Y = 96 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "This program is free software; you can redistribute it and/or modify" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label2:WGLabel] + X = 56 + Y = 112 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "it under the terms of the GNU General Public License as published by" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label3:WGLabel] + X = 56 + Y = 128 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "the Free Software Foundation; either version 2 of the License, or" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label4:WGLabel] + X = 56 + Y = 144 + WIDTH = 264 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "(at your option) any later version." + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label5:WGLabel] + X = 56 + Y = 168 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "This program is distributed in the hope that it will be useful," + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label6:WGLabel] + X = 56 + Y = 184 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "but WITHOUT ANY WARRANTY; without even the implied warrenty of" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label7:WGLabel] + X = 56 + Y = 200 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label8:WGLabel] + X = 56 + Y = 216 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "See the GNU General Public License for more details." + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label9:WGLabel] + X = 56 + Y = 240 + WIDTH = 328 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "You should have received a copy of the GNU General Public License" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label10:WGLabel] + X = 56 + Y = 256 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "along with this program; if not, write to the Free Software" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label11:WGLabel] + X = 56 + Y = 272 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label12:WGLabel] + X = 56 + Y = 288 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "02111-1307 USA" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label13:WGLabel] + X = 56 + Y = 320 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "The primary contact for queries relating to this software is:" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT + +[aboutlicense_label14:WGLabel] + X = 56 + Y = 336 + WIDTH = 336 + HEIGHT = 16 + VISIBLE = True + FOREGROUND = pntr->get_xcon()->display_server->get_white() + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + CAPTION = "Fred Barnes (http://cern.ch/frmb/wg.html)" + FONT = "-adobe-helvetica-medium-r-*-*-10-*-*-*-*-*-*-*" + ALIGNMENT = ALIGN_LEFT diff -pru wgbuilder-0.6.3/wgb_main/hpd/aboutpeople_window.hpd wgbuilder-0.6.4/wgb_main/hpd/aboutpeople_window.hpd --- wgbuilder-0.6.3/wgb_main/hpd/aboutpeople_window.hpd Fri Jun 8 09:11:02 2001 +++ wgbuilder-0.6.4/wgb_main/hpd/aboutpeople_window.hpd Fri Jul 20 04:52:38 2001 @@ -295,9 +295,9 @@ [aboutpeople_close:WGLcarsEButton] X = 24 - Y = 448 + Y = 447 WIDTH = 416 - HEIGHT = 17 + HEIGHT = 18 VISIBLE = True FOREGROUND = CPREF_FOREGROUND BACKGROUND = pntr->get_xcon()->display_server->get_black() diff -pru wgbuilder-0.6.3/wgb_main/hpd/aboutwgbuilder_window.hpd wgbuilder-0.6.4/wgb_main/hpd/aboutwgbuilder_window.hpd --- wgbuilder-0.6.3/wgb_main/hpd/aboutwgbuilder_window.hpd Fri Jun 8 09:11:03 2001 +++ wgbuilder-0.6.4/wgb_main/hpd/aboutwgbuilder_window.hpd Fri Jul 20 05:33:49 2001 @@ -8,8 +8,8 @@ [aboutwgbuilder_window:WGWindow] :GLOBAL :CHILDREN = aboutwgbuilder_panel - X = 780 - Y = 176 + X = 501 + Y = 386 WIDTH = 420 HEIGHT = 256 VISIBLE = True @@ -27,7 +27,7 @@ +on_delete = aboutwgbuilder_window_delete [aboutwgbuilder_panel:WGLcarsPanel] - :CHILDREN = aboutwgbuilder_title,aboutwgbuilder_history,aboutwgbuilder_who,aboutwgbuilder_closewindow + :CHILDREN = aboutwgbuilder_title,aboutwgbuilder_history,aboutwgbuilder_who,aboutwgbuilder_closewindow,aboutwgbuilder_license X = 0 Y = 0 WIDTH = 420 @@ -64,7 +64,7 @@ X = 24 Y = 128 WIDTH = 256 - HEIGHT = 16 + HEIGHT = 18 VISIBLE = True FOREGROUND = CPREF_FOREGROUND BACKGROUND = pntr->get_xcon()->display_server->get_black() @@ -80,7 +80,7 @@ X = 24 Y = 104 WIDTH = 256 - HEIGHT = 16 + HEIGHT = 18 VISIBLE = True FOREGROUND = CPREF_FOREGROUND BACKGROUND = pntr->get_xcon()->display_server->get_black() @@ -96,7 +96,7 @@ X = 24 Y = 208 WIDTH = 136 - HEIGHT = 16 + HEIGHT = 18 VISIBLE = True FOREGROUND = CPREF_FOREGROUND BACKGROUND = pntr->get_xcon()->display_server->get_black() @@ -107,3 +107,19 @@ FONT = "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*" TEXT = "Close this window" +on_click = aboutwgbuilder_close_click + +[aboutwgbuilder_license:WGLcarsEButton] + X = 24 + Y = 152 + WIDTH = 256 + HEIGHT = 18 + VISIBLE = True + FOREGROUND = CPREF_FOREGROUND + BACKGROUND = pntr->get_xcon()->display_server->get_black() + TABSTOP = -1 + ENABLED = True + LCARS1 = "#666699" + LCARS2 = "#99CCFF" + FONT = "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*" + TEXT = "WG/WGBuilder licensing information" + +on_click = aboutwgbuilder_license_click diff -pru wgbuilder-0.6.3/wgb_main/version.h wgbuilder-0.6.4/wgb_main/version.h --- wgbuilder-0.6.3/wgb_main/version.h Fri Jun 8 17:16:57 2001 +++ wgbuilder-0.6.4/wgb_main/version.h Fri Jul 20 02:53:17 2001 @@ -20,12 +20,12 @@ #ifndef _WGBUILDER_VERSION_H #define _WGBUILDER_VERSION_H -#define WGBUILDER_VERSION_STR "0.6.3 (i386/linux)" +#define WGBUILDER_VERSION_STR "0.6.4 (i386/linux)" #define WGBUILDER_VERSION_MAJ (0) #define WGBUILDER_VERSION_MIN (6) -#define WGBUILDER_VERSION_PATCH (3) +#define WGBUILDER_VERSION_PATCH (4) #define WGBUILDER_VERSION_HW "i386/linux" #define WGBUILDER_COPYRIGHT "WGBuilder Copyright (C) 1998/1999 Frederick Barnes and David Reeve" -#define BUILD_VERSION_NUMBER 677 +#define BUILD_VERSION_NUMBER 679 #endif /* !_WGBUILDER_VERSION_H */ diff -pru wgbuilder-0.6.3/wgb_main/wgb_project_list.c wgbuilder-0.6.4/wgb_main/wgb_project_list.c --- wgbuilder-0.6.3/wgb_main/wgb_project_list.c Fri Jun 8 17:03:57 2001 +++ wgbuilder-0.6.4/wgb_main/wgb_project_list.c Sun Jun 24 02:06:16 2001 @@ -97,8 +97,7 @@ static void disable_vde_callbacks (void) * void closedown_project_list( void ) * Gets rid of this window. Usually when a project is closed etc.. */ -void -closedown_project_list (void) +void closedown_project_list (void) { if (xcon->is_registered (project_win)) { disable_vde_callbacks (); @@ -114,8 +113,7 @@ closedown_project_list (void) * void display_project_list( void ) * Displays the project list, or repopulates if already here */ -void -display_project_list (void) +void display_project_list (void) { if (xcon->is_registered (project_win)) { project_list->items->clear (); @@ -137,8 +135,7 @@ display_project_list (void) * void update_project_list( void ) * Updates the project list */ -void -update_project_list (void) +void update_project_list (void) { int i, j; char buf[1024]; @@ -189,8 +186,7 @@ update_project_list (void) * void setup_vde_callbacks( void ) * Engages the VDE callbacks (and the properties name-change) */ -static void -setup_vde_callbacks (void) +static void setup_vde_callbacks (void) { vde_on_context_create (on_vde_context_create); vde_on_context_delete (on_vde_context_delete); @@ -205,8 +201,7 @@ setup_vde_callbacks (void) * void disable_vde_callbacks( void ) * Disables VDE callbacks (and properties name-change) */ -static void -disable_vde_callbacks (void) +static void disable_vde_callbacks (void) { vde_on_context_create (NULL); vde_on_context_delete (NULL); @@ -221,8 +216,7 @@ disable_vde_callbacks (void) * void project_win_delete( WGWindow *win ) * Called when delete hit */ -static void -project_win_delete (WGWindow * win) +static void project_win_delete (WGWindow * win) { disable_vde_callbacks (); win->release (); @@ -235,8 +229,7 @@ project_win_delete (WGWindow * win) * void project_win_resize( WGWindow *win ) * Called to resize project window (and bits inside it) */ -static void -project_win_resize (WGWindow * win) +static void project_win_resize (WGWindow * win) { int vis, i; @@ -277,8 +270,7 @@ project_win_resize (WGWindow * win) * void project_win_destroy( WGWindow *win ) * Is called as the project window shuts-down */ -static void -project_win_destroy (WGWindow * win) +static void project_win_destroy (WGWindow * win) { project_win = NULL; return; @@ -289,8 +281,7 @@ project_win_destroy (WGWindow * win) * void project_list_click( WGListBox *list, int index ) * Called when an item is clicked */ -static void -project_list_click (WGListBox * list, int index) +static void project_list_click (WGListBox * list, int index) { char buf[1024], *ch; @@ -351,8 +342,7 @@ project_list_click (WGListBox * list, in * void project_viewform_click( WGBitBtn *btn, int button ) * Called when `form' button clicked */ -static void -project_viewform_click (WGBitBtn * btn, int button) +static void project_viewform_click (WGBitBtn * btn, int button) { char buf[1024], *ch; int i; @@ -382,8 +372,7 @@ project_viewform_click (WGBitBtn * btn, * void project_viewcode_click( WGBitBtn *btn, int button ) * Called when `code' button clicked */ -static void -project_viewcode_click (WGBitBtn * btn, int button) +static void project_viewcode_click (WGBitBtn * btn, int button) { char buf[1024], *ch; int i; @@ -413,8 +402,7 @@ project_viewcode_click (WGBitBtn * btn, * void project_close_click( WGBitBtn *btn, int button ) * Called when `close' button clicked */ -static void -project_close_click (WGBitBtn * btn, int button) +static void project_close_click (WGBitBtn * btn, int button) { eventor_notify (EVOR_PROJLIST_HIDE, (void *) 0); disable_vde_callbacks (); @@ -428,8 +416,7 @@ project_close_click (WGBitBtn * btn, int * void project_scroll_scroll( WGScrollBar *scroll, long value ) * Called when scrolling occurs */ -static void -project_scroll_scroll (WGScrollBar * scroll, long value) +static void project_scroll_scroll (WGScrollBar * scroll, long value) { project_list->set_topidx (value); return; @@ -439,8 +426,7 @@ project_scroll_scroll (WGScrollBar * scr * int project_win_visible( void ) * Returns 1 if the project window is here and visible */ -int -project_win_visible (void) +int project_win_visible (void) { if (project_win) { if (xcon->is_registered (project_win)) { @@ -457,8 +443,7 @@ project_win_visible (void) * void on_vde_context_create( WGB_LiveGadget *livegad, int cxtid ) * Called by VDE to notify new context creation */ -static void -on_vde_context_create (WGB_LiveGadget * livegad, int cxtid) +static void on_vde_context_create (WGB_LiveGadget * livegad, int cxtid) { update_project_list (); return; @@ -469,8 +454,7 @@ on_vde_context_create (WGB_LiveGadget * * void on_vde_context_delete( WGB_LiveGadget *livegad, int cxtid ) * Called by VDE to notify context deletion */ -static void -on_vde_context_delete (WGB_LiveGadget * livegad, int cxtid) +static void on_vde_context_delete (WGB_LiveGadget * livegad, int cxtid) { update_project_list (); return; @@ -481,8 +465,7 @@ on_vde_context_delete (WGB_LiveGadget * * void on_vde_context_show( WGB_LiveGadget *livegad, int cxtid ) * Called by the VDE to notify context became visible */ -static void -on_vde_context_show (WGB_LiveGadget * livegad, int cxtid) +static void on_vde_context_show (WGB_LiveGadget * livegad, int cxtid) { update_project_list (); return; @@ -493,8 +476,7 @@ on_vde_context_show (WGB_LiveGadget * li * void on_vde_context_hide( WGB_LiveGadget *livegad, int cxtid ) * Called by VDE to notify context got hidden */ -static void -on_vde_context_hide (WGB_LiveGadget * livegad, int cxtid) +static void on_vde_context_hide (WGB_LiveGadget * livegad, int cxtid) { update_project_list (); return; @@ -505,8 +487,7 @@ on_vde_context_hide (WGB_LiveGadget * li * void on_prop_name_change( WGB_LiveGadget *livegad ) * Called when the name of a gadget changes. */ -static void -on_prop_name_change (WGB_LiveGadget * livegad) +static void on_prop_name_change (WGB_LiveGadget * livegad) { int i; @@ -520,3 +501,6 @@ on_prop_name_change (WGB_LiveGadget * li } return; } + + + diff -pru wgbuilder-0.6.3/wgb_main/wgbuilder.c wgbuilder-0.6.4/wgb_main/wgbuilder.c --- wgbuilder-0.6.3/wgb_main/wgbuilder.c Sat Jun 9 04:27:28 2001 +++ wgbuilder-0.6.4/wgb_main/wgbuilder.c Fri Jul 20 06:12:43 2001 @@ -97,11 +97,14 @@ static void btn_right_click (WGButton * static void aboutwgbuilder_close_click (WGLcarsEButton * btn); static void aboutwgbuilder_who_click (WGLcarsEButton * btn); static void aboutwgbuilder_history_click (WGLcarsEButton * btn); +static void aboutwgbuilder_license_click (WGLcarsEButton *btn); static void aboutwgbuilder_window_delete (WGWindow * win); static void abouthistory_close_click (WGLcarsEButton * btn); static void abouthistory_window_delete (WGWindow * win); static void aboutpeople_close_click (WGLcarsEButton * btn); static void aboutpeople_window_delete (WGWindow * win); +static void aboutlicense_close_click (WGLcarsEButton *btn); +static void aboutlicense_window_delete (WGWindow *win); void *wgb_malloc (size_t amt); /* I suspect this is prototyped elsewhere also */ @@ -129,6 +132,7 @@ static int create_counter; #include "aboutwgbuilder_window_init.c" #include "abouthistory_window_init.c" #include "aboutpeople_window_init.c" +#include "aboutlicense_window_init.c" #include "splash_win_init.c" @@ -141,8 +145,7 @@ static int create_counter; * int main( int argc, char **argv ) * Where it all starts */ -int -main (int argc, char **argv) +int main (int argc, char **argv) { int termcode, cxtid, i; char versionstr[128]; @@ -306,7 +309,6 @@ main (int argc, char **argv) break; case 2: /* Loaded, and created default project preferences */ - fprintf (stderr, "Created project preferences.\n"); wgb_message ("Using built-in defaults for project."); case 1: /* Loaded, no problems. -- Create application (default) */ @@ -380,8 +382,7 @@ main (int argc, char **argv) * void wgb_deadlock( void ) * Called when the application gets deadlocked */ -static void -wgb_deadlock (void) +static void wgb_deadlock (void) { fprintf (stderr, "I am horribly deadlocked. Exiting now!\n"); fflush (stdout); @@ -405,8 +406,7 @@ void (*get_drop_gadget (void)) (WGB_Gadg * void xx_drop_gadget( WGB_GadgetDef *gdef ) * Drops a gadget into the tool-bar */ -static void -xx_drop_gadget (WGB_GadgetDef * gdef) +static void xx_drop_gadget (WGB_GadgetDef * gdef) { switch (gdef->lib) { case WGB_CORE: @@ -441,8 +441,7 @@ xx_drop_gadget (WGB_GadgetDef * gdef) * void xx_click_gadget( WGRadioBtn *btn ) * Called when gadget clicked */ -static void -xx_click_gadget (WGRadioBtn * btn) +static void xx_click_gadget (WGRadioBtn * btn) { int i; char *new_name; @@ -482,8 +481,7 @@ xx_click_gadget (WGRadioBtn * btn) * void create_newgadgets( void ) * Loads any additional gadgets into the tool-bar */ -void -create_newgadgets (void) +void create_newgadgets (void) { create_control_btns (); return; @@ -494,8 +492,7 @@ create_newgadgets (void) * void create_control_btns( void ) * Creates the little buttons - dynamically */ -static void -create_control_btns (void) +static void create_control_btns (void) { WGRadioBtn *btn; int i, cre_rack; @@ -577,8 +574,7 @@ create_control_btns (void) * void gadget_tab_change( WGTabTops *tabtops, long tid ) * Says 'we have changed tab' */ -static void -gadget_tab_change (WGTabTops * tabtops, long tid) +static void gadget_tab_change (WGTabTops * tabtops, long tid) { WGB_Error *nerr; @@ -601,8 +597,7 @@ gadget_tab_change (WGTabTops * tabtops, * void rack_box_initfunc( WGContainer *pntr ) * Initfunc for rack box (where components sit) */ -static void -rack_box_initfunc (WGContainer * pntr) +static void rack_box_initfunc (WGContainer * pntr) { pntr->set_geometry (6, 28, (pntr->get_xcon ()->display_server->get_width () - 8), 36); pntr->set_visible (False); @@ -618,8 +613,7 @@ rack_box_initfunc (WGContainer * pntr) * void btn_left_initfunc( WGButton *pntr ) * Initfunc for left scroll button */ -static void -btn_left_initfunc (WGButton * pntr) +static void btn_left_initfunc (WGButton * pntr) { pntr->set_geometry (0, 0, 16, 32); pntr->set_visible (True); @@ -642,8 +636,7 @@ btn_left_initfunc (WGButton * pntr) * void btn_right_initfunc( WGButton *pntr ) * Initfunc for right scroll button */ -static void -btn_right_initfunc (WGButton * pntr) +static void btn_right_initfunc (WGButton * pntr) { pntr->set_geometry ((pntr->get_xcon ()->display_server->get_width () - 27), 0, 16, 32); pntr->set_visible (True); @@ -666,8 +659,7 @@ btn_right_initfunc (WGButton * pntr) * void drop_box_initfunc( WGPanel *pntr ) * Initfunc for tool-rack panel */ -static void -drop_box_initfunc (WGPanel * pntr) +static void drop_box_initfunc (WGPanel * pntr) { pntr->set_geometry (20, 0, (pntr->get_xcon ()->display_server->get_width () - 51), 32); pntr->set_foreground (pntr->get_xcon ()->color_server->get_preferable (CPREF_FOREGROUND)); @@ -685,8 +677,7 @@ drop_box_initfunc (WGPanel * pntr) * void btns_initfunc( WGRadioBtn *pntr ) * Button initfunc (WGRadioBtn) */ -static void -btns_initfunc (WGRadioBtn * pntr) +static void btns_initfunc (WGRadioBtn * pntr) { pntr->set_geometry ((create_counter * 28) + 1, 2, 28, 28); pntr->set_visible (True); @@ -712,8 +703,7 @@ btns_initfunc (WGRadioBtn * pntr) * void btn_left_click( WGButton *btn, int button ) * Called when the 'scroll-gadgets-left' button is clicked */ -static void -btn_left_click (WGButton * btn, int button) +static void btn_left_click (WGButton * btn, int button) { /* Needs implementing */ return; @@ -724,8 +714,7 @@ btn_left_click (WGButton * btn, int butt * void btn_right_click( WGButton *btn, int button ) * Called when the 'scroll-gadgets-right' button is clicked */ -static void -btn_right_click (WGButton * btn, int button) +static void btn_right_click (WGButton * btn, int button) { /* Needs implementing */ return; @@ -736,8 +725,7 @@ btn_right_click (WGButton * btn, int but * void on_selection( WGB_LiveGadget *lgad ) * Called when somebody selects us */ -static void -on_selection (WGB_LiveGadget * lgad) +static void on_selection (WGB_LiveGadget * lgad) { /* Pass along to properties window */ give_property (lgad); @@ -749,8 +737,7 @@ on_selection (WGB_LiveGadget * lgad) * void on_create_abort( WGB_LiveGadget *lgad ) * Called when a create operation fails */ -static void -on_create_abort (WGB_LiveGadget * lgad) +static void on_create_abort (WGB_LiveGadget * lgad) { if (active_tools->button[0]) { active_tools->button[0]->all_up (); @@ -764,8 +751,7 @@ on_create_abort (WGB_LiveGadget * lgad) * void on_create_done( WGB_LiveGadget *lgad ) * Called when a create operation succeeds */ -static void -on_create_done (WGB_LiveGadget * lgad) +static void on_create_done (WGB_LiveGadget * lgad) { if (active_tools->button[0]) { active_tools->button[0]->all_up (); @@ -779,8 +765,7 @@ on_create_done (WGB_LiveGadget * lgad) * int add_tool_to_rack( char *rack, WGB_GadgetDef *tool ) * Adds a tool to the specified rack. Returns 1 on success, 0 on failure. */ -static int -add_tool_to_rack (char *rack, WGB_GadgetDef * tool) +static int add_tool_to_rack (char *rack, WGB_GadgetDef * tool) { toolrack *nrack; int i, j, flg; @@ -856,8 +841,7 @@ add_tool_to_rack (char *rack, WGB_Gadget * void *wgb_malloc( size_t amt ) * Performs a 'safe' malloc() */ -void * -wgb_malloc (size_t amt) +void *wgb_malloc (size_t amt) { void *chunk; @@ -876,8 +860,7 @@ wgb_malloc (size_t amt) * void splash_win_expose( WGWindow *win ) * Called when exposed */ -static void -splash_win_expose (WGWindow * win) +static void splash_win_expose (WGWindow * win) { fprintf (stderr, "%p just got exposed [%s]\n", win, win->id_name); return; @@ -889,8 +872,7 @@ splash_win_expose (WGWindow * win) * void launch_help( void ) * Launches the on-line help */ -void -launch_help (void) +void launch_help (void) { WGB_UserPreferences *up; char **args; @@ -950,8 +932,7 @@ launch_help (void) * void launch_about( void ) * Launches the about-box */ -void -launch_about (void) +void launch_about (void) { aboutwgbuilder_window = new WGWindow (xcon, aboutwgbuilder_window_initfunc, the_root, True); return; @@ -962,8 +943,7 @@ launch_about (void) * void aboutwgbuilder_close_click( WGLcarsEButton *btn ) * Called when the close button is clicked */ -static void -aboutwgbuilder_close_click (WGLcarsEButton * btn) +static void aboutwgbuilder_close_click (WGLcarsEButton * btn) { aboutwgbuilder_window->release (); return; @@ -974,8 +954,7 @@ aboutwgbuilder_close_click (WGLcarsEButt * void aboutwgbuilder_who_click( WGLcarsEButton *btn ) * Displays the 'who we are' box */ -static void -aboutwgbuilder_who_click (WGLcarsEButton * btn) +static void aboutwgbuilder_who_click (WGLcarsEButton * btn) { btn->fake_leave (); aboutpeople_window = new WGWindow (xcon, aboutpeople_window_initfunc, the_root, True); @@ -987,8 +966,7 @@ aboutwgbuilder_who_click (WGLcarsEButton * void aboutwgbuilder_history_click( WGLcarsEButton *btn ) * Displays my spiel about WG */ -static void -aboutwgbuilder_history_click (WGLcarsEButton * btn) +static void aboutwgbuilder_history_click (WGLcarsEButton * btn) { btn->fake_leave (); abouthistory_window = new WGWindow (xcon, abouthistory_window_initfunc, the_root, True); @@ -997,11 +975,22 @@ aboutwgbuilder_history_click (WGLcarsEBu /* + * void aboutwgbuilder_license_click (WGLcarsEButton *btn) + * Displays GPL license + */ +static void aboutwgbuilder_license_click (WGLcarsEButton *btn) +{ + btn->fake_leave (); + aboutlicense_window = new WGWindow (xcon, aboutlicense_window_initfunc, the_root, True); + return; +} + + +/* * void aboutwgbuilder_window_delete( WGWindow *win ) * Called when close window gets clicked */ -static void -aboutwgbuilder_window_delete (WGWindow * win) +static void aboutwgbuilder_window_delete (WGWindow * win) { win->release (); return; @@ -1012,8 +1001,7 @@ aboutwgbuilder_window_delete (WGWindow * * void abouthistory_close_click( WGLcarsEButton *btn ) * Closes the history window */ -static void -abouthistory_close_click (WGLcarsEButton * btn) +static void abouthistory_close_click (WGLcarsEButton * btn) { abouthistory_window->release (); return; @@ -1024,8 +1012,7 @@ abouthistory_close_click (WGLcarsEButton * void abouthistory_window_delete( WGWindow *win ) * Called when the WM closes the window */ -static void -abouthistory_window_delete (WGWindow * win) +static void abouthistory_window_delete (WGWindow * win) { win->release (); return; @@ -1036,8 +1023,7 @@ abouthistory_window_delete (WGWindow * w * void aboutpeople_close_click( WGLcarsEButton *btn ) * Closes the people window */ -static void -aboutpeople_close_click (WGLcarsEButton * btn) +static void aboutpeople_close_click (WGLcarsEButton * btn) { aboutpeople_window->release (); return; @@ -1048,9 +1034,32 @@ aboutpeople_close_click (WGLcarsEButton * void aboutpeople_window_delete( WGWindow *win ) * Called when then WM closes the window */ -static void -aboutpeople_window_delete (WGWindow * win) +static void aboutpeople_window_delete (WGWindow * win) { win->release (); return; } + + +/* + * void aboutlicense_close_click (WGLcarsEButton *btn) + * closes the license window + */ +static void aboutlicense_close_click (WGLcarsEButton *btn) +{ + aboutlicense_window->release (); + return; +} + + +/* + * void aboutlicense_window_delete (WGWindow *win) + * called when the WM closes the window + */ +static void aboutlicense_window_delete (WGWindow *win) +{ + win->release (); + return; +} + +