From 6050493632cb3681227b7ec8c12decd449dcf66f Mon Sep 17 00:00:00 2001 From: Good Guy Date: Tue, 12 Mar 2019 20:14:58 -0600 Subject: [PATCH] shuttle keydef tweak, add copy_flags to copy edl, zoombar layout tweak --- cinelerra-5.1/cinelerra/Makefile | 2 +- cinelerra-5.1/cinelerra/clippopup.C | 2 +- cinelerra-5.1/cinelerra/edl.C | 117 ++++++++++++++------------ cinelerra-5.1/cinelerra/edl.h | 31 ++++--- cinelerra-5.1/cinelerra/edl.inc | 48 +++++++++++ cinelerra-5.1/cinelerra/mwindow.h | 1 + cinelerra-5.1/cinelerra/mwindowedit.C | 33 ++++---- cinelerra-5.1/cinelerra/proxypopup.C | 2 +- cinelerra-5.1/cinelerra/shuttle.sed | 14 +-- cinelerra-5.1/cinelerra/track.C | 24 +++--- cinelerra-5.1/cinelerra/track.h | 6 +- cinelerra-5.1/cinelerra/tracks.h | 14 +-- cinelerra-5.1/cinelerra/tracksedit.C | 29 ++----- cinelerra-5.1/cinelerra/vwindow.C | 2 +- cinelerra-5.1/cinelerra/zoombar.C | 6 +- 15 files changed, 186 insertions(+), 145 deletions(-) diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index be86c3ce..ad888cf3 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -617,7 +617,7 @@ $(OBJDIR)/pluginlv2ui.o $(OBJDIR)/lv2ui.o: $(OBJDIR)/shuttle.o: shuttle.C shuttle_keys.h shuttle_keys.h: /usr/include/X11/keysymdef.h - sed < /usr/include/X11/keysymdef.h > shuttle_keys.h -f shuttle.sed + sed -n < /usr/include/X11/keysymdef.h > shuttle_keys.h -f shuttle.sed $(OBJDIR)/lv2ui: $(LV2OBJS) @echo $(CXX) \`cat $(OBJDIR)/c_flags\` $^ -o $@ diff --git a/cinelerra-5.1/cinelerra/clippopup.C b/cinelerra-5.1/cinelerra/clippopup.C index 03e07be7..595155c0 100644 --- a/cinelerra-5.1/cinelerra/clippopup.C +++ b/cinelerra-5.1/cinelerra/clippopup.C @@ -257,7 +257,7 @@ int ClipPopupCopy::handle_event() copy_edl->copy_all(edl); FileXML file; double start = 0, end = edl->tracks->total_length(); - copy_edl->copy(start, end, 1, &file, "", 1); + copy_edl->copy(COPY_EDL, start, end, &file, "", 1); copy_edl->remove_user(); const char *file_string = file.string(); long file_length = strlen(file_string); diff --git a/cinelerra-5.1/cinelerra/edl.C b/cinelerra-5.1/cinelerra/edl.C index ddda393d..8312c71e 100644 --- a/cinelerra-5.1/cinelerra/edl.C +++ b/cinelerra-5.1/cinelerra/edl.C @@ -336,7 +336,7 @@ int EDL::read_xml(FileXML *file, uint32_t load_flags) // The string is not terminated in this call. int EDL::save_xml(FileXML *file, const char *output_path) { - copy(1, file, output_path, 0); + copy(COPY_EDL, file, output_path, 0); return 0; } @@ -416,11 +416,8 @@ void EDL::copy_session(EDL *edl, int session_only) } } -int EDL::copy_assets(double start, - double end, - FileXML *file, - int all, - const char *output_path) +int EDL::copy_assets(int copy_flags, double start, double end, + FileXML *file, const char *output_path) { ArrayList asset_list; Track* current; @@ -430,12 +427,12 @@ int EDL::copy_assets(double start, file->append_newline(); // Copy everything for a save - if( all ) { + if( (copy_flags & COPY_ALL_ASSETS) ) { for( Asset *asset=assets->first; asset; asset=asset->next ) { asset_list.append(asset); } } - else { + if( (copy_flags & COPY_USED_ASSETS) ) { // Copy just the ones being used. for( current = tracks->first; current; current = NEXT ) { if( !current->record ) continue; @@ -456,67 +453,66 @@ int EDL::copy_assets(double start, } -int EDL::copy(double start, double end, int all, +int EDL::copy(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it) { file->tag.set_title("EDL"); file->tag.set_property("VERSION", CINELERRA_VERSION); // Save path for restoration of the project title from a backup. if( this->path[0] ) file->tag.set_property("PATH", path); - return copy(start, end, all, - "/EDL", file, output_path, rewind_it); + return copy_xml(copy_flags, start, end, file, "/EDL", output_path, rewind_it); } -int EDL::copy(int all, FileXML *file, const char *output_path, int rewind_it) +int EDL::copy(int copy_flags, FileXML *file, const char *output_path, int rewind_it) { - return copy(0, tracks->total_length(), all, file, output_path, rewind_it); + return copy(copy_flags, 0., tracks->total_length(), + file, output_path, rewind_it); } -int EDL::copy_clip(double start, double end, int all, +int EDL::copy_clip(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it) { file->tag.set_title("CLIP_EDL"); - return copy(start, end, all, - "/CLIP_EDL", file, output_path, rewind_it); + return copy_xml(copy_flags, start, end, file, "/CLIP_EDL", output_path, rewind_it); } -int EDL::copy_clip(int all, FileXML *file, const char *output_path, int rewind_it) +int EDL::copy_clip(int copy_flags, FileXML *file, const char *output_path, int rewind_it) { - return copy_clip(0, tracks->total_length(), all, file, output_path, rewind_it); + return copy_clip(copy_flags, 0., tracks->total_length(), + file, output_path, rewind_it); } -int EDL::copy_nested_edl(double start, double end, int all, +int EDL::copy_nested(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it) { file->tag.set_title("NESTED_EDL"); if( this->path[0] ) file->tag.set_property("PATH", path); - return copy(start, end, all, - "/NESTED_EDL", file, output_path, rewind_it); + return copy_xml(copy_flags, start, end, file, "/NESTED_EDL", output_path, rewind_it); } -int EDL::copy_nested_edl(int all, FileXML *file, const char *output_path, int rewind_it) +int EDL::copy_nested(int copy_flags, FileXML *file, const char *output_path, int rewind_it) { - return copy_nested_edl(0, tracks->total_length(), all, file, output_path, rewind_it); + return copy_nested(copy_flags, 0., tracks->total_length(), + file, output_path, rewind_it); } -int EDL::copy_vwindow_edl(double start, double end, int all, +int EDL::copy_vwindow(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it) { file->tag.set_title("VWINDOW_EDL"); - return copy(start, end, all, - "/VWINDOW_EDL", file, output_path, rewind_it); + return copy_xml(copy_flags, start, end, file, "/VWINDOW_EDL", output_path, rewind_it); } -int EDL::copy_vwindow_edl(int all, FileXML *file, const char *output_path, int rewind_it) +int EDL::copy_vwindow(int copy_flags, FileXML *file, const char *output_path, int rewind_it) { - return copy_vwindow_edl(0, tracks->total_length(), all, file, output_path, rewind_it); + return copy_vwindow(copy_flags, 0., tracks->total_length(), + file, output_path, rewind_it); } - -int EDL::copy(double start, double end, int all, - const char *closer, FileXML *file, - const char *output_path, int rewind_it) +int EDL::copy_xml(int copy_flags, double start, double end, + FileXML *file, const char *closer, const char *output_path, + int rewind_it) { file->append_tag(); file->append_newline(); // Set clipboard samples only if copying to clipboard - if( !all ) { + if( (copy_flags & COPY_LENGTH) ) { file->tag.set_title("CLIPBOARD"); file->tag.set_property("LENGTH", end - start); file->append_tag(); @@ -528,45 +524,54 @@ int EDL::copy(double start, double end, int all, //printf("EDL::copy 1\n"); // Sessions - local_session->save_xml(file, start); - -//printf("EDL::copy 1\n"); + if( (copy_flags & COPY_LOCAL_SESSION) ) + local_session->save_xml(file, start); // Top level stuff. -// if(!parent_edl) - { // Need to copy all this from child EDL if pasting is desired. -// Session + + if( (copy_flags & COPY_SESSION) ) session->save_xml(file); + + if( (copy_flags & COPY_VIDEO_CONFIG) ) session->save_video_config(file); + + if( (copy_flags & COPY_AUDIO_CONFIG) ) session->save_audio_config(file); + + if( (copy_flags & COPY_FOLDERS) ) folders.save_xml(file); - if( !parent_edl ) - copy_assets(start, end, file, all, output_path); + if( (copy_flags & (COPY_ALL_ASSETS | COPY_USED_ASSETS)) ) + copy_assets(copy_flags, start, end, file, output_path); + if( (copy_flags & COPY_NESTED_EDL) ) { for( int i=0; icopy_nested_edl(0, tracks->total_length(), 1, + nested_edls[i]->copy_nested(copy_flags, file, output_path, 0); - + } // Clips -// Don't want this if using clipboard - if( all ) { - for( int i=0; icopy_vwindow_edl(1, file, output_path, 0); + if( (copy_flags & COPY_CLIPS) ) { + for( int i=0; icopy_clip(copy_flags, file, output_path, 0); + } - for( int i=0; icopy_clip(1, file, output_path, 0); + if( (copy_flags & COPY_VWINDOWS) ) { + for( int i=0; icopy_vwindow(copy_flags, + file, output_path, 0); + } - mixers.save(file); - } + if( (copy_flags & COPY_MIXERS) ) + mixers.save(file); - file->append_newline(); - file->append_newline(); - } + file->append_newline(); + file->append_newline(); + + if( (copy_flags & COPY_LABELS) ) + labels->copy(start, end, file); - labels->copy(start, end, file); - tracks->copy(start, end, all, file, output_path); + tracks->copy(copy_flags, start, end, file, output_path); // terminate file file->tag.set_title(closer); diff --git a/cinelerra-5.1/cinelerra/edl.h b/cinelerra-5.1/cinelerra/edl.h index 22c9332c..f355b57a 100644 --- a/cinelerra-5.1/cinelerra/edl.h +++ b/cinelerra-5.1/cinelerra/edl.h @@ -107,21 +107,29 @@ public: void rechannel(); void resample(double old_rate, double new_rate, int data_type); - int copy(double start, double end, int all, + int copy(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it); - int copy(int all, FileXML *file, const char *output_path, int rewind_it); + int copy(int copy_flags, FileXML *file, const char *output_path, + int rewind_it); - int copy_clip(double start, double end, int all, + int copy_clip(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it); - int copy_clip(int all, FileXML *file, const char *output_path, int rewind_it); + int copy_clip(int copy_flags, FileXML *file, const char *output_path, + int rewind_it); - int copy_nested_edl(double start, double end, int all, + int copy_nested(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it); - int copy_nested_edl(int all, FileXML *file, const char *output_path, int rewind_it); + int copy_nested(int copy_flags, FileXML *file, const char *output_path, + int rewind_it); - int copy_vwindow_edl(double start, double end, int all, + int copy_vwindow(int copy_flags, double start, double end, FileXML *file, const char *output_path, int rewind_it); - int copy_vwindow_edl(int all, FileXML *file, const char *output_path, int rewind_it); + int copy_vwindow(int copy_flags, FileXML *file, const char *output_path, + int rewind_it); + + int copy_xml(int copy_flags, double start, double end, + FileXML *file, const char *closer, const char *output_path, + int rewind_it); void copy_tracks(EDL *edl); // Copies project path, folders, EDLSession, and LocalSession from edl argument. @@ -184,11 +192,8 @@ public: int edit_labels, int edit_plugins, int edit_autos); // Editing functions - int copy_assets(double start, double end, - FileXML *file, int all, const char *output_path); - int copy(double start, double end, int all, - const char *closer, FileXML *file, - const char *output_path, int rewind_it); + int copy_assets(int copy_flags, double start, double end, + FileXML *file, const char *output_path); void copy_indexables(EDL *edl); EDL *new_nested(EDL *edl, const char *path); EDL *create_nested_clip(EDL *nested); diff --git a/cinelerra-5.1/cinelerra/edl.inc b/cinelerra-5.1/cinelerra/edl.inc index 944d76c5..29c5ec3e 100644 --- a/cinelerra-5.1/cinelerra/edl.inc +++ b/cinelerra-5.1/cinelerra/edl.inc @@ -36,6 +36,54 @@ class EDL; #define LOAD_ASSETS 0x00000080 #define LOAD_SESSION 0x00000100 +// Copy flags +#define COPY_ALL 0x00000001 +#define COPY_LENGTH 0x00000002 +#define COPY_LOCAL_SESSION 0x00000004 +#define COPY_SESSION 0x00000008 +#define COPY_VIDEO_CONFIG 0x00000010 +#define COPY_AUDIO_CONFIG 0x00000020 +#define COPY_FOLDERS 0x00000040 +#define COPY_ALL_ASSETS 0x00000080 +#define COPY_USED_ASSETS 0x00000100 +#define COPY_NESTED_EDL 0x00000200 +#define COPY_CLIPS 0x00000400 +#define COPY_VWINDOWS 0x00000800 +#define COPY_MIXERS 0x00001000 +#define COPY_LABELS 0x00002000 +#define COPY_EDITS 0x00004000 +#define COPY_AUTOS 0x00008000 +#define COPY_PLUGINS 0x00010000 + +#define COPY_ALWAYS ( \ + COPY_LOCAL_SESSION | \ + COPY_SESSION | \ + COPY_VIDEO_CONFIG | \ + COPY_AUDIO_CONFIG | \ + COPY_FOLDERS | \ + COPY_NESTED_EDL ) + +#define COPY_TRACKS ( \ + COPY_EDITS | \ + COPY_AUTOS | \ + COPY_PLUGINS ) + +#define COPY_EDL ( \ + COPY_ALL | \ + COPY_ALWAYS | \ + COPY_ALL_ASSETS | \ + COPY_CLIPS | \ + COPY_VWINDOWS | \ + COPY_MIXERS | \ + COPY_LABELS | \ + COPY_TRACKS ) + +#define COPY_CLIPBOARD ( \ + COPY_LENGTH | \ + COPY_ALWAYS | \ + COPY_USED_ASSETS | \ + COPY_LABELS | \ + COPY_TRACKS ) #define EDITING_MODES 2 diff --git a/cinelerra-5.1/cinelerra/mwindow.h b/cinelerra-5.1/cinelerra/mwindow.h index ab2a5240..e2a0a73b 100644 --- a/cinelerra-5.1/cinelerra/mwindow.h +++ b/cinelerra-5.1/cinelerra/mwindow.h @@ -351,6 +351,7 @@ public: void clear_labels(); int clear_labels(double start, double end); void concatenate_tracks(); + int copy_flags(int copy_flags=COPY_CLIPBOARD); void copy(); int copy(double start, double end); void cut(); diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index 64c54eb1..c34513d3 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -421,6 +421,17 @@ void MWindow::concatenate_tracks() } +int MWindow::copy_flags(int copy_flags) +{ + if( !edl->session->labels_follow_edits ) + copy_flags &= ~COPY_LABELS; + if( !edl->session->autos_follow_edits ) + copy_flags &= ~COPY_AUTOS; + if( !edl->session->plugins_follow_edits ) + copy_flags &= ~COPY_PLUGINS; + return copy_flags; +} + void MWindow::copy() { copy(edl->local_session->get_selectionstart(), @@ -432,7 +443,7 @@ int MWindow::copy(double start, double end) if( start == end ) return 1; FileXML file; - edl->copy(start, end, 0, &file, "", 1); + edl->copy(copy_flags(), start, end, &file, "", 1); const char *file_string = file.string(); long file_length = strlen(file_string); gui->to_clipboard(file_string, file_length, BC_PRIMARY_SELECTION); @@ -1078,9 +1089,8 @@ void MWindow::selected_edits_to_clipboard(int packed) edl->session->autos_follow_edits, edl->session->plugins_follow_edits); if( !new_edl ) return; - double length = new_edl->tracks->total_length(); FileXML file; - new_edl->copy(0, length, 1, &file, "", 1); + new_edl->copy(COPY_EDL, &file, "", 1); const char *file_string = file.string(); long file_length = strlen(file_string); gui->to_clipboard(file_string, file_length, BC_PRIMARY_SELECTION); @@ -1490,7 +1500,7 @@ void MWindow::overwrite(EDL *source, int all) overwrite_len = dst_len; } - source->copy(src_start, src_start + overwrite_len, 0, &file, "", 1); + source->copy(copy_flags(), src_start, src_start + overwrite_len, &file, "", 1); // HACK around paste_edl get_start/endselection on its own // so we need to clear only when not using both io points @@ -1789,16 +1799,6 @@ int MWindow::paste_edls(ArrayList *new_edls, int load_mode, if( load_mode == LOADMODE_CONCATENATE || load_mode == LOADMODE_PASTE || load_mode == LOADMODE_NESTED ) { -//PRINT_TRACE - -// The point of this is to shift forward labels after the selection so they can -// then be shifted back to their original locations without recursively -// shifting back every paste. - if( (load_mode == LOADMODE_PASTE || load_mode == LOADMODE_NESTED) && - edl->session->labels_follow_edits ) - edl->labels->clear(edl->local_session->get_selectionstart(), - edl->local_session->get_selectionend(), 1); - Track *current = first_track ? first_track : edl->tracks->first; for( ; current; current=NEXT ) { if( current->record ) { @@ -1806,7 +1806,6 @@ int MWindow::paste_edls(ArrayList *new_edls, int load_mode, } } //PRINT_TRACE - } //PRINT_TRACE int destination_track = 0; @@ -2374,7 +2373,7 @@ void MWindow::splice(EDL *source, int all) src->outpoint_valid() ? src->get_outpoint() : src->inpoint_valid() ? source->tracks->total_length() : src->get_selectionend(); - source->copy(source_start, source_end, 1, &file, "", 1); + source->copy(COPY_EDL, source_start, source_end, &file, "", 1); //file.dump(); double start = edl->local_session->get_selectionstart(); //double end = edl->local_session->get_selectionend(); @@ -2478,7 +2477,7 @@ void MWindow::to_clip(EDL *edl, const char *txt, int all) } // Don't copy all since we don't want the clips twice. - edl->copy(start, end, 0, &file, "", 1); + edl->copy(copy_flags(), start, end, &file, "", 1); EDL *new_edl = new EDL(edl); new_edl->create_objects(); diff --git a/cinelerra-5.1/cinelerra/proxypopup.C b/cinelerra-5.1/cinelerra/proxypopup.C index db42404e..3c623273 100644 --- a/cinelerra-5.1/cinelerra/proxypopup.C +++ b/cinelerra-5.1/cinelerra/proxypopup.C @@ -222,7 +222,7 @@ int ProxyPopupCopy::handle_event() copy_edl->copy_all(edl); FileXML file; double start = 0, end = edl->tracks->total_length(); - copy_edl->copy(start, end, 1, &file, "", 1); + copy_edl->copy(COPY_EDL, start, end, &file, "", 1); copy_edl->remove_user(); const char *file_string = file.string(); long file_length = strlen(file_string); diff --git a/cinelerra-5.1/cinelerra/shuttle.sed b/cinelerra-5.1/cinelerra/shuttle.sed index 1996b8b6..d7648b33 100644 --- a/cinelerra-5.1/cinelerra/shuttle.sed +++ b/cinelerra-5.1/cinelerra/shuttle.sed @@ -1,5 +1,9 @@ -/^\#ifdef/p -/^\#endif/p -/^\#define/!d -s/^\#define // -s/^\([^[:space:]]*\).*$/{ "\1", \1 }, / +:n1 # just if these +s/^#ifdef XK_MISCELLANY\>.*//p; t n2 +s/^#ifdef XK_XKB_KEYS\>.*//p; t n2 +s/^#ifdef XK_LATIN1\>.*//p; t n2 +n; b n1 +:n2 # until endif +s/^#endif\>.*//p; t n1 +s/^#define \([^[:space:]]*\).*$/{ "\1", \1 }, /p +n; b n2 diff --git a/cinelerra-5.1/cinelerra/track.C b/cinelerra-5.1/cinelerra/track.C index a285f7f0..6bebe819 100644 --- a/cinelerra-5.1/cinelerra/track.C +++ b/cinelerra-5.1/cinelerra/track.C @@ -1059,10 +1059,8 @@ void Track::set_automation_mode(double selectionstart, -int Track::copy(double start, - double end, - FileXML *file, - const char *output_path) +int Track::copy(int copy_flags, double start, double end, + FileXML *file, const char *output_path) { // Use a copy of the selection in converted units // So copy_automation doesn't reconvert. @@ -1102,16 +1100,18 @@ int Track::copy(double start, // file->append_tag(); // file->append_newline(); - edits->copy(start_unit, end_unit, file, output_path); - - AutoConf auto_conf; - auto_conf.set_all(1); - automation->copy(start_unit, end_unit, file, 0, 0); + if( (copy_flags & COPY_EDITS) ) + edits->copy(start_unit, end_unit, file, output_path); + if( (copy_flags & COPY_AUTOS) ) { + AutoConf auto_conf; + auto_conf.set_all(1); + automation->copy(start_unit, end_unit, file, 0, 0); + } - for(int i = 0; i < plugin_set.total; i++) - { - plugin_set.values[i]->copy(start_unit, end_unit, file); + if( (copy_flags & COPY_PLUGINS) ) { + for( int i=0; icopy(start_unit, end_unit, file); } copy_derived(start_unit, end_unit, file); diff --git a/cinelerra-5.1/cinelerra/track.h b/cinelerra-5.1/cinelerra/track.h index d0950dc1..669b2db7 100644 --- a/cinelerra-5.1/cinelerra/track.h +++ b/cinelerra-5.1/cinelerra/track.h @@ -193,11 +193,9 @@ public: virtual int dump(FILE *fp); // ===================================== editing - int copy(double start, double end, + int copy(int copy_flags, double start, double end, FileXML *file, const char *output_path = ""); - int copy_assets(double start, - double end, - ArrayList *asset_list); + int copy_assets(double start, double end, ArrayList *asset_list); virtual int copy_derived(int64_t start, int64_t end, FileXML *file) { return 0; }; virtual int paste_derived(int64_t start, int64_t end, int64_t total_length, FileXML *file, int ¤t_channel) { return 0; }; diff --git a/cinelerra-5.1/cinelerra/tracks.h b/cinelerra-5.1/cinelerra/tracks.h index abcc0af4..b7cd63ac 100644 --- a/cinelerra-5.1/cinelerra/tracks.h +++ b/cinelerra-5.1/cinelerra/tracks.h @@ -160,18 +160,10 @@ public: void copy_from(Tracks *tracks); // ================================== EDL editing - int copy(double start, - double end, - int all, - FileXML *file, - const char *output_path = ""); - + int copy(int copy_flags, double start, double end, + FileXML *file, const char *output_path = ""); - - int copy_assets(FileXML *xml, - double start, - double end, - int all); + int copy_assets(int copy_flags, FileXML *xml, double start, double end); int blade(double position); int clear(double start, double end, int clear_plugins, int edit_autos); void clear_automation(double selectionstart, diff --git a/cinelerra-5.1/cinelerra/tracksedit.C b/cinelerra-5.1/cinelerra/tracksedit.C index 1129502a..5bda1f02 100644 --- a/cinelerra-5.1/cinelerra/tracksedit.C +++ b/cinelerra-5.1/cinelerra/tracksedit.C @@ -612,7 +612,7 @@ void Tracks::move_edits(ArrayList *in_edits, Track *track, double positio } FileXML track_xml; - source_track->copy(source_start, source_end, &track_xml, ""); + source_track->copy(COPY_TRACKS, source_start, source_end, &track_xml, ""); if( !track_xml.read_tag() ) clip_track->load(&track_xml, 0, LOAD_ALL); @@ -800,27 +800,16 @@ void Tracks::change_plugins(SharedLocation &old_location, SharedLocation &new_lo // =========================================== EDL editing -int Tracks::copy(double start, - double end, - int all, - FileXML *file, - const char *output_path) +int Tracks::copy(int copy_flags, double start, double end, + FileXML *file, const char *output_path) { -// nothing selected - if(start == end && !all) return 1; - - Track* current; - - for(current = first; - current; - current = NEXT) - { - if(current->record || all) - { - current->copy(start, end, file,output_path); - } + int all = (copy_flags & COPY_ALL) ? 1 : 0; +// if nothing selected + if( start == end && !all ) return 1; + for( Track *track=first; track; track=track->next ) { + if( track->record || all ) + track->copy(copy_flags, start, end, file, output_path); } - return 0; } diff --git a/cinelerra-5.1/cinelerra/vwindow.C b/cinelerra-5.1/cinelerra/vwindow.C index 0b75fc0c..7be15eb8 100644 --- a/cinelerra-5.1/cinelerra/vwindow.C +++ b/cinelerra-5.1/cinelerra/vwindow.C @@ -380,7 +380,7 @@ void VWindow::copy(int all) copy_edl->create_objects(); copy_edl->copy_all(edl); FileXML file; - copy_edl->copy(start, end, 0, &file, "", 1); + copy_edl->copy(COPY_CLIPBOARD, start, end, &file, "", 1); copy_edl->remove_user(); const char *file_string = file.string(); long file_length = strlen(file_string); diff --git a/cinelerra-5.1/cinelerra/zoombar.C b/cinelerra-5.1/cinelerra/zoombar.C index b6fd8521..e98f7002 100644 --- a/cinelerra-5.1/cinelerra/zoombar.C +++ b/cinelerra-5.1/cinelerra/zoombar.C @@ -361,7 +361,7 @@ int ZoomBar::set_selection(int which_one) SampleZoomPanel::SampleZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y) : ZoomPanel(mwindow, zoombar, mwindow->edl->local_session->zoom_sample, - x, y, 110, MIN_ZOOM_TIME, MAX_ZOOM_TIME, ZOOM_TIME) + x, y, 130, MIN_ZOOM_TIME, MAX_ZOOM_TIME, ZOOM_TIME) { this->mwindow = mwindow; this->zoombar = zoombar; @@ -375,7 +375,7 @@ int SampleZoomPanel::handle_event() AmpZoomPanel::AmpZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y) : ZoomPanel(mwindow, zoombar, mwindow->edl->local_session->zoom_y, - x, y, 80, MIN_AMP_ZOOM, MAX_AMP_ZOOM, ZOOM_LONG) + x, y, 100, MIN_AMP_ZOOM, MAX_AMP_ZOOM, ZOOM_LONG) { this->mwindow = mwindow; this->zoombar = zoombar; @@ -388,7 +388,7 @@ int AmpZoomPanel::handle_event() TrackZoomPanel::TrackZoomPanel(MWindow *mwindow, ZoomBar *zoombar, int x, int y) : ZoomPanel(mwindow, zoombar, mwindow->edl->local_session->zoom_track, - x, y, 70, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM, ZOOM_LONG) + x, y, 90, MIN_TRACK_ZOOM, MAX_TRACK_ZOOM, ZOOM_LONG) { this->mwindow = mwindow; this->zoombar = zoombar; -- 2.26.2