X-Git-Url: https://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fcinelerra%2Fcommercials.C;h=3011e329024b4e43310849933bf71424530aad96;hb=HEAD;hp=3a3de58615e59836ad0e5a830c1623644a3a33e5;hpb=7fd85fb66168f6b518c5f2d73e04036e87faa0e1;p=goodguy%2Fcinelerra.git diff --git a/cinelerra-5.1/cinelerra/commercials.C b/cinelerra-5.1/cinelerra/commercials.C index 3a3de586..3011e329 100644 --- a/cinelerra-5.1/cinelerra/commercials.C +++ b/cinelerra-5.1/cinelerra/commercials.C @@ -1,3 +1,22 @@ +/* + * CINELERRA + * Copyright (C) 2016-2020 William Morrow + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ #include "arraylist.h" #include "asset.h" @@ -164,7 +183,7 @@ put_clip(File *file, int track, double position, double length) clip_id = mdb->clip_id(); cancelled = 0; - scan_status = new ScanStatus(this, 30, 30, 1, 1, + scan_status = new ScanStatus(this, xS(30), yS(30), 1, 1, cancelled, _("Cutting Ads")); scan_status->update_length(0, frames); scan_status->update_position(0, 0); @@ -551,7 +570,7 @@ scan_audio(int vstream, double start, double end) Tracks *tracks = mwindow->edl->tracks; for(Track *atrk=tracks->first; !cancelled && atrk; atrk=atrk->next) { if( atrk->data_type != TRACK_AUDIO ) continue; - if( !atrk->record ) continue; + if( !atrk->is_armed() ) continue; Edits *edits = atrk->edits; Edit *next = 0; for( Edit *edit=edits->first; !cancelled && edit; edit=next ) { next = edit->next; @@ -574,7 +593,7 @@ int Commercials:: scan_media() { cancelled = 0; - scan_status = new ScanStatus(this, 30, 30, 2, 2, + scan_status = new ScanStatus(this, xS(30), yS(30), 2, 2, cancelled, _("Cutting Ads")); if( !openDb() ) { scan_video(); @@ -592,7 +611,7 @@ scan_video() Tracks *tracks = mwindow->edl->tracks; for( Track *vtrk=tracks->first; !cancelled && vtrk; vtrk=vtrk->next) { if( vtrk->data_type != TRACK_VIDEO ) continue; - if( !vtrk->record ) continue; + if( !vtrk->is_armed() ) continue; Edits *edits = vtrk->edits; Edit *next = 0; for( Edit *edit=edits->first; !cancelled && edit; edit=next ) { next = edit->next; @@ -697,11 +716,11 @@ update_status(int clip, double start, double end) ScanStatusGUI:: ScanStatusGUI(ScanStatus *sswindow, int x, int y, int nlines, int nbars) - : BC_Window(_("Scanning"), x, y, 340, - 40 + BC_CancelButton::calculate_h() + + : BC_Window(_("Scanning"), x, y, xS(340), + yS(40) + BC_CancelButton::calculate_h() + (BC_Title::calculate_h((BC_WindowBase*) sswindow-> - commercials->mwindow->gui, _("My")) + 5) * nlines + - (BC_ProgressBar::calculate_h() + 5) * nbars, 0, 0, 0) + commercials->mwindow->gui, _("My")) + yS(5)) * nlines + + (BC_ProgressBar::calculate_h() + yS(5)) * nbars, 0, 0, 0) { this->sswindow = sswindow; this->nlines = nlines; @@ -720,16 +739,18 @@ ScanStatusGUI:: void ScanStatusGUI:: create_objects(const char *text) { + int xs10 = xS(10), xs20 = xS(20); + int ys5 = yS(5), ys10 = yS(10); lock_window("ScanStatusGUI::create_objects"); - int x = 10, y = 10; + int x = xs10, y = ys10; int dy = BC_Title::calculate_h((BC_WindowBase*) sswindow-> - commercials->mwindow->gui, "My") + 5; + commercials->mwindow->gui, "My") + ys5; for( int i=0; i