diff options
| -rw-r--r-- | fluid/factory.cxx | 18 | ||||
| -rw-r--r-- | fluid/fluid.cxx | 6 |
2 files changed, 15 insertions, 9 deletions
diff --git a/fluid/factory.cxx b/fluid/factory.cxx index eb5cc67b5..652a247a4 100644 --- a/fluid/factory.cxx +++ b/fluid/factory.cxx @@ -1,5 +1,5 @@ // -// "$Id: factory.cxx,v 1.4.2.3 1999/08/05 09:01:25 bill Exp $" +// "$Id: factory.cxx,v 1.4.2.4 1999/11/20 09:17:20 bill Exp $" // // Widget factory code for the Fast Light Tool Kit (FLTK). // @@ -136,6 +136,8 @@ static Fl_Round_Button_Type Fl_Round_Button_type; //////////////////////////////////////////////////////////////// +extern int compile_only; + #include <FL/Fl_Browser.H> static Fl_Menu_Item browser_type_menu[] = { {"No Select",0,0,(void*)FL_NORMAL_BROWSER}, @@ -150,10 +152,14 @@ public: virtual const char *type_name() {return "Fl_Browser";} Fl_Widget *widget(int x,int y,int w,int h) { Fl_Browser* b = new Fl_Browser(x,y,w,h); - char buffer[20]; - for (int i = 1; i <= 20; i++) { - sprintf(buffer,"Browser Line %d",i); - b->add(buffer); + // Fl_Browser::add calls fl_height(), which requires the X display open. + // Avoid this when compiling so it works w/o a display: + if (!compile_only) { + char buffer[20]; + for (int i = 1; i <= 20; i++) { + sprintf(buffer,"Browser Line %d",i); + b->add(buffer); + } } return b; } @@ -687,5 +693,5 @@ int lookup_symbol(const char *name, int &v, int numberok) { } // -// End of "$Id: factory.cxx,v 1.4.2.3 1999/08/05 09:01:25 bill Exp $". +// End of "$Id: factory.cxx,v 1.4.2.4 1999/11/20 09:17:20 bill Exp $". // diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index c43f7fcca..c52725664 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1,5 +1,5 @@ // -// "$Id: fluid.cxx,v 1.15.2.1 1999/04/18 23:43:42 mike Exp $" +// "$Id: fluid.cxx,v 1.15.2.2 1999/11/20 09:17:21 bill Exp $" // // FLUID main entry for the Fast Light Tool Kit (FLTK). // @@ -158,7 +158,7 @@ void new_cb(Fl_Widget *, void *v) { modflag = 0; } -static int compile_only = 0; +int compile_only = 0; int header_file_set = 0; int code_file_set = 0; const char* header_file_name = ".h"; @@ -428,5 +428,5 @@ int main(int argc,char **argv) { } // -// End of "$Id: fluid.cxx,v 1.15.2.1 1999/04/18 23:43:42 mike Exp $". +// End of "$Id: fluid.cxx,v 1.15.2.2 1999/11/20 09:17:21 bill Exp $". // |
