Move Options/Project/Timeline to Project/Settings in the menu bar.

This commit is contained in:
Jonathan Moore Liles 2008-06-21 21:06:12 -05:00
parent 05110222e6
commit 4731dea3b3
1 changed files with 156 additions and 168 deletions

View File

@ -82,7 +82,7 @@ class TLE {open
char *path; char *path;
asprintf( &path, "%s/%s", user_config_dir, options_filename ); asprintf( &path, "%s/%s", user_config_dir, options_filename );
((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options/&Global" ), path ); ((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Options" ), path );
free( path );} {} free( path );} {}
} }
Function {capture_format_cb( Fl_Widget *w, void *v )} {open private return_type {static void} Function {capture_format_cb( Fl_Widget *w, void *v )} {open private return_type {static void}
@ -137,18 +137,16 @@ for ( std::list <const char *>::const_iterator f = formats.begin(); f != formats
// capture_format_menu->add( *f, FL_MENU_RADIO, 0, 0, 0 ); // capture_format_menu->add( *f, FL_MENU_RADIO, 0, 0, 0 );
//; //;
char pat[256]; char pat[256];
snprintf( pat, sizeof( pat ), "&Options/&Project/&Timeline/Capture Format/%s", *f ); snprintf( pat, sizeof( pat ), "&Project/Se&ttings/Capture Format/%s", *f );
menubar->add( pat, 0, &TLE::capture_format_cb, this, FL_MENU_RADIO ); menubar->add( pat, 0, &TLE::capture_format_cb, this, FL_MENU_RADIO );
} }
menubar->picked( menubar->find_item( "&Options/&Project/&Timeline/Capture Format/Wav 24" ) ); menubar->picked( menubar->find_item( "&Project/Se&ttings/Capture Format/Wav 24" ) );
char *path; char *path;
asprintf( &path, "%s/options", user_config_dir ); asprintf( &path, "%s/options", user_config_dir );
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options/&Global" ), path ); ((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options" ), path );
free( path ); free( path );
@ -177,6 +175,50 @@ Loggable::progress_callback( &TLE::progress_cb, this );} {}
pi.run();} pi.run();}
xywh {0 0 40 25} deactivate xywh {0 0 40 25} deactivate
} }
Submenu {} {
label {Se&ttings} open
xywh {20 20 74 25}
} {
MenuItem {} {
label {&Follow Playhead}
callback {Timeline::follow_playhead = menu_picked_value( o );}
xywh {40 40 40 25} type Toggle value 1
}
MenuItem {} {
label {&Center Playhead}
callback {Timeline::center_playhead = menu_picked_value( o );}
xywh {50 50 40 25} type Toggle value 1
}
Submenu {} {
label {&Snap to} open
xywh {20 20 74 25}
} {
MenuItem {} {
label Bars
callback {Timeline::snap_to = Timeline::Bars;}
xywh {20 20 40 25} type Radio value 1
}
MenuItem {} {
label Beats
callback {Timeline::snap_to = Timeline::Beats;}
xywh {30 30 40 25} type Radio
}
MenuItem {} {
label Off
callback {Timeline::snap_to = Timeline::None;}
xywh {40 40 40 25} type Radio
}
}
MenuItem {} {
label {Magnetic snap}
callback {Timeline::snap_magnetic = menu_picked_value( o );}
xywh {30 30 40 25} type Toggle value 1
}
Submenu {} {
label {Capture Format} open
xywh {20 20 74 25}
} {}
}
MenuItem {} { MenuItem {} {
label {&New} label {&New}
callback {save_timeline_settings(); callback {save_timeline_settings();
@ -318,113 +360,109 @@ Project::compact();}
Submenu {} { Submenu {} {
label {&Options} open label {&Options} open
xywh {0 0 74 25} divider xywh {0 0 74 25} divider
} {
Submenu {} {
label {&Global} open
xywh {0 0 74 25}
} { } {
Submenu {} { Submenu {} {
label {&Display} open label {&Display} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
Submenu {} { Submenu {} {
label {&Timeline} open label {&Timeline} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
MenuItem {} { MenuItem {} {
label {&Measure lines} label {&Measure lines}
callback {Timeline::draw_with_measure_lines = menu_picked_value( o ); callback {Timeline::draw_with_measure_lines = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {5 5 40 25} type Toggle value 1 xywh {10 10 40 25} type Toggle value 1
} }
} }
Submenu {} { Submenu {} {
label {&Waveform} open label {&Waveform} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
MenuItem {} { MenuItem {} {
label Fill label Fill
callback {Waveform::fill = menu_picked_value( o ); callback {Waveform::fill = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {15 15 40 25} type Toggle value 1 xywh {20 20 40 25} type Toggle value 1
} }
MenuItem {} { MenuItem {} {
label Outline label Outline
callback {Waveform::outline = menu_picked_value( o ); callback {Waveform::outline = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {35 35 40 25} type Toggle value 1 xywh {40 40 40 25} type Toggle value 1
} }
MenuItem {} { MenuItem {} {
label {Vary color} label {Vary color}
callback {Waveform::vary_color = menu_picked_value( o ); callback {Waveform::vary_color = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {25 25 40 25} type Toggle value 1 xywh {30 30 40 25} type Toggle value 1
} }
} }
Submenu {} { Submenu {} {
label {&Region} open label {&Region} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
MenuItem {} { MenuItem {} {
label {Filled fades} label {Filled fades}
xywh {35 35 40 25} type Toggle value 1 xywh {40 40 40 25} type Toggle value 1
} }
MenuItem {} { MenuItem {} {
label {Inherit track color} label {Inherit track color}
callback {Audio_Region::inherit_track_color = menu_picked_value( o ); callback {Audio_Region::inherit_track_color = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {45 45 40 25} type Toggle value 1 xywh {50 50 40 25} type Toggle value 1
} }
} }
Submenu {} { Submenu {} {
label {&Control Sequence} open label {&Control Sequence} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
MenuItem {} { MenuItem {} {
label Polygon label Polygon
callback {Control_Sequence::draw_with_polygon = menu_picked_value( o ); callback {Control_Sequence::draw_with_polygon = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {25 25 40 25} type Toggle value 1 xywh {30 30 40 25} type Toggle value 1
} }
MenuItem {} { MenuItem {} {
label Graded label Graded
callback {Control_Sequence::draw_with_gradient = menu_picked_value( o ); callback {Control_Sequence::draw_with_gradient = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {35 35 40 25} type Toggle value 1 xywh {40 40 40 25} type Toggle value 1
} }
MenuItem {} { MenuItem {} {
label Ruled label Ruled
callback {Control_Sequence::draw_with_grid = menu_picked_value( o ); callback {Control_Sequence::draw_with_grid = menu_picked_value( o );
timeline->redraw();} timeline->redraw();}
xywh {45 45 40 25} type Toggle value 1 xywh {50 50 40 25} type Toggle value 1
} }
} }
Submenu {} { Submenu {} {
label {&Style} open label {&Style} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
MenuItem {} { MenuItem {} {
label Default label Default
callback {Fl::scheme( "plastic" );} callback {Fl::scheme( "plastic" );}
xywh {5 5 40 25} type Radio value 1 xywh {10 10 40 25} type Radio value 1
} }
MenuItem {} { MenuItem {} {
label Flat label Flat
callback {Fl::scheme( "gtk+" );} callback {Fl::scheme( "gtk+" );}
xywh {15 15 40 25} type Radio xywh {20 20 40 25} type Radio
} }
} }
Submenu {} { Submenu {} {
label {C&olors} open label {C&olors} open
xywh {5 5 74 25} xywh {10 10 74 25}
} { } {
MenuItem {} { MenuItem {} {
label System label System
@ -445,7 +483,7 @@ Fl::get_color( system_colors[ 2 ], r, g, b );
Fl::background2( r, g, b ); Fl::background2( r, g, b );
Fl::scheme( Fl::scheme() );} Fl::scheme( Fl::scheme() );}
xywh {5 5 40 25} type Radio xywh {10 10 40 25} type Radio
} }
MenuItem {} { MenuItem {} {
label Dark label Dark
@ -454,7 +492,7 @@ Fl::background( 50, 50, 50 );
Fl::foreground( 255, 255, 255 ); Fl::foreground( 255, 255, 255 );
Fl::scheme( Fl::scheme() );} Fl::scheme( Fl::scheme() );}
xywh {15 15 40 25} type Radio value 1 xywh {20 20 40 25} type Radio value 1
} }
MenuItem {} { MenuItem {} {
label Light label Light
@ -463,59 +501,9 @@ Fl::background( 220, 220, 220 );
Fl::foreground( 0, 0, 0 ); Fl::foreground( 0, 0, 0 );
Fl::scheme( Fl::scheme() );} Fl::scheme( Fl::scheme() );}
xywh {25 25 40 25} type Radio
}
}
}
}
Submenu {} {
label {&Project} open
xywh {0 0 74 25}
} {
Submenu {} {
label {&Timeline} open
xywh {10 10 74 25}
} {
MenuItem {} {
label {&Follow Playhead}
callback {Timeline::follow_playhead = menu_picked_value( o );}
xywh {30 30 40 25} type Toggle value 1
}
MenuItem {} {
label {&Center Playhead}
callback {Timeline::center_playhead = menu_picked_value( o );}
xywh {40 40 40 25} type Toggle value 1
}
Submenu {} {
label {&Snap to} open
xywh {10 10 74 25}
} {
MenuItem {} {
label Bars
callback {Timeline::snap_to = Timeline::Bars;}
xywh {10 10 40 25} type Radio value 1
}
MenuItem {} {
label Beats
callback {Timeline::snap_to = Timeline::Beats;}
xywh {20 20 40 25} type Radio
}
MenuItem {} {
label Off
callback {Timeline::snap_to = Timeline::None;}
xywh {30 30 40 25} type Radio xywh {30 30 40 25} type Radio
} }
} }
MenuItem {} {
label {Magnetic snap}
callback {Timeline::snap_magnetic = menu_picked_value( o );}
xywh {20 20 40 25} type Toggle value 1
}
Submenu {} {
label {Capture Format} open
xywh {10 10 74 25}
} {}
}
} }
} }
Submenu {} { Submenu {} {
@ -639,7 +627,7 @@ if ( ! Project::open() )
find_item( m, "&Project/&Compact" )->deactivate(); find_item( m, "&Project/&Compact" )->deactivate();
find_item( m, "&Project/&Info" )->deactivate(); find_item( m, "&Project/&Info" )->deactivate();
find_item( m, "&Options/&Project/&Timeline" )->deactivate(); find_item( m, "&Project/Se&ttings" )->deactivate();
find_item( m, "&Timeline" )->deactivate(); find_item( m, "&Timeline" )->deactivate();
timeline->deactivate(); timeline->deactivate();
@ -651,7 +639,7 @@ else
find_item( m, "&Project/&Compact" )->activate(); find_item( m, "&Project/&Compact" )->activate();
find_item( m, "&Project/&Info" )->activate(); find_item( m, "&Project/&Info" )->activate();
find_item( m, "&Options/&Project/&Timeline" )->activate(); find_item( m, "&Project/Se&ttings" )->activate();
find_item( m, "&Timeline" )->activate(); find_item( m, "&Timeline" )->activate();
timeline->activate(); timeline->activate();
@ -659,7 +647,8 @@ else
} }
m->redraw(); m->redraw();
project_name->redraw();} {} project_name->redraw();} {selected
}
} }
Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void} Function {update_progress( Fl_Progress *p, char *s, float v )} {open private return_type {static void}
} { } {
@ -776,14 +765,14 @@ You should have received a copy of the GNU General Public License along with thi
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( "&Options/&Project" ), "options" ); ((Fl_Menu_Settings*)menubar)->dump( menubar->find_item( "&Project/Se&ttings" ), "options" );
}} {} }} {}
} }
Function {load_timeline_settings()} {open Function {load_timeline_settings()} {open
} { } {
code {if ( Project::open() ) code {if ( Project::open() )
{ {
((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Options/&Project" ), "options" ); ((Fl_Menu_Settings*)menubar)->load( menubar->find_item( "&Project/Se&ttings" ), "options" );
} }
@ -916,8 +905,7 @@ Function {new_project_chooser()} {C return_type void
nsd.run();} {} nsd.run();} {}
} }
class Project_Info_Dialog {open class Project_Info_Dialog {} {
} {
Function {Project_Info_Dialog()} {open Function {Project_Info_Dialog()} {open
} { } {
code {make_window();} {} code {make_window();} {}
@ -971,7 +959,7 @@ while ( window->shown() )
code1 {o->label( NULL );} code1 {o->label( NULL );}
} }
Fl_Text_Editor notes_field { Fl_Text_Editor notes_field {
label {Notes:} selected label {Notes:}
private xywh {20 445 480 245} color 47 selection_color 31 textsize 18 textcolor 92 private xywh {20 445 480 245} color 47 selection_color 31 textsize 18 textcolor 92
code0 {o->buffer( new Fl_Text_Buffer() );} code0 {o->buffer( new Fl_Text_Buffer() );}
code1 {o->buffer()->loadfile( "notes" );} code1 {o->buffer()->loadfile( "notes" );}