From: John F. <jo...@us...> - 2010-08-25 17:51:15
|
Update of /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv22255 Modified Files: dialogues.cpp dialogues.h help.cpp ingexgui.cpp ingexgui.h player.cpp player.h recordbutton.cpp recordbutton.h recordergroup.cpp ticktree.cpp ticktree.h timepos.cpp Log Message: Further GUI improvements: Option to let recorder generate tape names. Avoid error when hitting record quickly after stop. Index: player.h =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/player.h,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** player.h 3 Aug 2010 09:27:07 -0000 1.15 --- player.h 25 Aug 2010 17:51:06 -0000 1.16 *************** *** 231,234 **** --- 231,235 ---- bool mAudioFollowsVideo; unsigned int mNVideoTracks; + bool mRecording; DECLARE_EVENT_TABLE() }; Index: ticktree.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/ticktree.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ticktree.cpp 19 Aug 2010 12:47:57 -0000 1.15 --- ticktree.cpp 25 Aug 2010 17:51:06 -0000 1.16 *************** *** 66,72 **** } ! /// Adds a recorder to the tree. /// Adds only tracks which have sources, but counts the number of sourceless video tracks between used video tracks, for arranging tape ID data correctly when requested. /// Arranges tracks by package name, and displays tape IDs for packages names if found. /// Sets all tracks to be enabled for recording. /// Updates overall tree state and sends a notification event. --- 66,73 ---- } ! /// Adds a recorder to the tree. Only call when nothing is recording. /// Adds only tracks which have sources, but counts the number of sourceless video tracks between used video tracks, for arranging tape ID data correctly when requested. /// Arranges tracks by package name, and displays tape IDs for packages names if found. + /// If any tracks are recording, clears record enables for non-recording tracks and for every track on every other recorder. /// Sets all tracks to be enabled for recording. /// Updates overall tree state and sends a notification event. *************** *** 76,80 **** /// @param isRouterRecorder True if this recorder is a router recorder - all tracks (should be only one anyway) will be regarded as router tracks and tape IDs will not be used. /// @param doc XML document object for tape ID information. ! void TickTreeCtrl::AddRecorder(const wxString & name, const ProdAuto::TrackList_var & trackList, const ProdAuto::TrackStatusList_var & trackStatusList, bool isRouterRecorder, wxXmlDocument & doc) { Enable(); --- 77,82 ---- /// @param isRouterRecorder True if this recorder is a router recorder - all tracks (should be only one anyway) will be regarded as router tracks and tape IDs will not be used. /// @param doc XML document object for tape ID information. ! /// @return true if any tracks are recording ! bool TickTreeCtrl::AddRecorder(const wxString & name, const ProdAuto::TrackList_var & trackList, const ProdAuto::TrackStatusList_var & trackStatusList, bool isRouterRecorder, wxXmlDocument & doc) { Enable(); *************** *** 104,108 **** packageNameTreeNodes[packageName] = AppendItem(recorderRoot, packageName, DISABLED); //state will be updated below, from track nodes SetItemData(packageNameTreeNodes[packageName], new ItemData(DISABLED, packageName, isRouterRecorder, !tapeId.IsEmpty() || isRouterRecorder)); //remember package name for when messing about with tape IDs ! if (!tapeId.IsEmpty() && !isRouterRecorder) { AddMessage(packageNameTreeNodes[packageName], tapeId); } --- 106,110 ---- packageNameTreeNodes[packageName] = AppendItem(recorderRoot, packageName, DISABLED); //state will be updated below, from track nodes SetItemData(packageNameTreeNodes[packageName], new ItemData(DISABLED, packageName, isRouterRecorder, !tapeId.IsEmpty() || isRouterRecorder)); //remember package name for when messing about with tape IDs ! if (!tapeId.IsEmpty() && !isRouterRecorder && SetTapeIdsDlg::AreTapeIdsEnabled(doc)) { AddMessage(packageNameTreeNodes[packageName], tapeId); } *************** *** 123,126 **** --- 125,138 ---- //sort recorder nodes SortChildren(GetRootItem()); + //disable all tracks of all other recorders if anything recording + //(can't use SelectRecursively() from the root to do this as we don't know whether we're fully or partially recording until we've traversed the tree) + if (someRecording) { + wxTreeItemIdValue cookie; + wxTreeItemId recorder = GetFirstChild(GetRootItem(), cookie); + while (recorder.IsOk()) { + if (recorder != recorderRoot) SelectRecursively(recorder, 0, false); + recorder = GetNextChild(GetRootItem(), cookie); + } + } //report all track state up the tree SetTrackStatus(name, someRecording, false, trackStatusList); *************** *** 132,135 **** --- 144,148 ---- AddPendingEvent(guiEvent); } + return someRecording; } *************** *** 186,197 **** if (mEnableChanges && (flags & wxTREE_HITTEST_ONITEMICON)) { //apply selection state to this and all children recursively - unsigned int enabledTracks = 0; if (DISABLED == GetItemImage(id) || PARTIALLY_ENABLED == GetItemImage(id)) { //record enable ! SelectRecursively(id, enabledTracks); } else if (ENABLED == GetItemImage(id)) { //record disable ! SelectRecursively(id, enabledTracks, false); } //report selection state to all ancestors recursively --- 199,209 ---- if (mEnableChanges && (flags & wxTREE_HITTEST_ONITEMICON)) { //apply selection state to this and all children recursively if (DISABLED == GetItemImage(id) || PARTIALLY_ENABLED == GetItemImage(id)) { //record enable ! SelectRecursively(id); } else if (ENABLED == GetItemImage(id)) { //record disable ! SelectRecursively(id, 0, false); } //report selection state to all ancestors recursively *************** *** 215,223 **** } ! /// Indicates whether all enabled tracks' packages have tape IDs. ! /// @return True if all tape IDs present. ! bool TickTreeCtrl::TapeIdsOK() { ! return dynamic_cast<ItemData *>(GetItemData(GetRootItem()))->GetBool(); } --- 227,235 ---- } ! /// Returns true if all enabled tracks' packages have tape IDs, or tape IDs are not being used. ! /// @param doc XML document object for tape ID information ! bool TickTreeCtrl::TapeIdsOK(wxXmlDocument & doc) { ! return dynamic_cast<ItemData *>(GetItemData(GetRootItem()))->GetBool() || !SetTapeIdsDlg::AreTapeIdsEnabled(doc); } *************** *** 250,260 **** } - /// Indicates whether at least one track is recording and there are no problems. - /// @return True if recording with no problems. - bool TickTreeCtrl::RecordingSuccessfully() - { - return RECORDING == GetItemImage(GetRootItem()) || PARTIALLY_RECORDING == GetItemImage(GetRootItem()); - } - /// Returns the total number of tracks enabled to record unsigned int TickTreeCtrl::EnabledTracks() --- 262,265 ---- *************** *** 265,269 **** /// Indicates if all recorders that have tracks selected for recording are recording /// @return True if all recording ! bool TickTreeCtrl::AllRecording() { bool allRecording = true; wxTreeItemIdValue cookie; --- 270,275 ---- /// Indicates if all recorders that have tracks selected for recording are recording /// @return True if all recording ! bool TickTreeCtrl::AllRecording() ! { bool allRecording = true; wxTreeItemIdValue cookie; *************** *** 278,281 **** --- 284,303 ---- } + /// Indicates if all recorders that have tracks selected for recording are stopped + /// @return True if all stopped + bool TickTreeCtrl::AllStopped() + { + bool allStopped = true; + wxTreeItemIdValue cookie; + wxTreeItemId recorder = GetFirstChild(GetRootItem(), cookie); + while (recorder.IsOk()) { + if (RECORDING == dynamic_cast<ItemData *>(GetItemData(recorder))->GetUnderlyingState() || PARTIALLY_RECORDING == ((ItemData *) GetItemData(recorder))->GetUnderlyingState()) { //some tracks enabled but not recording + allStopped = false; + } + recorder = GetNextChild(GetRootItem(), cookie); + } + return allStopped; + } + /// Travels from the given point in the tree away from the root, changing the state of all items to the state given and determining the aggregate tape ID, signal present status and number of tracks enabled for recording. /// Generates an event if a recorder signal present status changes. *************** *** 286,290 **** /// @param problem Problem if true. Overrides unknown and enabled parameters. /// @return flags: TAPE_IDS_OK, ALL_SIGNALS, TRACK_NODE. ! int TickTreeCtrl::SelectRecursively(wxTreeItemId id, unsigned int & enabledTracks, bool enabled, bool unknown, bool problem) { //apply visible/underlying selection states to this node --- 308,312 ---- /// @param problem Problem if true. Overrides unknown and enabled parameters. /// @return flags: TAPE_IDS_OK, ALL_SIGNALS, TRACK_NODE. ! int TickTreeCtrl::SelectRecursively(wxTreeItemId id, unsigned int * enabledTracks, bool enabled, bool unknown, bool problem) { //apply visible/underlying selection states to this node *************** *** 309,313 **** while (child.IsOk()) { //set child's state, get aggregate tape ID and signal present status, and count enabled sources ! rc &= SelectRecursively(child, offspringEnabledTracks, enabled, unknown, problem); child = GetNextChild(id, cookie); } --- 331,335 ---- while (child.IsOk()) { //set child's state, get aggregate tape ID and signal present status, and count enabled sources ! rc &= SelectRecursively(child, &offspringEnabledTracks, enabled, unknown, problem); child = GetNextChild(id, cookie); } *************** *** 319,323 **** } if (dynamic_cast<ItemData *>(GetItemData(id))->GetBool()) { //enabled for recording ! enabledTracks++; //add one to the total if this track is enabled if (NO_SIGNAL_COLOUR == GetItemBackgroundColour(id)) { //no signal on a track enabled for recording rc &= ~ALL_SIGNALS; --- 341,345 ---- } if (dynamic_cast<ItemData *>(GetItemData(id))->GetBool()) { //enabled for recording ! if (enabledTracks) *enabledTracks++; //add one to the total if this track is enabled if (NO_SIGNAL_COLOUR == GetItemBackgroundColour(id)) { //no signal on a track enabled for recording rc &= ~ALL_SIGNALS; *************** *** 337,341 **** SetSignalPresentStatus(id, rc & ALL_SIGNALS); dynamic_cast<ItemData *>(GetItemData(id))->SetEnabledTracks(offspringEnabledTracks); ! enabledTracks += offspringEnabledTracks; rc &= ~TRACK_NODE; //inform caller that this is not a track node } --- 359,363 ---- SetSignalPresentStatus(id, rc & ALL_SIGNALS); dynamic_cast<ItemData *>(GetItemData(id))->SetEnabledTracks(offspringEnabledTracks); ! if (enabledTracks) *enabledTracks += offspringEnabledTracks; rc &= ~TRACK_NODE; //inform caller that this is not a track node } *************** *** 652,655 **** --- 674,678 ---- /// Works out if there are any package names which do not belong to router recorders, i.e. that use tape IDs. + /// Does not care if tape IDs are enabled or not. /// @return true if using tape IDs. bool TickTreeCtrl::UsingTapeIds() *************** *** 675,688 **** { wxXmlNode * tapeIdsNode = SetTapeIdsDlg::GetTapeIdsNode(doc); ! ScanPackageNames(0, 0, tapeIdsNode); } /// Either returns all package names, with corresponding enabled status, or updates all tape IDs. /// Skips package names that belong to router recorders. ! /// If updating, reports to the root, and generates a status update notification event and a recorder notification event for each recorder whose tape IDs have changed. /// @param names If 0, updates; if not, returns package names. /// @param enabled If returning package names, returns true for each corresponding package in names that's enabled or partially enabled; false otherwise. Ignored if not returning package names. ! /// @param tapeIDsNode If updating, this XML node is searched for tape IDs. ! void TickTreeCtrl::ScanPackageNames(wxArrayString * names, std::vector<bool> * enabled, wxXmlNode * tapeIdsNode) { wxString packageName; --- 698,712 ---- { wxXmlNode * tapeIdsNode = SetTapeIdsDlg::GetTapeIdsNode(doc); ! ScanPackageNames(0, 0, tapeIdsNode, SetTapeIdsDlg::AreTapeIdsEnabled(doc)); } /// Either returns all package names, with corresponding enabled status, or updates all tape IDs. /// Skips package names that belong to router recorders. ! /// If updating tape IDs, reports to the root, and generates a status update notification event and a recorder notification event for each recorder whose tape IDs have changed (taking account of the effect of the tapeIdsAreEnabled parameter). /// @param names If 0, updates; if not, returns package names. /// @param enabled If returning package names, returns true for each corresponding package in names that's enabled or partially enabled; false otherwise. Ignored if not returning package names. ! /// @param tapeIdsNode If updating, this XML node is searched for tape IDs. ! /// @param tapeIdsAreEnabled If updating, tape IDs are all set to empty strings if this is false. ! void TickTreeCtrl::ScanPackageNames(wxArrayString * names, std::vector<bool> * enabled, wxXmlNode * tapeIdsNode, bool tapeIdsAreEnabled) { wxString packageName; *************** *** 703,718 **** } else { //updating ! wxString tapeId = SetTapeIdsDlg::GetTapeId(tapeIdsNode, packageName); ! if (RetrieveMessage(package) != tapeId) { ! tapeIdChanges = true; ! if (tapeId.IsEmpty()) { //no tape ID ! RemoveMessage(package); ! dynamic_cast<ItemData *>(GetItemData(package))->SetBool(false); ! } ! else { //tape ID is present ! AddMessage(package, tapeId); ! dynamic_cast<ItemData *>(GetItemData(package))->SetBool(true); } } } package = GetNextChild(recorder, packagesCookie); --- 727,749 ---- } else { //updating ! if (tapeIdsAreEnabled) { ! wxString tapeId = SetTapeIdsDlg::GetTapeId(tapeIdsNode, packageName); ! if (RetrieveMessage(package) != tapeId) { ! tapeIdChanges = true; ! if (tapeId.IsEmpty()) { //no tape ID ! RemoveMessage(package); ! dynamic_cast<ItemData *>(GetItemData(package))->SetBool(false); ! } ! else { //tape ID is present ! AddMessage(package, tapeId); ! dynamic_cast<ItemData *>(GetItemData(package))->SetBool(true); ! } } } + else if (!RetrieveMessage(package).IsEmpty()) { + tapeIdChanges = true; + RemoveMessage(package); + dynamic_cast<ItemData *>(GetItemData(package))->SetBool(false); + } } package = GetNextChild(recorder, packagesCookie); *************** *** 745,749 **** ! /// Retrieves a message from a tree item's displayed text. /// @param item The tree node. /// @return The message. --- 776,780 ---- ! /// Retrieves a message (if any) from a tree item's displayed text. /// @param item The tree node. /// @return The message. *************** *** 752,756 **** //NB format must correspond to AddMessage() wxString message = GetItemText(item).Mid(dynamic_cast<ItemData *>(GetItemData(item))->GetString().Len() + 2); //remove characters up to start of message ! message.Truncate(message.Len() - 1); //remove trailing bracket return message; } --- 783,787 ---- //NB format must correspond to AddMessage() wxString message = GetItemText(item).Mid(dynamic_cast<ItemData *>(GetItemData(item))->GetString().Len() + 2); //remove characters up to start of message ! message.Truncate(message.Len() - 1); //remove trailing bracket (if any) return message; } Index: recordbutton.h =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/recordbutton.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** recordbutton.h 3 Aug 2010 09:27:07 -0000 1.8 --- recordbutton.h 25 Aug 2010 17:51:06 -0000 1.9 *************** *** 39,43 **** virtual void SetLabel(const wxString &); void Record(); ! void Pending(); void Normal(); bool IsEnabled(); --- 39,43 ---- virtual void SetLabel(const wxString &); void Record(); ! void Pending(bool); void Normal(); bool IsEnabled(); *************** *** 49,52 **** --- 49,53 ---- wxString mLabel; bool mEnabled; + bool mRunningUp; DECLARE_EVENT_TABLE() }; Index: help.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/help.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** help.cpp 18 Aug 2010 10:15:42 -0000 1.20 --- help.cpp 25 Aug 2010 17:51:06 -0000 1.21 *************** *** 36,40 **** wxTextCtrl * qs = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! wxString message = wxT("1) Click the recorder names you wish to use in the #Recorder Selection# box.\n\n2) Select/add a suitable project name from the #Misc->Set Project Name...# menu if desired.\n\n3) Set appropriate values for pre-roll and post-roll from the #Misc->Set pre- and post-roll# menu if desired.\n\n4) If you don't want to record with all tracks, open up the #Recorders# tree to the desired level by clicking on the small arrows, and click on #R# symbols.\n\n5) Press the #Set tape Ids# button and make sure there is a suitable tape ID for each package of tracks.\n\n6) Fill in the #Description# box if desired.\n\n7) Press the #Record# button to start recording, and the #Stop# button to finish."); StyleAndWrite(qs, message); notebook->AddPage(qs, wxT("Quick Start")); --- 36,40 ---- wxTextCtrl * qs = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! wxString message = wxT("1) Click the recorder names you wish to use in the #Recorder Selection# box.\n\n2) Select/add a suitable project name from the #Misc->Set Project Name...# menu if desired.\n\n3) Set appropriate values for pre-roll and post-roll from the #Misc->Set pre- and post-roll...# menu if desired.\n\n4) If you don't want to record with all tracks, open up the #Recorders# tree to the desired level by clicking on the small arrows, and click on #R# symbols.\n\n5) Press the #Set tape IDs# button and make sure there is a suitable tape ID for each package of tracks, or disable tape IDs in the #Misc# menu.\n\n6) Fill in the #Description# box if desired.\n\n7) Press the #Record# button to start recording, and the #Stop# button to finish."); StyleAndWrite(qs, message); notebook->AddPage(qs, wxT("Quick Start")); *************** *** 56,65 **** wxTextCtrl * roll = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! message = wxT("When connected to at least one recorder, a dialogue can be accessed from the #Misc# menu to set pre-roll and post-roll. These settings are remembered between sessions.\n\nThe #Pre-roll# slider allows you to add a variable amount of pre-roll to each recording. Its maximum value depends on the capabilities of the recorders.\n\nThe #Post-roll# slider operates in a similar way. Recorders are likely to allow an infinite amount of post-roll, in which case it is limited to ") + wxString::Format(wxT("%d frame%s."), DEFAULT_MAX_POSTROLL, DEFAULT_MAX_POSTROLL == 1 ? wxT("") : wxT("s")); StyleAndWrite(roll, message); notebook->AddPage(roll, wxT("Pre-roll and Post-roll")); wxTextCtrl * tapeIds = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! message = wxT("Recordings cannot be made unless all enabled tracks (apart from those of router recorders) have a corresponding tape ID. #Set tape IDs# will be orange if a missing tape ID is preventing you from recording. Pressing this button (whether orange or not) brings up a dialogue for manipulating tape IDs, which are remembered between sessions. It is designed to allow you to enter and update the information for several tapes quickly. Press the #Help# on the dialogue for details about how to do this."); StyleAndWrite(tapeIds, message); notebook->AddPage(tapeIds, wxT("Tape IDs")); --- 56,70 ---- wxTextCtrl * roll = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! message = wxT("When connected to at least one recorder, a dialogue can be accessed from the #Misc# menu to set pre-roll and post-roll. These settings are remembered between sessions.\n\nThe #Pre-roll# slider allows you to add a variable amount of pre-roll to each recording. Its maximum value depends on the capabilities of the recorders.\n\nThe #Post-roll# slider operates in a similar way. Recorders are likely to allow an infinite amount of post-roll, in which case it is limited to ") + wxString::Format(wxT("%d frame%s."), DEFAULT_MAX_POSTROLL, DEFAULT_MAX_POSTROLL == 1 ? wxT("") : wxT("s")) + wxT(" During post-roll the record button shows the \"running down\" state"); ! #ifdef ALLOW_OVERLAPPED_RECORDINGS ! message += wxT(" and a new recording can be started, which will overlap the current recording."); ! #else ! message += wxT("."); ! #endif StyleAndWrite(roll, message); notebook->AddPage(roll, wxT("Pre-roll and Post-roll")); wxTextCtrl * tapeIds = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! message = wxT("If tape IDs are enabled in the #Misc# menu, recordings cannot be made unless all enabled tracks (apart from those of router recorders) have a corresponding tape ID. #Set tape IDs# will be orange if a missing tape ID is preventing you from recording. Pressing this button (whether orange or not) brings up a dialogue for manipulating tape IDs, which are remembered between sessions. It is designed to allow you to enter and update the information for several tapes quickly. Press the #Help# button on the dialogue for details about how to do this."); StyleAndWrite(tapeIds, message); notebook->AddPage(tapeIds, wxT("Tape IDs")); *************** *** 80,84 **** wxTextCtrl * transport = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! message = wxT("When connected to at least one recorder, the #Record# button indicates the total number of tracks enabled to record. If this is greater than zero, and all the enabled tracks (apart from router recorders) have tape IDs, it will be a dull red, indicating that recording is possible. (If lack of tape IDs is preventing a recording occurring, #Set Tape IDs# will be orange to remind you that you must define some tape IDs before you can record.) When pressed, #Record# will become bright red with no legend (as it can no longer be pressed), and will flash (\"running up\") until all applicable recorders have responded successfully to the record command. #F1# provides a shortcut key for recording.\n\n#Stop# can only be pressed while recording, and sets the displayed status to stopped immediately, even if recorders are still post-rolling. #Shift+F5# provides a shortcut key for stopping.\n\nWhile recording, #Mark cue# (or shortcut #F2#) adds a line to the cue point display to mark a point of interest.\n\nAfter at least one recording has been made, #Mark cue# becomes a play/pause button, explained in the instructions for the player. #Stop# has no effect during playback.\n\n#Chunk# can be pressed during recording to create a new chunk immediately. See separate help section on chunking for more details.\n\n#Record# can be pressed during playback, which will immediately halt the player (to reduce load on the recording system) and commence a new recording."); StyleAndWrite(transport, message); notebook->AddPage(transport, wxT("Transport controls")); --- 85,89 ---- wxTextCtrl * transport = new wxTextCtrl(notebook, -1, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxTE_MULTILINE); ! message = wxT("When connected to at least one recorder, the #Record# button indicates the total number of tracks enabled to record. If this is greater than zero, and all the enabled tracks (apart from router recorders) have tape IDs, it will be a dull red, indicating that recording is possible. (If lack of tape IDs is preventing a recording occurring, #Set Tape IDs# will be orange to remind you that you must define some tape IDs before you can record.) When pressed, #Record# will flash bright red (\"running up\") until all applicable recorders have responded successfully to the record command, and will then become steady bright red. Similarly, when stopping, it will flash dull red (\"running down\") during postroll and while waiting for a response. #F1# provides a shortcut key for recording.\n\n#Stop# can only be pressed while recording, and sets the displayed status to stopped immediately, even if recorders are still post-rolling. #Shift+F5# provides a shortcut key for stopping.\n\nWhile recording, #Mark cue# (or shortcut #F2#) adds a line to the cue point display to mark a point of interest.\n\nAfter at least one recording has been made, #Mark cue# becomes a play/pause button, explained in the instructions for the player. #Stop# has no effect during playback.\n\n#Chunk# can be pressed during recording to create a new chunk immediately. See separate help section on chunking for more details.\n\n#Record# can be pressed during playback, which will immediately halt the player (to reduce load on the recording system) and commence a new recording."); StyleAndWrite(transport, message); notebook->AddPage(transport, wxT("Transport controls")); Index: recordbutton.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/recordbutton.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** recordbutton.cpp 3 Aug 2010 09:27:07 -0000 1.8 --- recordbutton.cpp 25 Aug 2010 17:51:06 -0000 1.9 *************** *** 62,65 **** --- 62,66 ---- } + /// Makes the button non-clickable. void RecordButton::Disable() { *************** *** 77,81 **** } ! /// Puts the button into the normal (non recording or pending) state. void RecordButton::Normal() { if (RECORDING_COLOUR == GetBackgroundColour() || mTimer->IsRunning()) { //not already in normal state --- 78,82 ---- } ! /// Puts the button into the normal (non recording or pending) state, and sets the tooltip accordingly. void RecordButton::Normal() { if (RECORDING_COLOUR == GetBackgroundColour() || mTimer->IsRunning()) { //not already in normal state *************** *** 85,93 **** SetBackgroundColour(mEnabled ? ENABLED_COLOUR : mInitialColour); //dull red or greyed out mTimer->Stop(); } } ! ! /// Puts the button into the bright red textless and disabled "record" state. void RecordButton::Record() { if (RECORDING_COLOUR != GetBackgroundColour() || mTimer->IsRunning()) { //not already in record state --- 86,94 ---- SetBackgroundColour(mEnabled ? ENABLED_COLOUR : mInitialColour); //dull red or greyed out mTimer->Stop(); + SetToolTip(wxT("Start a new recording")); } } ! /// Puts the button into the bright red textless and disabled "record" state, and sets the tooltip accordingly. void RecordButton::Record() { if (RECORDING_COLOUR != GetBackgroundColour() || mTimer->IsRunning()) { //not already in record state *************** *** 97,111 **** SetBackgroundColour(RECORDING_COLOUR); mTimer->Stop(); } } ! /// Puts the button into the flashing bright red textless and disabled "pending" state. ! void RecordButton::Pending() { ! if (!mTimer->IsRunning()) { //not already in pending mode //std::cerr << "pending" << std::endl; wxButton::Enable(); //so it's not greyed out wxButton::SetLabel(wxT("")); ! SetBackgroundColour(RECORDING_COLOUR); mTimer->Start(125); //for flashing } } --- 98,116 ---- SetBackgroundColour(RECORDING_COLOUR); mTimer->Stop(); + SetToolTip(wxT("Recording")); } } ! /// Puts the button into the flashing textless "running up" or "running down" state, and sets the tooltip accordingly. ! /// @param runningUp true for running up; false for running down ! void RecordButton::Pending(bool runningUp) { ! if (!mTimer->IsRunning() || mRunningUp != runningUp) { //changing mode //std::cerr << "pending" << std::endl; + mRunningUp = runningUp; wxButton::Enable(); //so it's not greyed out wxButton::SetLabel(wxT("")); ! SetBackgroundColour(mRunningUp ? RECORDING_COLOUR : ENABLED_COLOUR); mTimer->Start(125); //for flashing + SetToolTip(mRunningUp ? wxT("Running up") : wxT("Running down")); } } *************** *** 115,120 **** //std::cerr << "timer" << std::endl; if (mTimer->IsRunning()) { //trap timer being stopped with event in the system - if this ever happens... ! if (RECORDING_COLOUR != GetBackgroundColour()) { ! SetBackgroundColour(RECORDING_COLOUR); } else { --- 120,125 ---- //std::cerr << "timer" << std::endl; if (mTimer->IsRunning()) { //trap timer being stopped with event in the system - if this ever happens... ! if (mInitialColour == GetBackgroundColour()) { ! SetBackgroundColour(mRunningUp ? RECORDING_COLOUR : ENABLED_COLOUR); } else { Index: ingexgui.h =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/ingexgui.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** ingexgui.h 18 Aug 2010 10:15:42 -0000 1.20 --- ingexgui.h 25 Aug 2010 17:51:06 -0000 1.21 *************** *** 126,129 **** --- 126,130 ---- MENU_PlayForwards, MENU_PlayPause, + MENU_UseTapeIds, MENU_AutoClear, MENU_ClearLog, *************** *** 200,203 **** --- 201,205 ---- void OnRecord(wxCommandEvent&); void OnRecorderListRefresh(wxCommandEvent&); + void OnUseTapeIds(wxCommandEvent&); void OnSetTapeIds(wxCommandEvent&); void OnStop(wxCommandEvent&); Index: timepos.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/timepos.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** timepos.cpp 12 Aug 2010 16:35:38 -0000 1.12 --- timepos.cpp 25 Aug 2010 17:51:06 -0000 1.13 *************** *** 346,349 **** --- 346,350 ---- else if (tc.edit_rate.numerator && tc.edit_rate.denominator) { //sensible values: no chance of divide by zero! mLastKnownTimecode = tc; + mLastDisplayedTimecode = tc; //to prevent problems with functions that use this variable if they are called before the timecode display is updated if (stuck) { mTimecodeRunning = false; Index: dialogues.h =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/dialogues.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** dialogues.h 18 Aug 2010 10:15:42 -0000 1.14 --- dialogues.h 25 Aug 2010 17:51:06 -0000 1.15 *************** *** 113,116 **** --- 113,118 ---- static wxXmlNode * GetTapeIdsNode(wxXmlDocument &); static const wxString GetTapeId(wxXmlNode *, const wxString &, wxArrayString * = 0); + static void EnableTapeIds(wxXmlDocument &, bool); + static bool AreTapeIdsEnabled(wxXmlDocument &); bool IsUpdated(); private: Index: ingexgui.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/ingexgui.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** ingexgui.cpp 19 Aug 2010 12:47:57 -0000 1.33 --- ingexgui.cpp 25 Aug 2010 17:51:06 -0000 1.34 *************** *** 145,148 **** --- 145,149 ---- EVT_BUTTON( BUTTON_TakeSnapshot, IngexguiFrame::OnTakeSnapshot ) EVT_BUTTON( BUTTON_DeleteCue, IngexguiFrame::OnDeleteCue ) + EVT_MENU( MENU_UseTapeIds, IngexguiFrame::OnUseTapeIds ) EVT_COMMAND( wxID_ANY, EVT_PLAYER_MESSAGE, IngexguiFrame::OnPlayerEvent ) EVT_COMMAND( wxID_ANY, EVT_TREE_MESSAGE, IngexguiFrame::OnTreeEvent ) *************** *** 272,275 **** --- 273,277 ---- wxMenuItem * clearLogItem = menuMisc->Append(MENU_ClearLog, wxT("Clear recording log")); clearLogItem->Enable(false); + menuMisc->AppendCheckItem(MENU_UseTapeIds, wxT("Use tape IDs")); menuMisc->AppendCheckItem(MENU_AutoClear, wxT("Don't log multiple recordings")); menuMisc->Append(MENU_TestMode, wxT("Test mode...")); *************** *** 628,631 **** --- 630,641 ---- } + /// Responds to the Use Tape IDs menu checkbox being clicked by updating the state + void IngexguiFrame::OnUseTapeIds( wxCommandEvent& event ) + { + SetTapeIdsDlg::EnableTapeIds(mSavedState, event.IsChecked()); + mSavedState.Save(mSavedStateFilename); + mTree->UpdateTapeIds(mSavedState); //will issue an event to update the record and tape ID buttons + } + /// Responds to the tape IDs button being pressed by showing the appropriate dialogue and updating state if user makes changes. /// @param event The button event. *************** *** 730,735 **** ClearLog(); //resets player } - //stop player using disks - if (mPlayer) mPlayer->Record(); //issue command to record immediately, and log ProdAuto::MxfTimecode now; --- 740,743 ---- *************** *** 943,948 **** mRecorderGroup->Stop(false, now, mDescriptionCtrl->GetLineText(0).Trim(false).Trim(true), mEventList->GetLocators()); SetStatus(RUNNING_DOWN); - //restore the player mode that existed before recording (if player is enabled) - if (mPlayer) mPlayer->Record(false); } else if (PLAYING == mStatus || PLAYING_BACKWARDS == mStatus || PAUSED == mStatus) { --- 951,954 ---- *************** *** 1081,1084 **** --- 1087,1091 ---- /// Event string: The recorder name. /// Event int: The index of the recorder so it can be disconnected easily + /// Event extra long: The recorder is recording /// RECORD: Starts position counter and adds a start event to the event list. /// Event client data: Ptr to a ProdAuto::MxfTimecode object with the start timecode. Deletes this. *************** *** 1131,1138 **** } } ! if (mTree->RecordingSuccessfully()) { Log(wxT(" ...already recording")); - //this recorder is already recording - if (mPlayer) mPlayer->Record(); SetStatus(RECORDING); //will prevent any more recorders being added ProdAuto::MxfTimecode startTimecode; --- 1138,1144 ---- } } ! if (!mRecorderGroup->GetCurrentProjectName().IsEmpty() && event.GetExtraLong()) { ! //this recorder is still connected and is already recording Log(wxT(" ...already recording")); SetStatus(RECORDING); //will prevent any more recorders being added ProdAuto::MxfTimecode startTimecode; *************** *** 1173,1177 **** mTimepos->Stop(*tc); mEventList->AddEvent(EventList::STOP, tc, mRecorderGroup->GetCurrentDescription(), mTimepos->GetFrameCount()); - SetStatus(STOPPED); delete tc; break; --- 1179,1182 ---- *************** *** 1275,1278 **** --- 1280,1287 ---- } break; + case RUNNING_DOWN: + if (mTree->AllStopped()) { //all recorders that are supposed to are recording + SetStatus(STOPPED); + } default: break; *************** *** 1312,1315 **** --- 1321,1325 ---- mTree->EnableChanges(); mChunkingDlg->RunFrom(); + if (mPlayer) mPlayer->Record(false); break; case RUNNING_UP: *************** *** 1318,1321 **** --- 1328,1332 ---- } SetStatusText(wxT("Running up.")); + if (mPlayer) mPlayer->Record(); mTree->EnableChanges(false); break; *************** *** 1326,1329 **** --- 1337,1341 ---- } SetStatusText(wxT("Recording.")); + if (mPlayer) mPlayer->Record(); mTree->EnableChanges(false); break; *************** *** 1333,1336 **** --- 1345,1349 ---- } SetStatusText(wxT("Running down.")); + if (mPlayer) mPlayer->Record(); mTree->EnableChanges(false); mChunkingDlg->RunFrom(); *************** *** 1455,1459 **** void IngexguiFrame::Log(const wxString & message) { - // std::cerr << wxDateTime::Now().FormatISOTime().mb_str(*wxConvCurrent) << " " << message.mb_str(*wxConvCurrent) << std::endl; if (wxDateTime::Today() != mToday) { mToday = wxDateTime::Today(); --- 1468,1471 ---- *************** *** 1600,1605 **** } break; case BUTTON_TapeId: ! dynamic_cast<wxButton*>(event.GetEventObject())->SetBackgroundColour(mTree->SomeEnabled() && !mTree->TapeIdsOK() ? BUTTON_WARNING_COLOUR : wxNullColour); break; case BITMAP_StatusCtrl: --- 1612,1620 ---- } break; + case MENU_UseTapeIds: + event.Check(SetTapeIdsDlg::AreTapeIdsEnabled(mSavedState)); + break; case BUTTON_TapeId: ! dynamic_cast<wxButton*>(event.GetEventObject())->SetBackgroundColour(mTree->SomeEnabled() && !mTree->TapeIdsOK(mSavedState) ? BUTTON_WARNING_COLOUR : wxNullColour); break; case BITMAP_StatusCtrl: *************** *** 1721,1735 **** switch (mStatus) { case RUNNING_UP: ! dynamic_cast<RecordButton*>(event.GetEventObject())->Pending(); ! dynamic_cast<RecordButton*>(event.GetEventObject())->SetToolTip(wxT("")); break; case RECORDING: - case RUNNING_DOWN: dynamic_cast<RecordButton*>(event.GetEventObject())->Record(); ! dynamic_cast<RecordButton*>(event.GetEventObject())->SetToolTip(wxT("Recording")); break; default: dynamic_cast<RecordButton*>(event.GetEventObject())->Normal(); - dynamic_cast<RecordButton*>(event.GetEventObject())->SetToolTip(wxT("Start a new recording")); break; } --- 1736,1749 ---- switch (mStatus) { case RUNNING_UP: ! dynamic_cast<RecordButton*>(event.GetEventObject())->Pending(true); break; case RECORDING: dynamic_cast<RecordButton*>(event.GetEventObject())->Record(); ! break; ! case RUNNING_DOWN: ! dynamic_cast<RecordButton*>(event.GetEventObject())->Pending(false); break; default: dynamic_cast<RecordButton*>(event.GetEventObject())->Normal(); break; } *************** *** 1936,1940 **** break; case BUTTON_TapeId: ! enabled = mTree->UsingTapeIds(); break; case BUTTON_JumpToTimecode: --- 1950,1954 ---- break; case BUTTON_TapeId: ! enabled = SetTapeIdsDlg::AreTapeIdsEnabled(mSavedState) && mTree->UsingTapeIds(); break; case BUTTON_JumpToTimecode: *************** *** 1943,1947 **** case BUTTON_MENU_Record: case MENU_TestMode: ! enabled = mTree->SomeEnabled() && mTree->TapeIdsOK() && mRecorderGroup->IsEnabledForInput() && (RECORDING != mStatus && RUNNING_UP != mStatus && RUNNING_DOWN != mStatus); break; case BUTTON_MENU_Stop: --- 1957,1965 ---- case BUTTON_MENU_Record: case MENU_TestMode: ! #ifdef ALLOW_OVERLAPPED_RECORDINGS ! enabled = mTree->SomeEnabled() && mTree->TapeIdsOK(mSavedState) && mRecorderGroup->IsEnabledForInput() && (RECORDING != mStatus && RUNNING_UP != mStatus); ! #else ! enabled = mTree->SomeEnabled() && mTree->TapeIdsOK(mSavedState) && mRecorderGroup->IsEnabledForInput() && (RECORDING != mStatus && RUNNING_UP != mStatus && RUNNING_DOWN != mStatus); ! #endif break; case BUTTON_MENU_Stop: Index: recordergroup.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/recordergroup.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** recordergroup.cpp 19 Aug 2010 12:47:57 -0000 1.19 --- recordergroup.cpp 25 Aug 2010 17:51:06 -0000 1.20 *************** *** 270,279 **** wxArrayInt selectedItems; if (!GetSelections(selectedItems) || (GetController(pos)->GetMaxPreroll().edit_rate.numerator == mMaxPreroll.edit_rate.numerator && GetController(pos)->GetMaxPreroll().edit_rate.denominator == mMaxPreroll.edit_rate.denominator)) { //the only recorder, or compatible edit rate (assume MaxPostroll has same edit rate) //everything about the recorder is now checked Select(pos); //populate the source tree ! mTree->AddRecorder(event.GetName(), event.GetTrackList(), event.GetTrackStatusList(), GetController(pos)->IsRouterRecorder(), mDoc); //tell the frame - wxCommandEvent frameEvent(EVT_RECORDERGROUP_MESSAGE, NEW_RECORDER); frameEvent.SetString(event.GetName()); frameEvent.SetInt(pos); //to allow quick disconnection --- 270,279 ---- wxArrayInt selectedItems; if (!GetSelections(selectedItems) || (GetController(pos)->GetMaxPreroll().edit_rate.numerator == mMaxPreroll.edit_rate.numerator && GetController(pos)->GetMaxPreroll().edit_rate.denominator == mMaxPreroll.edit_rate.denominator)) { //the only recorder, or compatible edit rate (assume MaxPostroll has same edit rate) + wxCommandEvent frameEvent(EVT_RECORDERGROUP_MESSAGE, NEW_RECORDER); //everything about the recorder is now checked Select(pos); //populate the source tree ! frameEvent.SetExtraLong(mTree->AddRecorder(event.GetName(), event.GetTrackList(), event.GetTrackStatusList(), GetController(pos)->IsRouterRecorder(), mDoc)); //tell the frame frameEvent.SetString(event.GetName()); frameEvent.SetInt(pos); //to allow quick disconnection *************** *** 526,530 **** } //track status ! mTree->SetTrackStatus(event.GetName(), ((IngexguiFrame*) GetParent())->IsRecording(), CHUNK_WAIT == mMode, event.GetTrackStatusList()); //will set record button and status indicator; if chunking, prevent a problem being indicated during the period when the recorder is stopped between chunks but the expected state is to be recording } else { //no status --- 526,534 ---- } //track status ! mTree->SetTrackStatus(event.GetName(), dynamic_cast<IngexguiFrame*>(GetParent())->IsRecording(), ! CHUNK_WAIT == mMode //doesn't matter if recorder is not recording during CHUNK_WAIT ! || IngexguiFrame::RUNNING_UP == dynamic_cast<IngexguiFrame*>(GetParent())->GetStatus() //recorders can be in either state during running up ! || IngexguiFrame::RUNNING_DOWN == dynamic_cast<IngexguiFrame*>(GetParent())->GetStatus(), //recorders can be in either state during running down ! event.GetTrackStatusList()); //will set record button and status indicator } else { //no status *************** *** 608,612 **** --- 612,620 ---- if ( GetController(i) && GetController(i)->IsOK() + #ifdef ALLOW_OVERLAPPED_RECORDINGS + && mTree->GetRecordEnables(GetName(i), enableList, true)) { //something's enabled for recording + #else && mTree->GetRecordEnables(GetName(i), enableList, CHUNK_RECORD_WAIT == mMode)) { //something's enabled for recording, and not already recording (unless third argument is non-zero) + #endif ProdAuto::MxfDuration preroll = mPreroll; if (CHUNK_RECORD_WAIT == mMode) preroll.samples = 0; //want to record exactly at the previously given timecode, and we should be later than this so can do it Index: player.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/player.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** player.cpp 19 Aug 2010 12:47:57 -0000 1.23 --- player.cpp 25 Aug 2010 17:51:06 -0000 1.24 *************** *** 69,73 **** mDivertKeyPresses(false), mOutputType(outputType), ! mAudioFollowsVideo(false) { //Controls --- 69,74 ---- mDivertKeyPresses(false), mOutputType(outputType), ! mAudioFollowsVideo(false), ! mRecording(false) { //Controls *************** *** 287,318 **** ///If player is enabled, puts in safe (non disk-accessing) "recording" mode, or returns it to the mode it was in before recording commenced. ///@param recording True to put into recording mode. void Player::Record(const bool recording) { ! if (recording) { ! mPreviousMode = mMode; //so that previous mode will be restored on stop, even if the player is disabled at the moment ! mModesAllowed[RECORDINGS] = false; ! mModesAllowed[FILES] = false; ! if (mEnabled) { #ifndef DISABLE_SHARED_MEM_SOURCE //E to E mode available ! if (ETOE == mMode) { //don't need to change mode ! if (PlayerState::PAUSED == mState) { ! //start playback as button to do this is not available during recording ! Play(); } - } - else { - //switch to E to E mode - SetMode(ETOE); - } #else ! Reset(); #endif } - } - else { - mModesAllowed[RECORDINGS] = true; - mModesAllowed[FILES] = mFileModeMxfFiles.GetCount() || mFileModeMovFile.Length(); - SetPreviousMode(); } } --- 288,323 ---- ///If player is enabled, puts in safe (non disk-accessing) "recording" mode, or returns it to the mode it was in before recording commenced. + ///Remembers previous setting so can be called more than once with the same state with no ill-effects ///@param recording True to put into recording mode. void Player::Record(const bool recording) { ! if (recording != mRecording) { ! mRecording = recording; ! if (recording) { ! mPreviousMode = mMode; //so that previous mode will be restored on stop, even if the player is disabled at the moment ! mModesAllowed[RECORDINGS] = false; ! mModesAllowed[FILES] = false; ! if (mEnabled) { #ifndef DISABLE_SHARED_MEM_SOURCE //E to E mode available ! if (ETOE == mMode) { //don't need to change mode ! if (PlayerState::PAUSED == mState) { ! //start playback as button to do this is not available during recording ! Play(); ! } ! } ! else { ! //switch to E to E mode ! SetMode(ETOE); } #else ! Reset(); #endif + } + } + else { + mModesAllowed[RECORDINGS] = true; + mModesAllowed[FILES] = mFileModeMxfFiles.GetCount() || mFileModeMovFile.Length(); + SetPreviousMode(); } } } Index: ticktree.h =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/ticktree.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ticktree.h 12 Aug 2010 16:35:38 -0000 1.11 --- ticktree.h 25 Aug 2010 17:51:06 -0000 1.12 *************** *** 46,52 **** public: TickTreeCtrl(wxWindow *, wxWindowID, const wxPoint& = wxDefaultPosition, const wxSize& = wxDefaultSize, const wxString & = wxT("")); ! void AddRecorder(const wxString &, const ProdAuto::TrackList_var &, const ProdAuto::TrackStatusList_var &, bool, wxXmlDocument &); void RemoveRecorder(const wxString &); - void Clear(); void EnableChanges(bool = true); --- 46,51 ---- public: TickTreeCtrl(wxWindow *, wxWindowID, const wxPoint& = wxDefaultPosition, const wxSize& = wxDefaultSize, const wxString & = wxT("")); ! bool AddRecorder(const wxString &, const ProdAuto::TrackList_var &, const ProdAuto::TrackStatusList_var &, bool, wxXmlDocument &); void RemoveRecorder(const wxString &); void Clear(); void EnableChanges(bool = true); *************** *** 56,66 **** bool IsRecording(); bool AllRecording(); bool UsingTapeIds(); ! bool TapeIdsOK(); bool HasRecorders(); bool IsUnknown(); bool HasProblem(); bool HasAllSignals(); - bool RecordingSuccessfully(); unsigned int EnabledTracks(); void SetRecorderStateUnknown(const wxString &, const wxString &); --- 55,65 ---- bool IsRecording(); bool AllRecording(); + bool AllStopped(); bool UsingTapeIds(); ! bool TapeIdsOK(wxXmlDocument &); bool HasRecorders(); bool IsUnknown(); bool HasProblem(); bool HasAllSignals(); unsigned int EnabledTracks(); void SetRecorderStateUnknown(const wxString &, const wxString &); *************** *** 82,89 **** wxTreeItemId FindRecorder(const wxString &); void OnLMouseDown(wxMouseEvent &); ! int SelectRecursively(wxTreeItemId, unsigned int &, bool = true, bool = false, bool = false); void SetRecorderState(const wxString &, bool, const wxString &); void ReportState(wxTreeItemId, bool = true); ! void ScanPackageNames(wxArrayString *, std::vector<bool> *, wxXmlNode * = 0); void AddMessage(const wxTreeItemId item, const wxString &); const wxString RetrieveMessage(const wxTreeItemId item); --- 81,88 ---- wxTreeItemId FindRecorder(const wxString &); void OnLMouseDown(wxMouseEvent &); ! int SelectRecursively(wxTreeItemId, unsigned int * = 0, bool = true, bool = false, bool = false); void SetRecorderState(const wxString &, bool, const wxString &); void ReportState(wxTreeItemId, bool = true); ! void ScanPackageNames(wxArrayString *, std::vector<bool> *, wxXmlNode * = 0, const bool = false); void AddMessage(const wxTreeItemId item, const wxString &); const wxString RetrieveMessage(const wxTreeItemId item); Index: dialogues.cpp =================================================================== RCS file: /cvsroot/ingex/ingex/studio/ace-tao/Ingexgui/src/dialogues.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** dialogues.cpp 19 Aug 2010 12:47:56 -0000 1.21 --- dialogues.cpp 25 Aug 2010 17:51:06 -0000 1.22 *************** *** 481,484 **** --- 481,502 ---- } + /// Returns the enabled state of tape IDs + /// @param doc The XML document. + bool SetTapeIdsDlg::AreTapeIdsEnabled(wxXmlDocument & doc) + { + wxXmlNode * tapeIdsNode = GetTapeIdsNode(doc); + return wxT("Yes") == tapeIdsNode->GetPropVal(wxT("Enabled"), wxT("Yes")); + } + + /// Saves the enabled state of tape IDs + /// @param doc The XML document. + void SetTapeIdsDlg::EnableTapeIds(wxXmlDocument & doc, bool enabled) + { + wxXmlNode * tapeIdsNode = GetTapeIdsNode(doc); + tapeIdsNode->DeleteProperty(wxT("Enabled")); + tapeIdsNode->SetProperties(new wxXmlProperty(wxT("Enabled"), enabled ? wxT("Yes") : wxT("No"))); + } + + /// Retrieves or creates the node in the given document containing tape IDs. /// Removes any child nodes not called "TapeId". |