FL: Fix an uninitialized value.

This commit is contained in:
Jonathan Moore Liles 2012-02-23 19:32:49 -08:00
parent bc216741f4
commit 219c3b1e9b
1 changed files with 20 additions and 18 deletions

View File

@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid) # data file for the Fltk User Interface Designer (fluid)
version 1.0110 version 1.0300
header_name {.H} header_name {.H}
code_name {.C} code_name {.C}
comment {// comment {//
@ -22,13 +22,17 @@ comment {//
} {in_source in_header } {in_source in_header
} }
decl {\#include <stdlib.h>} {} decl {\#include <stdlib.h>} {private local
}
decl {\#include <string.h>} {} decl {\#include <string.h>} {private local
}
decl {\#include <stdio.h>} {} decl {\#include <stdio.h>} {private local
}
decl {\#include <FL/Fl_File_Chooser.H>} {} decl {\#include <FL/Fl_File_Chooser.H>} {private local
}
class New_Project_Dialog {open class New_Project_Dialog {open
} { } {
@ -40,9 +44,7 @@ class New_Project_Dialog {open
} }
Function {run()} {open return_type void Function {run()} {open return_type void
} { } {
code { code {_directory->value( _default_path );
_directory->value( _default_path );
_window->show(); _window->show();
@ -53,7 +55,7 @@ while ( _window->shown() )
} { } {
Fl_Window _window { Fl_Window _window {
label {New Project} open label {New Project} open
xywh {406 251 550 195} type Double hide modal xclass Non_DAW xywh {762 252 550 195} type Double hide modal xclass Non_DAW
} { } {
Fl_File_Input _name { Fl_File_Input _name {
label {Named:} label {Named:}
@ -95,7 +97,7 @@ while ( _window->shown() )
// write_line( user_config_dir, "default_path", o->value() );} // write_line( user_config_dir, "default_path", o->value() );}
xywh {75 100 375 35} xywh {75 100 375 35}
code0 {\#include <FL/filename.H>} code0 {\#include <FL/filename.H>}
code1 {char *v;} code1 {char *v = NULL;}
code2 {// read_line( user_config_dir, "default_path", &v );} code2 {// read_line( user_config_dir, "default_path", &v );}
code3 {o->value( v );} code3 {o->value( v );}
} }
@ -108,15 +110,16 @@ while ( _window->shown() )
private xywh {310 60 225 25} down_box BORDER_BOX private xywh {310 60 225 25} down_box BORDER_BOX
} { } {
MenuItem {} { MenuItem {} {
label Default label Default selected
xywh {0 0 40 25} xywh {0 0 40 25}
} }
} }
} }
} }
decl {char *path;} {public decl {char *path;} {public local
}
decl {char *_default_path} {private local
} }
decl {char *_default_path} {}
Function {templates( const char **templates )} {open return_type void Function {templates( const char **templates )} {open return_type void
} { } {
code {for ( const char **s = templates; *s; ++s ) code {for ( const char **s = templates; *s; ++s )
@ -148,6 +151,5 @@ nsd.run();
*default_path = strdup( nsd.default_path() ); *default_path = strdup( nsd.default_path() );
*selected_template = strdup( nsd.selected_template() ); *selected_template = strdup( nsd.selected_template() );
return nsd.path;} {selected return nsd.path;} {}
}
} }