Merge pull request #527 from cjcliffe/feature/build_opts2

Build opts / fixes
This commit is contained in:
Charles J. Cliffe 2017-03-20 22:18:36 -04:00 committed by GitHub
commit ba24322fdf
6 changed files with 44 additions and 16 deletions

View File

@ -27,6 +27,8 @@ IF(CUSTOM_BUILD)
# feature flags
SET (CUBICSDR_ENABLE_VIEW_DEMOD ON CACHE BOOL "Enable Second Demodulator Spectrum/Waterfall view.")
SET (CUBICSDR_ENABLE_VIEW_SCOPE ON CACHE BOOL "Enable Demodulator Scope/Spectrum view.")
SET (CUBICSDR_ENABLE_ABOUT_DIALOG ON CACHE BOOL "Enable About Dialog.")
SET (CUBICSDR_DEFAULT_HIDE_BOOKMARKS OFF CACHE BOOL "Hide Bookmarks by Default.")
SET (CUBICSDR_MODEM_EXCLUDE CACHE "" "Comma-separated list of modems to exclude.")
IF (NOT CUBICSDR_HEADER_IMAGE STREQUAL "")
@ -52,8 +54,10 @@ ELSE()
SET (CUBICSDR_HEADER_IMAGE "")
SET (CUBICSDR_HEADER_BG "")
# feature flags
SET (CUBICSDR_ENABLE_VIEW_DEMOD TRUE)
SET (CUBICSDR_ENABLE_VIEW_SCOPE TRUE)
SET (CUBICSDR_ENABLE_VIEW_DEMOD ON)
SET (CUBICSDR_ENABLE_VIEW_SCOPE ON)
SET (CUBICSDR_DEFAULT_HIDE_BOOKMARKS OFF)
SET (CUBICSDR_ENABLE_ABOUT_DIALOG ON)
SET (CUBICSDR_EXCLUDE_MODEM "")
ENDIF()
@ -65,6 +69,14 @@ IF(CUBICSDR_ENABLE_VIEW_SCOPE)
ADD_DEFINITIONS( -DCUBICSDR_ENABLE_VIEW_SCOPE=1 )
ENDIF()
IF(CUBICSDR_DEFAULT_HIDE_BOOKMARKS)
ADD_DEFINITIONS( -DCUBICSDR_DEFAULT_HIDE_BOOKMARKS=1 )
ENDIF()
IF(CUBICSDR_ENABLE_ABOUT_DIALOG)
ADD_DEFINITIONS( -DCUBICSDR_ENABLE_ABOUT_DIALOG=1 )
ENDIF()
ADD_DEFINITIONS(
-DCUBICSDR_INSTALL_NAME="${CUBICSDR_INSTALL_NAME}"
-DCUBICSDR_VERSION="${CUBICSDR_VERSION}"

View File

@ -296,7 +296,11 @@ AppConfig::AppConfig() : configName("") {
mainSplit = -1;
visSplit = -1;
bookmarkSplit = 200;
#ifdef CUBICSDR_DEFAULT_HIDE_BOOKMARKS
bookmarksVisible.store(false);
#else
bookmarksVisible.store(true);
#endif
#ifdef USE_HAMLIB
rigEnabled.store(false);

View File

@ -121,7 +121,13 @@ AppFrame::AppFrame() :
for (auto mt_i : modemList) {
demodModeSelector->addChoice(mt_i);
}
#ifdef CUBICSDR_MODEM_EXCLUDE
demodModeSelector->setHelpTip("Use buttons to choose modulation type.");
#else
demodModeSelector->setHelpTip("Choose modulation type: Frequency Modulation (Hotkey F), Amplitude Modulation (A) and Lower (L), Upper (U), Double Side-Band and more.");
#endif
demodModeSelector->SetMinSize(wxSize(50,-1));
demodModeSelector->SetMaxSize(wxSize(50,-1));
demodTray->Add(demodModeSelector, 2, wxEXPAND | wxALL, 0);
@ -393,7 +399,9 @@ AppFrame::AppFrame() :
menuBar = new wxMenuBar;
wxMenu *menu = new wxMenu;
#ifndef __APPLE__
#ifdef CUBICSDR_ENABLE_ABOUT_DIALOG
menu->Append(wxID_ABOUT_CUBICSDR, "About " CUBICSDR_INSTALL_NAME);
#endif
#endif
menu->Append(wxID_SDR_DEVICES, "SDR Devices");
menu->AppendSeparator();
@ -406,14 +414,16 @@ AppFrame::AppFrame() :
menu->Append(wxID_RESET, "&Reset Session");
#ifndef __APPLE__
menu->AppendSeparator();
menu->Append(wxID_CLOSE);
menu->AppendSeparator();
menu->Append(wxID_CLOSE);
#else
if ( wxApp::s_macAboutMenuItemId != wxID_NONE ) {
wxString aboutLabel;
aboutLabel.Printf(_("About %s"), CUBICSDR_INSTALL_NAME);
menu->Append( wxApp::s_macAboutMenuItemId, aboutLabel);
}
#ifdef CUBICSDR_ENABLE_ABOUT_DIALOG
if ( wxApp::s_macAboutMenuItemId != wxID_NONE ) {
wxString aboutLabel;
aboutLabel.Printf(_("About %s"), CUBICSDR_INSTALL_NAME);
menu->Append( wxApp::s_macAboutMenuItemId, aboutLabel);
}
#endif
#endif
menuBar->Append(menu, wxT("&File"));

View File

@ -7,6 +7,10 @@
#define BOOKMARK_RECENTS_MAX 25
BookmarkEntry::~BookmarkEntry() {
delete node;
}
BookmarkMgr::BookmarkMgr() {
rangesSorted = false;
}

View File

@ -8,11 +8,12 @@
#include <vector>
#include <set>
#include <memory>
#include "DataTree.h"
#include "DemodulatorInstance.h"
class DataNode;
class BookmarkEntry {
public:
std::mutex busy_lock;
@ -26,10 +27,7 @@ public:
DataNode *node;
virtual ~BookmarkEntry() {
//free node
delete node;
}
virtual ~BookmarkEntry();
};

View File

@ -41,7 +41,7 @@ void ScopeContext::DrawTunerTitles(bool ppmMode) {
GLFont::Drawer refDrawingFont = GLFont::getFont(12, GLFont::getScaleFactor());
//better position frequency/bandwith labels according to font scale
double shiftFactor = GLFont::getScaleFactor();
double shiftFactor = GLFont::getScaleFactor()+0.5;
refDrawingFont.drawString(ppmMode?"Device PPM":"Frequency", -0.66f, -1.0 +hPos*shiftFactor, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);
refDrawingFont.drawString("Bandwidth", 0.0, -1.0 +hPos*shiftFactor, GLFont::GLFONT_ALIGN_CENTER, GLFont::GLFONT_ALIGN_CENTER, 0, 0, true);