2022-09-13 Fred Gleason <fredg@paravelsystems.com>

* Modified the Button Log widget in rdairplay(1) so as to display
	cut-level attributes only after the definitive cut has been selected.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2022-09-13 11:58:34 -04:00
parent 8c8581c86e
commit cd8ee0c85d
3 changed files with 47 additions and 23 deletions

View File

@@ -23293,3 +23293,6 @@
2022-09-13 Fred Gleason <fredg@paravelsystems.com>
* Fixed a bug in rdlibrary(1) that ccould cause the waveform display
in the 'Edit Audio' dialog to truncate the end of the waveform.
2022-09-13 Fred Gleason <fredg@paravelsystems.com>
* Modified the Button Log widget in rdairplay(1) so as to display
cut-level attributes only after the definitive cut has been selected.

View File

@@ -2,7 +2,7 @@
//
// A container class for a Rivendell Log Line.
//
// (C) Copyright 2002-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2002-2022 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -1742,7 +1742,7 @@ QString RDLogLine::resolveWildcards(QString pattern,int log_id)
}
//
// Resolve Wildcards
// Cart level attributes
//
pattern.replace("%a",artist());
pattern.replace("%b",label());
@@ -1752,26 +1752,50 @@ QString RDLogLine::resolveWildcards(QString pattern,int log_id)
// %f [unassigned]
pattern.replace("%g",groupName());
pattern.replace("%h",QString::asprintf("%d",effectiveLength()));
pattern.replace("%i",description());
pattern.replace("%j",QString::asprintf("%03d",cutNumber()));
pattern.replace("%k",start_time);
pattern.replace("%K",end_time);
pattern.replace("%l",album());
pattern.replace("%m",composer());
pattern.replace("%n",QString::asprintf("%06u",cartNumber()));
pattern.replace("%o",outcue());
pattern.replace("%p",publisher());
pattern.replace("%q",start_date);
pattern.replace("%Q",end_date);
pattern.replace("%r",conductor());
pattern.replace("%s",songId());
pattern.replace("%t",title());
pattern.replace("%u",userDefined());
pattern.replace("%v",QString::asprintf("%d",effectiveLength()/1000));
pattern.replace("%wc",isci());
pattern.replace("%wi",isrc());
pattern.replace("%wm",recordingMbId());
pattern.replace("%wr",releaseMbId());
//
// Cut-level attributes
// Resolve only if we have actually selected a cut.
//
if((log_status==RDLogLine::Scheduled)||
(log_status==RDLogLine::Auditioning)) {
pattern.replace("%i","");
pattern.replace("%j","");
pattern.replace("%o","");
pattern.replace("%q","");
pattern.replace("%Q","");
pattern.replace("%k","");
pattern.replace("%K","");
pattern.replace("%wc","");
pattern.replace("%wi","");
pattern.replace("%wm","");
pattern.replace("%wr","");
}
else {
pattern.replace("%i",description());
pattern.replace("%j",QString::asprintf("%03d",cutNumber()));
pattern.replace("%o",outcue());
pattern.replace("%q",start_date);
pattern.replace("%Q",end_date);
pattern.replace("%k",start_time);
pattern.replace("%K",end_time);
pattern.replace("%wc",isci());
pattern.replace("%wi",isrc());
pattern.replace("%wm",recordingMbId());
pattern.replace("%wr",releaseMbId());
}
//
// Log-based attributes
//
if(log_id<0) {
pattern.replace("%x",QString::asprintf("%d",id()));
}

View File

@@ -195,7 +195,6 @@ LogLineBox::LogLineBox(RDAirPlayConf *conf,QWidget *parent)
line_outcue_label=new QLabel(this);
line_outcue_label->setPalette(line_text_palette);
line_outcue_label->setFont(outcue_font);
line_outcue_label->hide();
//
// Artist
@@ -408,14 +407,12 @@ void LogLineBox::setMode(LogLineBox::Mode mode)
void LogLineBox::setStatus(RDLogLine::Status status)
{
switch(status) {
case RDLogLine::Scheduled:
line_outcue_label->hide();
break;
default:
line_outcue_label->show();
break;
if((status==RDLogLine::Scheduled)||
(status==RDLogLine::Auditioning)) {
line_cut_label->hide();
}
else {
line_cut_label->show();
}
line_status=status;
}
@@ -737,13 +734,13 @@ void LogLineBox::clear()
SetPalette(line_default_palette,Qt::black);
line_cart_label->setText("");
line_cut_label->setText("");
line_cut_label->hide();
line_group_label->setText("");
line_trans_label->setText("");
line_title_label->setText("");
line_description_label->setText("");
line_artist_label->setText("");
line_outcue_label->setText("");
line_outcue_label->hide();
line_comment_label->setText("");
line_time_label->setText("");
line_talktime_label->setText("");