mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-02 06:04:39 -04:00
Recording path notify, bookmark panel record buttons, tweaks and adjustments
This commit is contained in:
@@ -816,8 +816,16 @@ void BookmarkView::activeSelection(DemodulatorInstancePtr dsel) {
|
||||
clearButtons();
|
||||
|
||||
addBookmarkChoice(m_buttonPanel);
|
||||
addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive ));
|
||||
|
||||
if (dsel->isActive() && !(dsel->isRecording())) {
|
||||
addButton(m_buttonPanel, "Start Recording", wxCommandEventHandler( BookmarkView::onStartRecording ));
|
||||
} else {
|
||||
addButton(m_buttonPanel, "Stop Recording", wxCommandEventHandler( BookmarkView::onStopRecording ));
|
||||
}
|
||||
|
||||
addButton(m_buttonPanel, "Remove Active", wxCommandEventHandler( BookmarkView::onRemoveActive ));
|
||||
|
||||
|
||||
showProps();
|
||||
showButtons();
|
||||
refreshLayout();
|
||||
@@ -1149,6 +1157,30 @@ void BookmarkView::onRemoveActive( wxCommandEvent& /* event */ ) {
|
||||
}
|
||||
}
|
||||
|
||||
void BookmarkView::onStartRecording( wxCommandEvent& /* event */ ) {
|
||||
TreeViewItem *curSel = itemToTVI(m_treeView->GetSelection());
|
||||
|
||||
if (curSel && curSel->type == TreeViewItem::TREEVIEW_ITEM_TYPE_ACTIVE) {
|
||||
if (!curSel->demod->isRecording() && wxGetApp().getConfig()->verifyRecordingPath()) {
|
||||
curSel->demod->setRecording(true);
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void BookmarkView::onStopRecording( wxCommandEvent& /* event */ ) {
|
||||
TreeViewItem *curSel = itemToTVI(m_treeView->GetSelection());
|
||||
|
||||
if (curSel && curSel->type == TreeViewItem::TREEVIEW_ITEM_TYPE_ACTIVE) {
|
||||
if (curSel->demod->isRecording()) {
|
||||
curSel->demod->setRecording(false);
|
||||
wxGetApp().getBookmarkMgr().updateActiveList();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void BookmarkView::onRemoveBookmark( wxCommandEvent& /* event */ ) {
|
||||
if (editingLabel) {
|
||||
|
||||
@@ -145,6 +145,8 @@ protected:
|
||||
void onBookmarkChoice( wxCommandEvent &event );
|
||||
|
||||
void onRemoveActive( wxCommandEvent& event );
|
||||
void onStartRecording( wxCommandEvent& event );
|
||||
void onStopRecording( wxCommandEvent& event );
|
||||
void onRemoveBookmark( wxCommandEvent& event );
|
||||
|
||||
void onActivateBookmark( wxCommandEvent& event );
|
||||
|
||||
Reference in New Issue
Block a user