Don't carry project settings over from old project when creating a new one.
This commit is contained in:
parent
5b752d5dc5
commit
0100e482c5
|
@ -99,14 +99,22 @@ if ( r < 0 )
|
||||||
fl_alert( "Could not open project \\"%s\\":\\n\\n\\t%s", name, s );
|
fl_alert( "Could not open project \\"%s\\":\\n\\n\\t%s", name, s );
|
||||||
}} {}
|
}} {}
|
||||||
}
|
}
|
||||||
Function {save_timeline_settings()} {} {
|
Function {save_timeline_settings()} {open
|
||||||
|
} {
|
||||||
code {if ( Project::open() )
|
code {if ( Project::open() )
|
||||||
{
|
{
|
||||||
// save project local options (Timeline menu)
|
// save project local options (Timeline menu)
|
||||||
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Project/Se&ttings" ), "options" );
|
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Project/Se&ttings" ), "options" );
|
||||||
|
|
||||||
|
|
||||||
|
char path[256];
|
||||||
|
snprintf( path, sizeof( path ), "%s/%s", user_config_dir, ".default_project_settings" );
|
||||||
|
|
||||||
|
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Project/Se&ttings" ), path );
|
||||||
}} {}
|
}} {}
|
||||||
}
|
}
|
||||||
Function {load_timeline_settings()} {} {
|
Function {load_timeline_settings()} {open
|
||||||
|
} {
|
||||||
code {if ( Project::open() )
|
code {if ( Project::open() )
|
||||||
{
|
{
|
||||||
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Project/Se&ttings" ), "options" );
|
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Project/Se&ttings" ), "options" );
|
||||||
|
@ -126,11 +134,13 @@ Fl::lock();
|
||||||
|
|
||||||
// Fl::run();} {}
|
// Fl::run();} {}
|
||||||
}
|
}
|
||||||
Function {TLE()} {} {
|
Function {TLE()} {open
|
||||||
|
} {
|
||||||
code {Fl::visual( FL_DOUBLE | FL_RGB8 );
|
code {Fl::visual( FL_DOUBLE | FL_RGB8 );
|
||||||
|
|
||||||
make_window();
|
make_window();
|
||||||
|
|
||||||
|
|
||||||
Fl::visible_focus( 0 );
|
Fl::visible_focus( 0 );
|
||||||
|
|
||||||
Fl::get_system_colors();
|
Fl::get_system_colors();
|
||||||
|
@ -173,15 +183,25 @@ free( path );
|
||||||
menubar->add( "&Timeline", 0, 0, const_cast< Fl_Menu_Item *>( timeline->menu->menu() ), FL_SUBMENU_POINTER );
|
menubar->add( "&Timeline", 0, 0, const_cast< Fl_Menu_Item *>( timeline->menu->menu() ), FL_SUBMENU_POINTER );
|
||||||
|
|
||||||
|
|
||||||
Loggable::progress_callback( &TLE::progress_cb, this );} {}
|
// save a copy of the project settings menu so that we can restore the defaults later
|
||||||
|
{
|
||||||
|
char path[512];
|
||||||
|
snprintf( path, sizeof( path ), "%s/%s", user_config_dir, ".default_project_settings" );
|
||||||
|
|
||||||
|
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Project/Se&ttings" ), path );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loggable::progress_callback( &TLE::progress_cb, this );} {selected
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Function {make_window()} {open
|
Function {make_window()} {open
|
||||||
} {
|
} {
|
||||||
Fl_Window main_window {
|
Fl_Window main_window {
|
||||||
label Timeline
|
label Timeline open
|
||||||
private xywh {254 117 1025 770} type Double resizable xclass Non_DAW visible
|
private xywh {254 117 1025 770} type Double resizable xclass Non_DAW visible
|
||||||
} {
|
} {
|
||||||
Fl_Menu_Bar menubar {
|
Fl_Menu_Bar menubar {open
|
||||||
private xywh {0 0 1024 25}
|
private xywh {0 0 1024 25}
|
||||||
} {
|
} {
|
||||||
Submenu {} {
|
Submenu {} {
|
||||||
|
@ -770,7 +790,7 @@ while ( _window->shown() )
|
||||||
Function {make_window()} {open
|
Function {make_window()} {open
|
||||||
} {
|
} {
|
||||||
Fl_Window _window {
|
Fl_Window _window {
|
||||||
label {New Project} open selected
|
label {New Project} open
|
||||||
xywh {615 414 550 195} type Double modal xclass Non_DAW visible
|
xywh {615 414 550 195} type Double modal xclass Non_DAW visible
|
||||||
} {
|
} {
|
||||||
Fl_File_Input _name {
|
Fl_File_Input _name {
|
||||||
|
@ -926,7 +946,7 @@ window->do_callback();}
|
||||||
xywh {330 700 74 25}
|
xywh {330 700 74 25}
|
||||||
}
|
}
|
||||||
Fl_Output {} {
|
Fl_Output {} {
|
||||||
label {Last Modified On} selected
|
label {Last Modified On}
|
||||||
xywh {320 130 180 25} box UP_BOX labeltype SHADOW_LABEL align 1 textfont 11 textsize 12
|
xywh {320 130 180 25} box UP_BOX labeltype SHADOW_LABEL align 1 textfont 11 textsize 12
|
||||||
code0 {time_t t = modification_time( "history" );}
|
code0 {time_t t = modification_time( "history" );}
|
||||||
code1 {static char s[40];}
|
code1 {static char s[40];}
|
||||||
|
|
Loading…
Reference in New Issue