FreeburnTrackDialog.cpp
上传用户:cnxinhai
上传日期:2013-08-06
资源大小:265k
文件大小:22k
- /* This is the class definition for the Track Editor Dialog.
- *
- * Copyright (C) 2001, 2002 Adam Schlag
- */
- /*
- * FreeBurn Software License
- * (based on the Apache Software License)
- *
- * Version 1.1
- *
- * Copyright (c) 2001, 2002 The FreeBurn Project. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. The end-user documentation included with the redistribution, if any, must
- * include the following acknowledgment:
- *
- * "This product includes software developed by the FreeBurn
- * Project (http://freeburn.sourceforge.net/)."
- *
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "FreeBurn" and "FreeBurn Project" must not be
- * used to endorse or promote products derived from this software
- * without prior written permission. For written permission, please
- * contact aschlag@users.sourceforge.net.
- *
- * 5. Products derived from this software may not be called "FreeBurn",
- * nor may "FreeBurn" appear in their name, without prior written
- * permission of the FreeBurn Project.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE FREEBURN PROJECT OR ITS
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the FreeBurn Project. For more
- * information on the FreeBurn Project and FreeBurn, please see
- * <http://freeburn.sourceforge.net/>.
- *
- * This software is distributed with software that is released under the GNU
- * General Public License (GPL). You can find the terms of this license in the
- * file GPL.txt distributed in this package. You can find information on the
- * software distributed with this package in the file PROGRAMS.txt.
- */
- #include <fx.h>
- #include <FXPNGIcon.h>
- #include "FreeburnDefs.h"
- #include "FreeburnTrack.h"
- #include "FreeburnDisc.h"
- #include "FreeburnTrackDialog.h"
- #include "FreeburnTrackDialogText.h"
- #include "FreeburnTrackTextDialog.h"
- // we also want to borrow some of the text from FreeburnText.h
- #include "FreeburnText.h"
- // Message Map for FreeburnTrackDialog class
- FXDEFMAP(CFreeburnTrackDialog) CFreeburnTrackDialogMap[]={
- //________Message_Type_____________________ID________________________________Message_Handler________________
- FXMAPFUNC(SEL_COMMAND, CFreeburnTrackDialog::ID_EDIT_TRACK_TEXT, CFreeburnTrackDialog::onCmdEditTrackText),
- };
- FXIMPLEMENT(CFreeburnTrackDialog,FXDialogBox,CFreeburnTrackDialogMap,ARRAYNUMBER(CFreeburnTrackDialogMap))
- // Construct help dialog box
- CFreeburnTrackDialog::CFreeburnTrackDialog(FXWindow* owner, CFreeburnDisc* mainDisc):
- FXDialogBox(owner, fbTrackDialogTitleText,DECOR_TITLE|DECOR_BORDER, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4)
- {
- // assign the disc pointer
- m_disc = mainDisc;
-
- // temporary int to hold the disc type
- FXint discType = m_disc->discType();
-
- // set up the track type and target
- switch(m_disc->activeTrackMode())
- {
- case AUDIO:
- m_trackMode = AUDIO_TRACK;
- break;
- case MODE_1:
- m_trackMode = MODE1_DATA_TRACK;
- break;
- case MODE_1_RAW:
- m_trackMode = MODE1_RAW;
- break;
- case MODE_2_FORM_1:
- m_trackMode = MODE2_DATA_TRACK;
- break;
- case MODE_2_FORM_2:
- m_trackMode = MODE2_AUDIO_TRACK;
- break;
- case MODE_2_RAW:
- m_trackMode = MODE2_RAW;
- break;
- }
- m_trackModeTarget.connect(m_trackMode);
-
- // set up the main container for the dialog
- FXVerticalFrame* mainTrackFrame = new FXVerticalFrame(this, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y);
-
- // add the title label
- new FXLabel(mainTrackFrame, fbTrackDialogTitleLabelText, NULL, LAYOUT_LEFT);
-
- // add a horizontal ridge separator
- new FXHorizontalSeparator(mainTrackFrame, SEPARATOR_RIDGE|LAYOUT_FILL_X);
-
- // create the popup for the track mode option menu
- m_trackModePopup = new FXPopup(this);
- // only create options for the popup for the data types that we can switch to
- if (discType == CD_DA)
- {
- new FXOption(m_trackModePopup, fbAudioTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+AUDIO_TRACK, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- }
- else if (discType == CD_ROM)
- {
- new FXOption(m_trackModePopup, fbAudioTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE1_AUDIO_TRACK, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackModePopup, fbDataTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE1_DATA_TRACK, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackModePopup, fbRawDataTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE1_RAW, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- }
- else if (discType == CDROM_XA)
- {
- new FXOption(m_trackModePopup, fbAudioTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE2_AUDIO, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackModePopup, fbMode2DataTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE2_DATA_TRACK, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackModePopup, fbMode2AudioTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE2_AUDIO_TRACK, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackModePopup, fbMode2RawTrackOptionText, NULL, &m_trackModeTarget,
- FXDataTarget::ID_OPTION+MODE2_RAW, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- }
-
- // add the label and option menu for the track mode, and set the option menu to be
- // the current track mode
- FXHorizontalFrame* rowOne = new FXHorizontalFrame(mainTrackFrame, LAYOUT_FILL_X);
- new FXLabel(rowOne, fbTrackDialogTrackModeLabelText, NULL);
- FXOptionMenu* trackModeOptions = new FXOptionMenu(rowOne, m_trackModePopup,
- LAYOUT_TOP|FRAME_RAISED|FRAME_THICK|JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- trackModeOptions->setTarget(&m_trackModeTarget);
- trackModeOptions->setSelector(FXDataTarget::ID_VALUE);
-
- // set the copy mode and pre-emphasis mode variables and data targets
- if (m_disc->activeTrackCopyMode() == COPY)
- m_copyMode = TRUE;
- else
- m_copyMode = FALSE;
- m_copyModeTarget.connect(m_copyMode);
-
- if (m_disc->activeTrackPreEmphMode() == PRE_EMPHASIS)
- m_preEmphMode = TRUE;
- else
- m_preEmphMode = FALSE;
- m_preEmphModeTarget.connect(m_preEmphMode);
-
- // create a horizontal frame to hold the checkbox matrix and the cd text button
- FXHorizontalFrame* optionsFrame = new FXHorizontalFrame(mainTrackFrame, LAYOUT_FILL_X);
-
- // create a matrix to hold the next couple of rows
- FXMatrix* checkMatrix = new FXMatrix(optionsFrame, 2, MATRIX_BY_COLUMNS|PACK_UNIFORM_HEIGHT);
-
- // add check buttons for the copy and pre-emphasis states
- new FXCheckButton(checkMatrix, fbTrackDialogCopyModeLabelText, &m_copyModeTarget,
- FXDataTarget::ID_VALUE, ICON_BEFORE_TEXT);
- new FXCheckButton(checkMatrix, fbTrackDialogPreEmphModeLabelText, &m_preEmphModeTarget,
- FXDataTarget::ID_VALUE, ICON_BEFORE_TEXT);
-
- // set the 2 and 4 channel audio mode variables and data targets
- m_twoTrackMode = m_disc->activeTrackTwoChannelAudio();
- m_fourTrackMode = m_disc->activeTrackFourChannelAudio();
- m_twoTrackModeTarget.connect(m_twoTrackMode);
- m_fourTrackModeTarget.connect(m_fourTrackMode);
-
- // add check buttons for the two and four channel modes
- new FXCheckButton(checkMatrix, fbTrackDialogTwoChannelLabelText, &m_twoTrackModeTarget,
- FXDataTarget::ID_VALUE, ICON_BEFORE_TEXT);
- new FXCheckButton(checkMatrix, fbTrackDialogFourChannelLabelText, &m_fourTrackModeTarget,
- FXDataTarget::ID_VALUE, ICON_BEFORE_TEXT);
-
- // add a button to edit the CD Text
- FXButton* trackTextButton = new FXButton(optionsFrame, fbTrackDialogCdTextButtonText, NULL, this,
- ID_EDIT_TRACK_TEXT, FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_Y, 0, 0, 0, 0, 20, 20);
- // if cd text isn't enabled for the disc, disable the button
- if (!m_disc->usingCdText())
- trackTextButton->disable();
-
- // add the label and text areas for the ISRC stuff
- new FXLabel(mainTrackFrame, fbTrackDialogIsrcLabelText, NULL);
-
- FXHorizontalFrame* isrcFrame = new FXHorizontalFrame(mainTrackFrame, LAYOUT_FILL_X|PACK_UNIFORM_WIDTH);
-
- new FXLabel(isrcFrame, fbTrackDialogIsrcCountryLabelText, NULL);
- m_isrcCountry = new FXTextField(isrcFrame, ISRC_COUNTRY, this, ID_LAST,
- TEXTFIELD_LIMITED|FRAME_SUNKEN|FRAME_THICK);
-
- new FXLabel(isrcFrame, fbTrackDialogIsrcOwnerLabelText, NULL);
- m_isrcOwner = new FXTextField(isrcFrame, ISRC_OWNER, this, ID_LAST,
- TEXTFIELD_LIMITED|FRAME_SUNKEN|FRAME_THICK);
-
- new FXLabel(isrcFrame, fbTrackDialogIsrcYearLabelText, NULL);
- m_isrcYear = new FXTextField(isrcFrame, ISRC_YEAR, this, ID_LAST,
- TEXTFIELD_LIMITED|FRAME_SUNKEN|FRAME_THICK);
-
- new FXLabel(isrcFrame, fbTrackDialogIsrcSerialLabelText, NULL);
- m_isrcSerial = new FXTextField(isrcFrame, ISRC_SERIAL, this, ID_LAST,
- TEXTFIELD_LIMITED|FRAME_SUNKEN|FRAME_THICK);
-
- // set the contents of the isrc fields
- FXString isrc = m_disc->activeTrackIsrc();
- m_isrcCountry->setText(isrc.mid(0, 2));
- m_isrcOwner->setText(isrc.mid(3, 3));
- m_isrcYear->setText(isrc.mid(7, 2));
- m_isrcSerial->setText(isrc.mid(10, 5));
-
- // add a horizontal separator
- new FXHorizontalSeparator(mainTrackFrame, SEPARATOR_RIDGE|LAYOUT_FILL_X);
-
- // add a horizontal frame for the track commands
- FXHorizontalFrame* trackCommandFrame = new FXHorizontalFrame(mainTrackFrame, LAYOUT_FILL_X);
-
- // add a vertical frame for the add track commands
- FXVerticalFrame* addTrackCommandFrame = new FXVerticalFrame(trackCommandFrame, LAYOUT_FILL_X);
-
- // Add the label for the add track data panel
- new FXLabel(addTrackCommandFrame, "Add Track DatattLayout the data that will be a part of this track", NULL);
-
- // add the row for selecting the type of data to add
- FXHorizontalFrame* addCommandFrame = new FXHorizontalFrame(addTrackCommandFrame);
- new FXLabel(addCommandFrame, "Add", NULL);
- m_trackDataTypePopup = new FXPopup(this);
- new FXOption(m_trackDataTypePopup, "Audio", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackDataTypePopup, "Data", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackDataTypePopup, "Silence", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackDataTypePopup, "Zero", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackDataTypePopup, "Start", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackDataTypePopup, "Pregap", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXOption(m_trackDataTypePopup, "Index", NULL, this, ID_LAST, JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- FXOptionMenu* trackDataType = new FXOptionMenu(addCommandFrame, m_trackDataTypePopup,
- LAYOUT_TOP|FRAME_RAISED|FRAME_THICK|JUSTIFY_HZ_APART|ICON_AFTER_TEXT);
- new FXButton (addCommandFrame, "Add Data", NULL, this, ID_LAST, FRAME_RAISED|FRAME_THICK);
-
- // add the file row
- FXHorizontalFrame* fileAddFrame = new FXHorizontalFrame(addTrackCommandFrame);
- new FXLabel(fileAddFrame, "File:ttName of the file to add as track data", NULL);
- new FXTextField(fileAddFrame, 20, this, ID_LAST, TEXTFIELD_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- new FXButton(fileAddFrame, "Find", NULL, this, ID_LAST, FRAME_RAISED|FRAME_THICK);
-
- // add the length (bytes) row
- FXHorizontalFrame* lengthBytesFrame = new FXHorizontalFrame(addTrackCommandFrame);
- new FXLabel(lengthBytesFrame, "Length (Bytes):ttLength in bytes of the data to add, use 0 if you want to use the whole file", NULL);
- new FXTextField(lengthBytesFrame, 15, this, ID_LAST, TEXTFIELD_NORMAL|FRAME_SUNKEN|FRAME_THICK);
-
- // add the length (time) row
- FXHorizontalFrame* lengthTimeFrame = new FXHorizontalFrame(addTrackCommandFrame);
- new FXLabel(lengthTimeFrame, "Length (Time):ttLength in time of the data to add, use 0:0:0 if you want to use the whole file", NULL);
- FXSpinner* lengthMinutesSpinner = new FXSpinner(lengthTimeFrame, 2, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- lengthMinutesSpinner->setRange(MIN_MINUTES, m_disc->discFreeSpace()/BLOCKS_IN_ONE_MINUTE);
- new FXLabel(lengthTimeFrame, ":", NULL);
- FXSpinner* lengthSecondsSpinner = new FXSpinner(lengthTimeFrame, 2, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- lengthSecondsSpinner->setRange(MIN_SECONDS, MAX_SECONDS);
- new FXLabel(lengthTimeFrame, ":", NULL);
- FXSpinner* lengthFramesSpinner = new FXSpinner(lengthTimeFrame, 2, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- lengthFramesSpinner->setRange(MIN_FRAMES, MAX_FRAMES);
-
- // add the start time row
- FXHorizontalFrame* startTimeFrame = new FXHorizontalFrame(addTrackCommandFrame);
- new FXLabel(startTimeFrame, "Start (Time):ttTime to start the audio file track at", NULL);
- FXSpinner* startMinutesSpinner = new FXSpinner(startTimeFrame, 2, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- startMinutesSpinner->setRange(MIN_MINUTES, m_disc->discFreeSpace()/BLOCKS_IN_ONE_MINUTE);
- new FXLabel(startTimeFrame, ":", NULL);
- FXSpinner* startSecondsSpinner = new FXSpinner(startTimeFrame, 2, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- startSecondsSpinner->setRange(MIN_SECONDS, MAX_SECONDS);
- new FXLabel(startTimeFrame, ":", NULL);
- FXSpinner* startFramesSpinner = new FXSpinner(startTimeFrame, 2, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
- startFramesSpinner->setRange(MIN_FRAMES, MAX_FRAMES);
-
- // add a vertical separator to the track data functions frame
- new FXVerticalSeparator(trackCommandFrame, SEPARATOR_GROOVE|LAYOUT_FILL_Y);
-
- // add the delete track frame
- FXVerticalFrame* deleteTrackCommandFrame = new FXVerticalFrame(trackCommandFrame, LAYOUT_FILL_X);
-
- // add the delete data item row
- FXHorizontalFrame* deleteDataItemFrame = new FXHorizontalFrame(deleteTrackCommandFrame);
- new FXLabel(deleteDataItemFrame, "Delete Track Data Item #:", NULL);
- new FXSpinner(deleteDataItemFrame, 3, this, ID_LAST, SPIN_NORMAL|FRAME_SUNKEN|FRAME_THICK);
-
- // add the label for the item preview
- FXHorizontalFrame* deleteDataItemPreviewFrame = new FXHorizontalFrame(deleteTrackCommandFrame, 0, 0, 0, 0, 0, 10, 10, 10, 10);
- new FXLabel(deleteDataItemPreviewFrame, "AUDIOFILE "musicfile.cdr" 0", NULL);
-
- // add the button for deleting the item
- new FXButton(deleteTrackCommandFrame, "Delete", NULL, this, ID_LAST, FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT);
-
- // set up the buttons for canceling or accepting changes
- new FXHorizontalSeparator(mainTrackFrame, SEPARATOR_GROOVE|LAYOUT_FILL_X);
- FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(mainTrackFrame,
- LAYOUT_BOTTOM|LAYOUT_FILL_X|PACK_UNIFORM_WIDTH);
- new FXButton(buttonFrame, fbTrackDialogOkButtonText, NULL, this, FXDialogBox::ID_ACCEPT,
- BUTTON_DEFAULT|LAYOUT_RIGHT|FRAME_RAISED|FRAME_THICK, 0, 0, 0, 0, 20, 20);
- }
- // Clean up
- CFreeburnTrackDialog::~CFreeburnTrackDialog()
- {
- // set the track type
- switch(m_disc->discType())
- {
- case CD_DA:
- m_disc->activeTrackMode(AUDIO); break;
- case CD_ROM:
- switch(m_trackMode)
- {
- case MODE1_AUDIO_TRACK:
- m_disc->activeTrackMode(AUDIO); break;
- case MODE1_DATA_TRACK:
- m_disc->activeTrackMode(MODE_1); break;
- case MODE1_RAW:
- m_disc->activeTrackMode(MODE_1_RAW); break;
- }
- break;
- case CDROM_XA:
- switch(m_trackMode)
- {
- case MODE2_AUDIO:
- m_disc->activeTrackMode(AUDIO); break;
- case MODE2_DATA_TRACK:
- m_disc->activeTrackMode(MODE_2_FORM_1); break;
- case MODE2_AUDIO_TRACK:
- m_disc->activeTrackMode(MODE_2_FORM_2); break;
- case MODE2_RAW:
- m_disc->activeTrackMode(MODE_2_RAW); break;
- }
- break;
- }
-
- // set the copy and pre-emphasis properties
- if (m_copyMode)
- m_disc->activeTrackCopyMode(COPY);
- else
- m_disc->activeTrackCopyMode(NO_COPY);
-
- if (m_preEmphMode)
- m_disc->activeTrackPreEmphMode(PRE_EMPHASIS);
- else
- m_disc->activeTrackPreEmphMode(NO_PRE_EMPHASIS);
-
- // set the two and four channel audio properties
- m_disc->activeTrackTwoChannelAudio(m_twoTrackMode);
- m_disc->activeTrackFourChannelAudio(m_fourTrackMode);
-
- // set the isrc string
- FXString isrc;
- isrc.format("%s-%s-%s-%s", m_isrcCountry->getText(), m_isrcOwner->getText(),
- m_isrcYear->getText(), m_isrcSerial->getText());
- m_disc->activeTrackIsrc(isrc);
- // delete the stuff needed to be deleted
- delete m_trackModePopup;
- delete m_trackDataTypePopup;
- }
- // method for launching the track CD Text editor dialog
- long CFreeburnTrackDialog::onCmdEditTrackText (FXObject*, FXSelector, void*)
- {
- // First, set the cd text isrc string to the current isrc in the main window
- FXString isrc;
- isrc.format("%s-%s-%s-%s", m_isrcCountry->getText(), m_isrcOwner->getText(),
- m_isrcYear->getText(), m_isrcSerial->getText());
- m_disc->activeTrackIsrc(isrc);
-
- // next, back up all the CD Text strings
- FXString titleString = m_disc->activeTrackTitle();
- FXString performerString = m_disc->activeTrackPerformer();
- FXString songwriterString = m_disc->activeTrackSongWriter();
- FXString composerString = m_disc->activeTrackComposer();
- FXString arrangerString = m_disc->activeTrackArranger();
- FXString messageString = m_disc->activeTrackMessage();
- FXString isrcString = m_disc->activeTrackIsrc();
-
- // Now, create the dialog
- CFreeburnTrackTextDialog trackTextDialog(this);
-
- // set the property strings in the dialog
- trackTextDialog.setTitleString(titleString);
- trackTextDialog.setPerformerString(performerString);
- trackTextDialog.setSongwriterString(songwriterString);
- trackTextDialog.setComposerString(composerString);
- trackTextDialog.setArrangerString(arrangerString);
- trackTextDialog.setMessageString(messageString);
- trackTextDialog.setIsrcString(isrcString);
-
- // execute the dialog
- if (trackTextDialog.execute(PLACEMENT_OWNER))
- {
- m_disc->activeTrackTitle(trackTextDialog.getTitleString());
- m_disc->activeTrackPerformer(trackTextDialog.getPerformerString());
- m_disc->activeTrackSongWriter(trackTextDialog.getSongwriterString());
- m_disc->activeTrackComposer(trackTextDialog.getComposerString());
- m_disc->activeTrackArranger(trackTextDialog.getArrangerString());
- m_disc->activeTrackMessage(trackTextDialog.getMessageString());
- m_disc->activeTrackIsrc(trackTextDialog.getIsrcString());
-
- // update the isrc in the dialog
- isrc.clear();
- isrc = trackTextDialog.getIsrcString();
- m_isrcCountry->setText(isrc.mid(0, 2));
- m_isrcOwner->setText(isrc.mid(3, 3));
- m_isrcYear->setText(isrc.mid(7, 2));
- m_isrcSerial->setText(isrc.mid(10, 5));
- }
- else
- {
- // dialog was cancelled, so revert the strings back to what they should be
- m_disc->activeTrackTitle(titleString);
- m_disc->activeTrackPerformer(performerString);
- m_disc->activeTrackSongWriter(songwriterString);
- m_disc->activeTrackComposer(composerString);
- m_disc->activeTrackArranger(arrangerString);
- m_disc->activeTrackMessage(messageString);
- m_disc->activeTrackIsrc(isrcString);
- }
-
- return 1;
- }