Browse Source

Fix the new project dialog.

tags/non-daw-v1.1.0
Jonathan Moore Liles 15 years ago
parent
commit
e945a3893c
3 changed files with 40 additions and 26 deletions
  1. +10
    -5
      FL/New_Project_Dialog.fl
  2. +13
    -8
      Mixer/Mixer.C
  3. +17
    -13
      Timeline/TLE.fl

+ 10
- 5
FL/New_Project_Dialog.fl View File

@@ -34,11 +34,17 @@ class New_Project_Dialog {open
} {
Function {New_Project_Dialog()} {open
} {
code {make_window();} {}
code {_default_path = 0;
path = 0;
make_window();} {}
}
Function {run()} {open return_type void
} {
code {_window->show();
code {

_directory->value( _default_path );

_window->show();

while ( _window->shown() )
Fl::wait();} {}
@@ -68,8 +74,7 @@ while ( _window->shown() )
path = strdup( pat );
_default_path = strdup( _directory->value() );
_default_path = _directory->value() ? strdup( _directory->value() ) : 0;

//if ( ! Project::create( pat, _template->text( _template->value() ) ) )
// fl_alert( "Error creating project!" );
@@ -143,6 +148,6 @@ nsd.run();
*default_path = strdup( nsd.default_path() );
*selected_template = strdup( nsd.selected_template() );

return strdup( nsd.path );} {selected
return nsd.path;} {selected
}
}

+ 13
- 8
Mixer/Mixer.C View File

@@ -72,18 +72,23 @@ void Mixer::cb_menu(Fl_Widget* o) {
char *default_path;
char *selected_template;

// read_line( user_config_dir, "default_path", &default_path );
read_line( user_config_dir, "default_path", &default_path );

char *path = new_project_chooser( templates, &default_path, &selected_template );

if ( ! Project::create( path, selected_template ) )
fl_alert( "Error creating project!" );

free( path );
free( selected_template );
free( default_path );
if ( path )
{
if ( ! Project::create( path, selected_template ) )
fl_alert( "Error creating project!" );
free( path );
free( selected_template );
}

// write_line( user_config_dir, "default_path", default_path );
if ( default_path )
{
write_line( user_config_dir, "default_path", default_path );
free( default_path );
}

}
else if (! strcmp( picked, "&Project/&Open" ) )


+ 17
- 13
Timeline/TLE.fl View File

@@ -221,7 +221,7 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {}
label Timeline
callback {if ( Fl::event_key() != FL_Escape )
o->hide();} open
private xywh {703 114 1025 770} type Double resizable xclass Non_DAW visible
private xywh {705 125 1025 770} type Double resizable xclass Non_DAW visible
} {
Fl_Menu_Bar menubar {open
private xywh {0 0 1024 25}
@@ -290,19 +290,24 @@ const char *templates[] = { "Default", NULL };
char *default_path;
char *selected_template;

read_line( user_config_dir, "default_path", &default_path );
read_line( user_config_dir, "default_path", &default_path );

char *path = new_project_chooser( templates, &default_path, &selected_template );
char *path = new_project_chooser( templates, &default_path, &selected_template );

if ( ! Project::create( path, selected_template ) )
fl_alert( "Error creating project!" );

free( path );
free( selected_template );
free( default_path );
if ( path )
{
if ( ! Project::create( path, selected_template ) )
fl_alert( "Error creating project!" );
free( path );
free( selected_template );
}

if ( default_path )
{
write_line( user_config_dir, "default_path", default_path );
free( default_path );
}

write_line( user_config_dir, "default_path", default_path );

load_timeline_settings();

@@ -838,8 +843,7 @@ sm_blinker->value( timeline->session_manager_name() != NULL );
sm_blinker->tooltip( timeline->session_manager_name() );
selected_blinker->value( timeline->nselected() );} {selected
seek_blinker->value( timeline->seek_pending() );
project_name->redraw();} {selected
}
project_name->redraw();} {}
}
Function {update_cb( void *v )} {open private return_type {static void}
} {
@@ -927,7 +931,7 @@ if ( logo_box->image() )
((Fl_Shared_Image*)logo_box->image())->release();
logo_box->image( NULL );
}} open
private xywh {655 259 520 740} type Double modal visible
private xywh {761 214 520 740} type Double modal visible
} {
Fl_Value_Output {} {
label {Sample Rate}


Loading…
Cancel
Save