From e51e8d64881ef494548697203c82e5be8646cd4b Mon Sep 17 00:00:00 2001 From: Good Guy Date: Fri, 14 Dec 2018 15:27:45 -0700 Subject: [PATCH] exec bits, desktop icon props, noexecstack, attach transitions to selected edits, drop position fix, grab cursor reticle colors --- cinelerra-5.1/cinelerra/Makefile | 4 +- cinelerra-5.1/cinelerra/mwindowedit.C | 12 ++++ cinelerra-5.1/cinelerra/trackcanvas.C | 2 +- cinelerra-5.1/cinelerra/tracksedit.C | 67 ++++++++++-------- cinelerra-5.1/configure.ac | 22 +++++- cinelerra-5.1/guicast/bcwindowbase.C | 2 +- cinelerra-5.1/image/cin.desktop | 5 +- cinelerra-5.1/inst.sh | 6 +- cinelerra-5.1/plugin_config | 3 +- cinelerra-5.1/plugins/fonts/arial.ttf | Bin cinelerra-5.1/plugins/fonts/arialbd.ttf | Bin cinelerra-5.1/plugins/fonts/arialbi.ttf | Bin cinelerra-5.1/plugins/fonts/ariali.ttf | Bin cinelerra-5.1/plugins/fonts/cour.ttf | Bin cinelerra-5.1/plugins/fonts/courbd.ttf | Bin cinelerra-5.1/plugins/fonts/courbi.ttf | Bin cinelerra-5.1/plugins/fonts/couri.ttf | Bin cinelerra-5.1/plugins/fonts/l_10646.ttf | Bin cinelerra-5.1/plugins/fonts/lucon.ttf | Bin cinelerra-5.1/plugins/fonts/micross.ttf | Bin cinelerra-5.1/plugins/fonts/pala.ttf | Bin cinelerra-5.1/plugins/fonts/palab.ttf | Bin cinelerra-5.1/plugins/fonts/palabi.ttf | Bin cinelerra-5.1/plugins/fonts/palai.ttf | Bin cinelerra-5.1/plugins/fonts/symbol.ttf | Bin cinelerra-5.1/plugins/fonts/tahoma.ttf | Bin cinelerra-5.1/plugins/fonts/tahomabd.ttf | Bin cinelerra-5.1/plugins/fonts/times.ttf | Bin cinelerra-5.1/plugins/fonts/timesbd.ttf | Bin cinelerra-5.1/plugins/fonts/timesbi.ttf | Bin cinelerra-5.1/plugins/fonts/timesi.ttf | Bin cinelerra-5.1/plugins/fonts/trebuc.ttf | Bin cinelerra-5.1/plugins/fonts/trebucbd.ttf | Bin cinelerra-5.1/plugins/fonts/trebucbi.ttf | Bin cinelerra-5.1/plugins/fonts/trebucit.ttf | Bin cinelerra-5.1/plugins/fonts/wingding.ttf | Bin .../theme_blue_dot/data/editpanelW_dn.png | Bin .../theme_blue_dot/data/editpanelW_hi.png | Bin .../theme_blue_dot/data/editpanelW_up.png | Bin .../theme_blue_dot/data/file_delete_up.png | Bin .../theme_blue_dot/data/file_reload_up.png | Bin 41 files changed, 80 insertions(+), 43 deletions(-) mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/arial.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/arialbd.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/arialbi.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/ariali.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/cour.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/courbd.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/courbi.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/couri.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/l_10646.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/lucon.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/micross.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/pala.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/palab.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/palabi.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/palai.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/symbol.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/tahoma.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/tahomabd.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/times.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/timesbd.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/timesbi.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/timesi.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/trebuc.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/trebucbd.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/trebucbi.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/trebucit.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/fonts/wingding.ttf mode change 100755 => 100644 cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_dn.png mode change 100755 => 100644 cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_hi.png mode change 100755 => 100644 cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_up.png mode change 100755 => 100644 cinelerra-5.1/plugins/theme_blue_dot/data/file_delete_up.png mode change 100755 => 100644 cinelerra-5.1/plugins/theme_blue_dot/data/file_reload_up.png diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index e9d67aa5..43c66e8f 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -500,14 +500,14 @@ LDFLAGS1 = \ LDFLAGS2 = -lcpml -lcxxstdma_rh60 -lcxxma_rh60 -lc -lots \ `expr /usr/lib/compaq/cxx-*/alpha-linux/`bin/crtend.o \ `expr /usr/lib/compaq/cxx-*/alpha-linux/`bin/crtn.o --no-demangle \ - --warn-once + --warn-once $(LDFLAGS) LINKER = ld -o $(OUTPUT) CFLAGS += -DUSE_ALPHA else LDFLAGS1 = -Wl,-export-dynamic -g -LDFLAGS2 = +LDFLAGS2 = $(LDFLAGS) LINKER = $(CXX) -o $(OUTPUT) endif diff --git a/cinelerra-5.1/cinelerra/mwindowedit.C b/cinelerra-5.1/cinelerra/mwindowedit.C index efe891df..1e1bd0cd 100644 --- a/cinelerra-5.1/cinelerra/mwindowedit.C +++ b/cinelerra-5.1/cinelerra/mwindowedit.C @@ -906,14 +906,21 @@ void MWindow::match_output_size(Track *track) void MWindow::selected_to_clipboard(int packed) { int64_t start = INT64_MAX, end = -INT64_MAX, pos = 0; + Track *first_track=0, *last_track = 0; for( Track *track=edl->tracks->first; track; track=track->next ) { if( !track->record ) continue; + int empty = 1; for( Edit *edit=track->edits->first; edit; edit=edit->next ) { if( !edit->is_selected || edit->silence() ) continue; if( start > (pos=edit->startproject) ) start = pos; if( end < (pos+=edit->length) ) end = pos; + empty = 0; } + if( empty ) continue; + if( !first_track ) first_track = track; + last_track = track; } + if( !first_track ) return; EDL *new_edl = new EDL(); new_edl->create_objects(); new_edl->copy_session(edl); @@ -925,6 +932,10 @@ void MWindow::selected_to_clipboard(int packed) new_edl->session->audio_tracks = 0; for( Track *track=edl->tracks->first; track; track=track->next ) { if( !track->record ) continue; + if( first_track ) { + if( first_track != track ) continue; + first_track = 0; + } Track *new_track = 0; if( !packed ) new_track = new_edl->add_new_track(track->data_type); @@ -953,6 +964,7 @@ void MWindow::selected_to_clipboard(int packed) new_track->edits->append(clip_edit); } } + if( last_track == track ) break; } double length = new_edl->tracks->total_length(); FileXML file; diff --git a/cinelerra-5.1/cinelerra/trackcanvas.C b/cinelerra-5.1/cinelerra/trackcanvas.C index 9d020d42..fced464b 100644 --- a/cinelerra-5.1/cinelerra/trackcanvas.C +++ b/cinelerra-5.1/cinelerra/trackcanvas.C @@ -553,7 +553,7 @@ int64_t TrackCanvas::drop_edit_position(int *is_insertion, Edit *moved_edit, int Edit *last_edit = track->edits->last; if( !last_edit || edit_position >= (last_edit->startproject+last_edit->length) ) { *is_insertion = 0; - return grab_position; + return edit_position; } int64_t drop_start = 0, drop_end = 0; // drop zone boundries diff --git a/cinelerra-5.1/cinelerra/tracksedit.C b/cinelerra-5.1/cinelerra/tracksedit.C index 4a836b96..6655eb8e 100644 --- a/cinelerra-5.1/cinelerra/tracksedit.C +++ b/cinelerra-5.1/cinelerra/tracksedit.C @@ -408,38 +408,45 @@ void Tracks::set_transition_length(Transition *transition, double length) void Tracks::paste_transitions(double start, double end, int track_type, char* title) { - for(Track *current_track = first; - current_track; - current_track = current_track->next) - { - if(current_track->record && current_track->data_type == track_type) - { - int64_t start_units = current_track->to_units(start, 0); - int64_t end_units = current_track->to_units(end, 0); - if( start_units == end_units ) { - for( Edit *current_edit = current_track->edits->first; - current_edit; current_edit = current_edit->next) { - int64_t edit_start = current_edit->startproject; - int64_t edit_end = edit_start + current_edit->length; - if( edit_start > start_units ) continue; - if( start_units == current_track->edits->length() ) { - double length = edl->session->default_transition_length; - int64_t units = current_track->to_units(length, 1); - current_edit = current_track->edits-> - create_silence(start_units, start_units+units); - } - else if( start_units >= edit_end ) continue; - current_edit->insert_transition(title); + int count = 0; + for( Track *track=first; track; track=track->next ) { + if( !track->record || track->data_type != track_type ) continue; + for( Edit *edit=track->edits->first; edit; edit=edit->next ) { + if( !edit->is_selected ) continue; + edit->insert_transition(title); + ++count; + } + } + if( count > 0 ) { + clear_selected_edits(); + return; + } + + for( Track *track=first; track; track=track->next ) { + if( !track->record || track->data_type != track_type ) continue; + int64_t start_units = track->to_units(start, 0); + int64_t end_units = track->to_units(end, 0); + if( start_units == end_units ) { + for( Edit *edit = track->edits->first; edit; edit = edit->next) { + int64_t edit_start = edit->startproject; + int64_t edit_end = edit_start + edit->length; + if( edit_start > start_units ) continue; + if( start_units == track->edits->length() ) { + double length = edl->session->default_transition_length; + int64_t units = track->to_units(length, 1); + edit = track->edits-> + create_silence(start_units, start_units+units); } + else if( start_units >= edit_end ) continue; + edit->insert_transition(title); } - else { - for( Edit *current_edit = current_track->edits->first; - current_edit; current_edit = current_edit->next) { - int64_t edit_start = current_edit->startproject; - if( !edit_start ) continue; - if( edit_start >= start_units && edit_start < end_units ) { - current_edit->insert_transition(title); - } + } + else { + for( Edit *edit=track->edits->first; edit; edit=edit->next) { + int64_t edit_start = edit->startproject; + if( !edit_start ) continue; + if( edit_start >= start_units && edit_start < end_units ) { + edit->insert_transition(title); } } } diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index 0bc0a38c..32e0aa17 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -27,6 +27,8 @@ CFG_CFLAGS+=" -I/usr/include/freetype2 -I/usr/local/include/freetype2" CFG_CFLAGS+=" -I/usr/include/uuid -I/usr/local/include/uuid" CFG_CFLAGS+=" -I/usr/include/mjpegtools -I/usr/local/include/mjpegtools" +CFG_LDFLAGS+=" -z noexecstack" + AC_DEFUN([CHECK_WITH], [ AC_ARG_WITH([$1], AC_HELP_STRING([--with-[$1]], [$2 ($4)]), @@ -919,6 +921,16 @@ echo "else" echo "CFLAGS_ := ${CFLAGS:--g -O2}" echo "endif" echo "endif" +echo "ifndef CXXFLAGS_" +echo "ifdef CXXFLAGS" +echo "CXXFLAGS_ := \$(CXXFLAGS)" +echo "endif" +echo "endif" +echo "ifndef LDFLAGS_" +echo "ifdef LDFLAGS" +echo "LDFLAGS_ := \$(LDFLAGS)" +echo "endif" +echo "endif" echo "CFLAGS := \$(CFLAGS_)" echo "CFLAGS += '-DCIN=\"\$(WANT_CIN)\"'" @@ -931,8 +943,14 @@ echo "CFLAGS += '-DLADSPA_DIR=\"$WANT_LADSPA_DIR\"'" echo "CFLAGS += '-DCIN_BROWSER=\"$WANT_CIN_BROWSER\"'" for flg in $CFG_CFLAGS; do echo "CFLAGS += $flg"; done echo "" -for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done -echo "" +if test "x$CFG_CXXFLAGS" != "x"; then + for flg in $CFG_CXXFLAGS; do echo "CXXFLAGS += $flg"; done + echo "" +fi +if test "x$CFG_LDFLAGS" != "x" ; then + echo "LDFLAGS +=$CFG_LDFLAGS" + echo "" +fi if test "x$WANT_X264_HIDEPTH" = "xyes" ; then X264_CFG_PARAMS="$X264_CFG_PARAMS --bit-depth=10" diff --git a/cinelerra-5.1/guicast/bcwindowbase.C b/cinelerra-5.1/guicast/bcwindowbase.C index 1ef0d593..0194a758 100644 --- a/cinelerra-5.1/guicast/bcwindowbase.C +++ b/cinelerra-5.1/guicast/bcwindowbase.C @@ -2249,7 +2249,7 @@ Cursor BC_WindowBase::create_grab_cursor() XColor fc, bc; fc.flags = bc.flags = DoRed | DoGreen | DoBlue; fc.red = 0xffff; fc.green = fc.blue = 0; // fg - bc.red = bc.green = bc.blue = 0x0000; // bg + bc.red = 0xffff; bc.green = 0xffff; bc.blue = 0x0000; // bg Cursor cursor = XCreatePixmapCursor(display, img_xpm,msk_xpm, &fc,&bc, iw2,ih2); XFreePixmap(display, img_xpm); XFreePixmap(display, msk_xpm); diff --git a/cinelerra-5.1/image/cin.desktop b/cinelerra-5.1/image/cin.desktop index 181a6875..3ccfb7ae 100644 --- a/cinelerra-5.1/image/cin.desktop +++ b/cinelerra-5.1/image/cin.desktop @@ -2,9 +2,8 @@ Name=cin Comment=MultiMedia Editor Comment[fr]=Éditeur multimédia -Categories=Application;AudioVideo;Multimedia;VideoEditing; -Encoding=UTF-8 +Categories=AudioVideo;AudioVideoEditing;X-Multimedia; Exec=cin -Icon=cin.svg +Icon=cin Terminal=false Type=Application diff --git a/cinelerra-5.1/inst.sh b/cinelerra-5.1/inst.sh index bbfee547..e7a20c4c 100755 --- a/cinelerra-5.1/inst.sh +++ b/cinelerra-5.1/inst.sh @@ -3,12 +3,12 @@ cr=' ' dir="$1"; shift 1 -$mkinstalldirs "$dir" +mkdir -p "$dir" if [ "$*" = "*" ]; then exit; fi for f in "$@"; do - if [ -f "$f" ]; then $install_sh -c "$f" "$dir"; continue; fi + if [ -f "$f" ]; then ( umask 755; cp "$f" "$dir" ); continue; fi if [ -d "$f" ]; then ( cd $f; $inst_sh "$dir/$f" * ) - else echo "*** Error - install $f in $dir failed." 1>&2; exit 1; fi + else echo "*** Error - inst.sh $f in $dir failed." 1>&2; exit 1; fi done diff --git a/cinelerra-5.1/plugin_config b/cinelerra-5.1/plugin_config index 0ee88a45..56f43511 100644 --- a/cinelerra-5.1/plugin_config +++ b/cinelerra-5.1/plugin_config @@ -3,6 +3,7 @@ CFLAGS += -I../ -I$(CINELERRA) -I$(GUICAST) -I../colors -fPIC CFLAGS += $(static_incs) LFLAGS += $(static_libs) +LFLAGS += $(LDFLAGS) LDLINKER ?= $(CXX) -shared $(shell mkdir -p $(OBJDIR)) @@ -26,7 +27,7 @@ else THEME_DATA = $(OBJDIR)/$(PLUGIN)_data.o $(OUTPUT_THEME): $(OBJS) $(OUTPUT_DIR) $(THEME_DATA) - $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA) + $(LDLINKER) -o $(OUTPUT_THEME) $(OBJS) $(THEME_DATA) $(LDFLAGS) $(if $(findstring -g,$(CFLAGS)),objcopy --only-keep-debug $(OUTPUT_THEME) $(OUTPUT_G)) $(if $(findstring -ggdb,$(CFLAGS)),,strip $(OUTPUT_THEME)) diff --git a/cinelerra-5.1/plugins/fonts/arial.ttf b/cinelerra-5.1/plugins/fonts/arial.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/arialbd.ttf b/cinelerra-5.1/plugins/fonts/arialbd.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/arialbi.ttf b/cinelerra-5.1/plugins/fonts/arialbi.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/ariali.ttf b/cinelerra-5.1/plugins/fonts/ariali.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/cour.ttf b/cinelerra-5.1/plugins/fonts/cour.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/courbd.ttf b/cinelerra-5.1/plugins/fonts/courbd.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/courbi.ttf b/cinelerra-5.1/plugins/fonts/courbi.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/couri.ttf b/cinelerra-5.1/plugins/fonts/couri.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/l_10646.ttf b/cinelerra-5.1/plugins/fonts/l_10646.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/lucon.ttf b/cinelerra-5.1/plugins/fonts/lucon.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/micross.ttf b/cinelerra-5.1/plugins/fonts/micross.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/pala.ttf b/cinelerra-5.1/plugins/fonts/pala.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/palab.ttf b/cinelerra-5.1/plugins/fonts/palab.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/palabi.ttf b/cinelerra-5.1/plugins/fonts/palabi.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/palai.ttf b/cinelerra-5.1/plugins/fonts/palai.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/symbol.ttf b/cinelerra-5.1/plugins/fonts/symbol.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/tahoma.ttf b/cinelerra-5.1/plugins/fonts/tahoma.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/tahomabd.ttf b/cinelerra-5.1/plugins/fonts/tahomabd.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/times.ttf b/cinelerra-5.1/plugins/fonts/times.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/timesbd.ttf b/cinelerra-5.1/plugins/fonts/timesbd.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/timesbi.ttf b/cinelerra-5.1/plugins/fonts/timesbi.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/timesi.ttf b/cinelerra-5.1/plugins/fonts/timesi.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/trebuc.ttf b/cinelerra-5.1/plugins/fonts/trebuc.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/trebucbd.ttf b/cinelerra-5.1/plugins/fonts/trebucbd.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/trebucbi.ttf b/cinelerra-5.1/plugins/fonts/trebucbi.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/trebucit.ttf b/cinelerra-5.1/plugins/fonts/trebucit.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/fonts/wingding.ttf b/cinelerra-5.1/plugins/fonts/wingding.ttf old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_dn.png b/cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_dn.png old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_hi.png b/cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_hi.png old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_up.png b/cinelerra-5.1/plugins/theme_blue_dot/data/editpanelW_up.png old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/file_delete_up.png b/cinelerra-5.1/plugins/theme_blue_dot/data/file_delete_up.png old mode 100755 new mode 100644 diff --git a/cinelerra-5.1/plugins/theme_blue_dot/data/file_reload_up.png b/cinelerra-5.1/plugins/theme_blue_dot/data/file_reload_up.png old mode 100755 new mode 100644 -- 2.26.2