diff --git a/CMakeLists.txt b/CMakeLists.txt index 2eeefc1e2..4f0033486 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ message(STATUS "Compilation date = XX${DATE_RESULT}XX") # set(FREEDV_VERSION_MAJOR 1) set(FREEDV_VERSION_MINOR 4) -set(FREEDV_VERSION_PATCH 2) +set(FREEDV_VERSION_PATCH 3) set(FREEDV_VERSION_SUFFIX "devel") set(FREEDV_VERSION ${FREEDV_VERSION_MAJOR}.${FREEDV_VERSION_MINOR}) @@ -397,6 +397,7 @@ if(WXRC) set(wxWidgets_wxrc_EXECUTABLE ${WXRC}) endif(WXRC) set(WX_VERSION_MIN 3.0.0) +set(WX_31_VERSION_MIN 3.1.3) find_package(wxWidgets REQUIRED core base aui html net adv) execute_process(COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}" --version OUTPUT_VARIABLE WX_VERSION) @@ -412,6 +413,16 @@ where wxWidgets libraries are installed (returned by is in LD_LIBRARY_PATH or equivalent variable and wxWidgets version is ${WX_VERSION_MIN} or above.") endif() + +if(APPLE) +if(WX_VERSION VERSION_EQUAL ${WX_31_VERSION_MIN} + OR WX_VERSION VERSION_GREATER ${WX_31_VERSION_MIN}) + set(DARK_MODE_DISABLE "false") +else() + set(DARK_MODE_DISABLE "true") +endif() +endif(APPLE) + if(wxWidgets_FOUND) include("${wxWidgets_USE_FILE}") list(APPEND FREEDV_LINK_LIBS ${wxWidgets_LIBRARIES}) @@ -470,6 +481,11 @@ add_subdirectory(contrib) message(STATUS "Build type will be: ${CMAKE_BUILD_TYPE}") +if(APPLE) +configure_file ("${PROJECT_SOURCE_DIR}/src/info.plist.in" + "${PROJECT_BINARY_DIR}/src/info.plist" ) +endif(APPLE) + # # Cpack NSIS configuration for Windows. # diff --git a/build_windows.sh b/build_windows.sh index 4e7131c6d..625a4b22f 100755 --- a/build_windows.sh +++ b/build_windows.sh @@ -47,7 +47,7 @@ make VERBOSE=1 # Finally, build freedv-gui cd $FREEDVGUIDIR && git pull mkdir -p $BUILD_DIR && cd $BUILD_DIR && rm -Rf * -$CMAKE -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR .. +$CMAKE -DCMAKE_BUILD_TYPE=Debug -DCODEC2_BUILD_DIR=$CODEC2DIR/$BUILD_DIR -DLPCNET_BUILD_DIR=$LPCNETDIR/$BUILD_DIR -DBOOTSTRAP_WXWIDGETS=1 .. make VERBOSE=1 diff --git a/cmake/BuildWxWidgets.cmake b/cmake/BuildWxWidgets.cmake index 9e1d34ba3..bf6f78c10 100644 --- a/cmake/BuildWxWidgets.cmake +++ b/cmake/BuildWxWidgets.cmake @@ -1,4 +1,4 @@ -set(WXWIDGETS_VERSION "3.0.4") +set(WXWIDGETS_VERSION "3.1.4") set(WXWIDGETS_TARBALL "wxWidgets-${WXWIDGETS_VERSION}") # If we're cross-compiling then we need to set the target host manually. @@ -10,7 +10,7 @@ endif() if(MINGW AND CMAKE_CROSSCOMPILING) set(CONFIGURE_COMMAND ./configure --build=${HOST} --host=${HOST} --target=${HOST} --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist) elseif(APPLE) - set(CONFIGURE_COMMAND ./configure --disable-shared --with-macosx-version-min=10.9 --prefix=${CMAKE_BINARY_DIR}/external/dist --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin CXXFLAGS=-stdlib=libc++\ -std=c++11\ -DWX_PRECOMP\ -O2\ -fno-strict-aliasing\ -fno-common) + set(CONFIGURE_COMMAND ./configure --disable-shared --with-macosx-version-min=10.10 --prefix=${CMAKE_BINARY_DIR}/external/dist --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin CXXFLAGS=-stdlib=libc++\ -std=c++11\ -DWX_PRECOMP\ -O2\ -fno-strict-aliasing\ -fno-common) else() # set(CONFIGURE_COMMAND "true") # set(MAKE_COMMAND $(MAKE) -C build/msw -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release PREFIX=${CMAKE_BINARY_DIR}/external/dist) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7cb3b9423..9b93a0137 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -108,7 +108,7 @@ if(APPLE) COMMAND rm ARGS -rf FreeDV.* dist_tmp COMMAND mkdir ARGS -p FreeDV.app/Contents/MacOS COMMAND mkdir ARGS -p FreeDV.app/Contents/Resources/English.lproj - COMMAND cp ARGS ${CMAKE_CURRENT_SOURCE_DIR}/info.plist FreeDV.app/Contents + COMMAND cp ARGS ${CMAKE_CURRENT_BINARY_DIR}/info.plist FreeDV.app/Contents COMMAND cp ARGS ${CMAKE_CURRENT_SOURCE_DIR}/freedv.icns FreeDV.app/Contents/Resources COMMAND echo ARGS -n "APPL????" > FreeDV.app/Contents/PkgInfo COMMAND cp ARGS freedv FreeDV.app/Contents/MacOS/FreeDV diff --git a/src/dlg_audiooptions.cpp b/src/dlg_audiooptions.cpp index e7abcb219..dd7a73cf9 100644 --- a/src/dlg_audiooptions.cpp +++ b/src/dlg_audiooptions.cpp @@ -100,12 +100,12 @@ AudioOptsDialog::AudioOptsDialog(wxWindow* parent, wxWindowID id, const wxString bSizer811 = new wxBoxSizer(wxHORIZONTAL); m_staticText51 = new wxStaticText(m_panelRx, wxID_ANY, _("Device:"), wxDefaultPosition, wxDefaultSize, 0); m_staticText51->Wrap(-1); - bSizer811->Add(m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + bSizer811->Add(m_staticText51, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_textCtrlRxIn = new wxTextCtrl(m_panelRx, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); bSizer811->Add(m_textCtrlRxIn, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); m_staticText6 = new wxStaticText(m_panelRx, wxID_ANY, _("Sample Rate:"), wxDefaultPosition, wxDefaultSize, 0); m_staticText6->Wrap(-1); - bSizer811->Add(m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + bSizer811->Add(m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_cbSampleRateRxIn = new wxComboBox(m_panelRx, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(90,-1), 0, NULL, wxCB_DROPDOWN); bSizer811->Add(m_cbSampleRateRxIn, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1); @@ -135,7 +135,7 @@ AudioOptsDialog::AudioOptsDialog(wxWindow* parent, wxWindowID id, const wxString bSizer81->Add(m_textCtrlRxOut, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); m_staticText10 = new wxStaticText(m_panelRx, wxID_ANY, _("Sample Rate:"), wxDefaultPosition, wxDefaultSize, 0); m_staticText10->Wrap(-1); - bSizer81->Add(m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + bSizer81->Add(m_staticText10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_cbSampleRateRxOut = new wxComboBox(m_panelRx, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(90,-1), 0, NULL, wxCB_DROPDOWN); bSizer81->Add(m_cbSampleRateRxOut, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1); @@ -172,12 +172,12 @@ AudioOptsDialog::AudioOptsDialog(wxWindow* parent, wxWindowID id, const wxString bSizer83 = new wxBoxSizer(wxHORIZONTAL); m_staticText12 = new wxStaticText(m_panelTx, wxID_ANY, _("Device:"), wxDefaultPosition, wxDefaultSize, 0); m_staticText12->Wrap(-1); - bSizer83->Add(m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + bSizer83->Add(m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_textCtrlTxIn = new wxTextCtrl(m_panelTx, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); bSizer83->Add(m_textCtrlTxIn, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); m_staticText11 = new wxStaticText(m_panelTx, wxID_ANY, _("Sample Rate:"), wxDefaultPosition, wxDefaultSize, 0); m_staticText11->Wrap(-1); - bSizer83->Add(m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + bSizer83->Add(m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_cbSampleRateTxIn = new wxComboBox(m_panelTx, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(90,-1), 0, NULL, wxCB_DROPDOWN); bSizer83->Add(m_cbSampleRateTxIn, 0, wxALL, 1); @@ -206,7 +206,7 @@ AudioOptsDialog::AudioOptsDialog(wxWindow* parent, wxWindowID id, const wxString bSizer82->Add(m_textCtrlTxOut, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); m_staticText71 = new wxStaticText(m_panelTx, wxID_ANY, _("Sample Rate:"), wxDefaultPosition, wxDefaultSize, 0); m_staticText71->Wrap(-1); - bSizer82->Add(m_staticText71, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 5); + bSizer82->Add(m_staticText71, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5); m_cbSampleRateTxOut = new wxComboBox(m_panelTx, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(90,-1), 0, NULL, wxCB_DROPDOWN); bSizer82->Add(m_cbSampleRateTxOut, 0, wxALL, 1); diff --git a/src/dlg_filter.cpp b/src/dlg_filter.cpp index ad7b9477d..9f265b42a 100644 --- a/src/dlg_filter.cpp +++ b/src/dlg_filter.cpp @@ -145,7 +145,7 @@ FilterDlg::FilterDlg(wxWindow* parent, bool running, bool *newMicInFilter, bool // Spectrum Plots ----------------------------------------------------------- - long nb_style = wxAUI_NB_BOTTOM | wxAUI_NB_TAB_SPLIT | wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS; + long nb_style = wxNB_BOTTOM; m_auiNotebook = new AuiNotebookNoKbd(this, wxID_ANY, wxDefaultPosition, wxSize(-1,200), nb_style); m_auiNotebook->SetFont(wxFont(8, 70, 90, 90, false, wxEmptyString)); @@ -261,7 +261,7 @@ void FilterDlg::newLPCPFControl(wxSlider **slider, wxStaticText **stValue, wxSiz wxBoxSizer *bs = new wxBoxSizer(wxHORIZONTAL); wxStaticText* st = new wxStaticText(this, wxID_ANY, controlName, wxDefaultPosition, wxSize(70,-1), wxALIGN_RIGHT); - bs->Add(st, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 2); + bs->Add(st, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2); *slider = new wxSlider(this, wxID_ANY, 0, 0, SLIDER_MAX, wxDefaultPosition, wxSize(SLIDER_LENGTH,wxDefaultCoord)); bs->Add(*slider, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2); @@ -275,13 +275,13 @@ void FilterDlg::newLPCPFControl(wxSlider **slider, wxStaticText **stValue, wxSiz void FilterDlg::newEQControl(wxSlider** slider, wxStaticText** value, wxStaticBoxSizer *bs, wxString controlName) { wxStaticText* label = new wxStaticText(this, wxID_ANY, controlName, wxDefaultPosition, wxDefaultSize, wxALIGN_RIGHT); - bs->Add(label, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxALL, 0); + bs->Add(label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); *slider = new wxSlider(this, wxID_ANY, 0, 0, SLIDER_MAX, wxDefaultPosition, wxSize(SLIDER_LENGTH,wxDefaultCoord)); bs->Add(*slider, 1, wxALIGN_CENTER_VERTICAL|wxALL, 0); *value = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(40,-1), wxALIGN_LEFT); - bs->Add(*value, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxRIGHT, 5); + bs->Add(*value, 0, wxALIGN_CENTER_VERTICAL, 5); } EQ FilterDlg::newEQ(wxSizer *bs, wxString eqName, float maxFreqHz, bool enableQ) diff --git a/src/dlg_filter.h b/src/dlg_filter.h index 9fe8eb235..365dd7e8d 100644 --- a/src/dlg_filter.h +++ b/src/dlg_filter.h @@ -48,17 +48,17 @@ typedef struct { //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= // Class AuiNotebookNoKbd //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-= -class AuiNotebookNoKbd : public wxAuiNotebook +class AuiNotebookNoKbd : public wxNotebook { - // This class inherits from wxAuiNotebook, and the only difference between + // This class inherits from wxNotebook, and the only difference between // it and the wx notebook is functionality to ignore tabbing to it. This // is a control with no user input, thus blind hams have no reason to tab // to it. public: AuiNotebookNoKbd(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, - const wxSize &size=wxDefaultSize, long style=wxAUI_NB_DEFAULT_STYLE) : - wxAuiNotebook(parent, id, pos, size, style) {;} + const wxSize &size=wxDefaultSize, long style=0) : + wxNotebook(parent, id, pos, size, style) {;} bool AcceptsFocusFromKeyboard() const { return false; } }; @@ -71,7 +71,7 @@ class FilterDlg : public wxDialog public: FilterDlg( wxWindow* parent, bool running, bool *newMicInFilter, bool *newSpkOutFilter, wxWindowID id = wxID_ANY, const wxString& title = _("Filter"), - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800, 630 ), + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800, 675 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~FilterDlg(); diff --git a/src/dlg_options.cpp b/src/dlg_options.cpp index 0a3509e4f..56fd05878 100644 --- a/src/dlg_options.cpp +++ b/src/dlg_options.cpp @@ -60,9 +60,9 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c m_txtCtrlCallSign = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0); m_txtCtrlCallSign->SetToolTip(_("Txt Msg you can send along with Voice")); - sbSizer_callSign->Add(m_txtCtrlCallSign, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 3); + sbSizer_callSign->Add(m_txtCtrlCallSign, 0, wxALL|wxEXPAND, 3); - bSizer30->Add(sbSizer_callSign,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_callSign,0, wxALL|wxEXPAND, 3); //---------------------------------------------------------------------- // Voice Keyer @@ -91,7 +91,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c m_txtCtrlVoiceKeyerRepeats->SetToolTip(_("How long to wait in Rx mode before repeat")); staticBoxSizer28a->Add(m_txtCtrlVoiceKeyerRepeats, 0, 0, 5); - bSizer30->Add(staticBoxSizer28a,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(staticBoxSizer28a,0, wxALL|wxEXPAND, 3); //------------------------------ // FreeDV 700 Options @@ -113,7 +113,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c m_ckboxFreeDV700ManualUnSync = new wxCheckBox(this, wxID_ANY, _("700D Manual UnSync"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); sbSizer_freedv700->Add(m_ckboxFreeDV700ManualUnSync, 0, wxALIGN_LEFT, 0); - bSizer30->Add(sbSizer_freedv700, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_freedv700, 0, wxALL|wxEXPAND, 3); //------------------------------ // Phase Est Options @@ -128,7 +128,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c m_ckboxPhaseEstDPSK = new wxCheckBox(this, wxID_ANY, _("DPSK"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); sbSizer_freedvPhaseEst->Add(m_ckboxPhaseEstDPSK, 0, wxALIGN_LEFT, 0); - bSizer30->Add(sbSizer_freedvPhaseEst, 0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_freedvPhaseEst, 0, wxALL|wxEXPAND, 3); //------------------------------ // Half/Full duplex selection @@ -138,7 +138,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c wxStaticBoxSizer* sbSizer_duplex = new wxStaticBoxSizer(sb_duplex, wxHORIZONTAL); m_ckHalfDuplex = new wxCheckBox(this, wxID_ANY, _("Half Duplex"), wxDefaultPosition, wxSize(-1,-1), 0); sbSizer_duplex->Add(m_ckHalfDuplex, 0, wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 5); - bSizer30->Add(sbSizer_duplex,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_duplex,0, wxALL|wxEXPAND, 3); //------------------------------ // Test Frames/Channel simulation check box @@ -161,7 +161,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c m_txtAttnCarrier = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(30,-1), 0, wxTextValidator(wxFILTER_DIGITS)); sbSizer_testFrames->Add(m_txtAttnCarrier, 0, wxALIGN_LEFT, 0); - bSizer30->Add(sbSizer_testFrames,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_testFrames,0, wxALL|wxEXPAND, 3); //------------------------------ // Interfering tone @@ -180,7 +180,7 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c m_txtToneAmplitude = new wxTextCtrl(this, wxID_ANY, "1000", wxDefaultPosition, wxSize(60,-1), 0, wxTextValidator(wxFILTER_DIGITS)); sbSizer_tone->Add(m_txtToneAmplitude, 0, wxALIGN_LEFT, 0); - bSizer30->Add(sbSizer_tone,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_tone,0, wxALL|wxEXPAND, 3); #ifdef __EXPERIMENTAL_UDP__ //------------------------------ @@ -290,13 +290,13 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c wxStaticBox* sb_udp = new wxStaticBox(this, wxID_ANY, _("UDP Messages")); sbSizer_udp = new wxStaticBoxSizer(sb_udp, wxHORIZONTAL); m_ckbox_udp_enable = new wxCheckBox(this, wxID_ANY, _("Enable UDP Messages UDP Port Number:"), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); - sbSizer_udp->Add(m_ckbox_udp_enable, 0, wxALIGN_CENTER_HORIZONTAL, 5); + sbSizer_udp->Add(m_ckbox_udp_enable, 0, 0, 5); m_txt_udp_port = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(50,-1), 0, wxTextValidator(wxFILTER_DIGITS)); - sbSizer_udp->Add(m_txt_udp_port, 0, wxALIGN_CENTER_HORIZONTAL, 5); + sbSizer_udp->Add(m_txt_udp_port, 0, 0, 5); m_btn_udp_test = new wxButton(this, wxID_ANY, _("Test"), wxDefaultPosition, wxDefaultSize, 0); sbSizer_udp->Add(m_btn_udp_test, 0, wxALIGN_LEFT, 5); - bSizer30->Add(sbSizer_udp,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_udp,0, wxALL|wxEXPAND, 3); //---------------------------------------------------------- // FIFO and PortAudio under/overflow counters used for debug @@ -345,14 +345,14 @@ OptionsDlg::OptionsDlg(wxWindow* parent, wxWindowID id, const wxString& title, c // text lines with fifo counters m_textPA1 = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - sbSizer_fifo->Add(m_textPA1, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 1); + sbSizer_fifo->Add(m_textPA1, 0, wxALIGN_LEFT, 1); m_textPA2 = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - sbSizer_fifo->Add(m_textPA2, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 1); + sbSizer_fifo->Add(m_textPA2, 0, wxALIGN_LEFT, 1); m_textFifos = new wxStaticText(this, wxID_ANY, wxT(""), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); - sbSizer_fifo->Add(m_textFifos, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL, 1); + sbSizer_fifo->Add(m_textFifos, 0, wxALIGN_LEFT, 1); - bSizer30->Add(sbSizer_fifo,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + bSizer30->Add(sbSizer_fifo,0, wxALL|wxEXPAND, 3); //------------------------------ // OK - Cancel - Apply Buttons diff --git a/src/dlg_ptt.cpp b/src/dlg_ptt.cpp index 093ac34b8..424858c48 100644 --- a/src/dlg_ptt.cpp +++ b/src/dlg_ptt.cpp @@ -122,46 +122,46 @@ ComPortsDlg::ComPortsDlg(wxWindow* parent, wxWindowID id, const wxString& title, m_ckUseSerialPTT = new wxCheckBox(this, wxID_ANY, _("Use Serial Port PTT"), wxDefaultPosition, wxSize(-1,-1), 0); m_ckUseSerialPTT->SetValue(false); - gridSizer200->Add(m_ckUseSerialPTT, 1, wxALIGN_CENTER|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2); + gridSizer200->Add(m_ckUseSerialPTT, 1, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, 2); m_staticText12 = new wxStaticText(this, wxID_ANY, _("Serial Device: "), wxDefaultPosition, wxDefaultSize, 0); m_staticText12->Wrap(-1); gridSizer200->Add(m_staticText12, 1,wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 2); m_cbCtlDevicePath = new wxComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(140, -1), 0, NULL, wxCB_DROPDOWN); - gridSizer200->Add(m_cbCtlDevicePath, 1, wxEXPAND|wxALIGN_CENTER|wxALIGN_RIGHT, 2); + gridSizer200->Add(m_cbCtlDevicePath, 1, wxEXPAND, 2); bSizer83->Add(gridSizer200, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxALL, 2); - staticBoxSizer31->Add(bSizer83, 1, wxALIGN_CENTER_VERTICAL|wxALL, 1); + staticBoxSizer31->Add(bSizer83, 1, wxALL, 1); #endif wxBoxSizer* boxSizer19 = new wxBoxSizer(wxVERTICAL); staticBoxSizer17->Add(boxSizer19, 1, wxEXPAND, 5); wxStaticBoxSizer* staticBoxSizer16 = new wxStaticBoxSizer( new wxStaticBox(this, wxID_ANY, _("Signal polarity")), wxHORIZONTAL); - boxSizer19->Add(staticBoxSizer16, 1, wxEXPAND|wxALIGN_CENTER|wxALIGN_RIGHT, 5); + boxSizer19->Add(staticBoxSizer16, 1, wxEXPAND, 5); wxGridSizer* gridSizer17 = new wxGridSizer(2, 2, 0, 0); - staticBoxSizer16->Add(gridSizer17, 1, wxEXPAND|wxALIGN_RIGHT, 5); + staticBoxSizer16->Add(gridSizer17, 1, wxEXPAND, 5); m_rbUseDTR = new wxRadioButton(this, wxID_ANY, _("Use DTR"), wxDefaultPosition, wxSize(-1,-1), 0); m_rbUseDTR->SetToolTip(_("Toggle DTR line for PTT")); m_rbUseDTR->SetValue(1); - gridSizer17->Add(m_rbUseDTR, 0, wxALIGN_CENTER|wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL, 5); + gridSizer17->Add(m_rbUseDTR, 0, wxALIGN_CENTER|wxALIGN_CENTER_VERTICAL, 5); m_ckDTRPos = new wxCheckBox(this, wxID_ANY, _("DTR = +V"), wxDefaultPosition, wxSize(-1,-1), 0); m_ckDTRPos->SetToolTip(_("Set Polarity of the DTR line")); m_ckDTRPos->SetValue(false); - gridSizer17->Add(m_ckDTRPos, 0, wxALIGN_CENTER|wxALIGN_RIGHT, 5); + gridSizer17->Add(m_ckDTRPos, 0, wxALIGN_CENTER, 5); m_rbUseRTS = new wxRadioButton(this, wxID_ANY, _("Use RTS"), wxDefaultPosition, wxSize(-1,-1), 0); m_rbUseRTS->SetToolTip(_("Toggle the RTS pin for PTT")); m_rbUseRTS->SetValue(1); - gridSizer17->Add(m_rbUseRTS, 0, wxALIGN_CENTER|wxALIGN_RIGHT, 5); + gridSizer17->Add(m_rbUseRTS, 0, wxALIGN_CENTER, 5); m_ckRTSPos = new wxCheckBox(this, wxID_ANY, _("RTS = +V"), wxDefaultPosition, wxSize(-1,-1), 0); m_ckRTSPos->SetValue(false); m_ckRTSPos->SetToolTip(_("Set Polarity of the RTS line")); - gridSizer17->Add(m_ckRTSPos, 0, wxALIGN_CENTER|wxALIGN_RIGHT, 5); + gridSizer17->Add(m_ckRTSPos, 0, wxALIGN_CENTER, 5); //---------------------------------------------------------------------- // OK - Cancel - Apply diff --git a/src/fdmdv2_plot.cpp b/src/fdmdv2_plot.cpp index 1b85cd900..99a636e6f 100644 --- a/src/fdmdv2_plot.cpp +++ b/src/fdmdv2_plot.cpp @@ -117,7 +117,21 @@ void PlotPanel::OnSize(wxSizeEvent& event) { if(!m_oImage.IsOk()) { - m_oImage.Create(m_rCtrl.GetWidth(), m_rCtrl.GetHeight(), true); + int proposedWidth = m_rCtrl.GetWidth(); + if (proposedWidth == 0) + { + // We don't have a width yet; assume 1. We will rescale + // to proper width next time through. + proposedWidth = 1; + } + int proposedHeight = m_rCtrl.GetHeight(); + if (proposedHeight == 0) + { + // We don't have a height yet; assume 1. We will rescale + // to proper height next time through. + proposedHeight = 1; + } + m_oImage.Create(proposedWidth, proposedHeight, true); } else { diff --git a/src/info.plist b/src/info.plist deleted file mode 100644 index 444ebf224..000000000 --- a/src/info.plist +++ /dev/null @@ -1,110 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - NSMicrophoneUsageDescription - Required to transmit your voice to the other party. - CFBundleExecutable - freedv - CFBundleIconFile - - CFBundleIdentifier - org.freedv.freedv - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - FreeDV - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - 10.5 - NSHumanReadableCopyright - Copyright © 2012 FreeDV. All rights reserved. - - CFBundleIconFile - freedv - NSPrincipalClass - NSApplication - - - - - - - CFBundleDevelopmentRegion - en - NSMicrophoneUsageDescription - Required to transmit your voice to the other party. - CFBundleExecutable - freedv - CFBundleIconFile - - CFBundleIdentifier - org.freedv.freedv - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - FreeDV - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - 10.5 - NSHumanReadableCopyright - Copyright © 2012 FreeDV. All rights reserved. - - NSPrincipalClass - NSApplication - - - - - - - CFBundleDevelopmentRegion - en - NSMicrophoneUsageDescription - Required to transmit your voice to the other party. - CFBundleExecutable - freedv - CFBundleIconFile - - CFBundleIdentifier - org.freedv.freedv - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - FreeDV - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSMinimumSystemVersion - 10.5 - NSHumanReadableCopyright - Copyright © 2012 FreeDV. All rights reserved. - - NSPrincipalClass - NSApplication - - diff --git a/src/info.plist.in b/src/info.plist.in new file mode 100644 index 000000000..9d335540e --- /dev/null +++ b/src/info.plist.in @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + NSMicrophoneUsageDescription + Required to transmit your voice to the other party. + CFBundleExecutable + freedv + CFBundleIconFile + + CFBundleIdentifier + org.freedv.freedv + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + FreeDV + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + 10.5 + NSHumanReadableCopyright + Copyright © 2012 FreeDV. All rights reserved. + + CFBundleIconFile + freedv + NSPrincipalClass + NSApplication + NSRequiresAquaSystemAppearance + <@DARK_MODE_DISABLE@ /> + + diff --git a/src/topFrame.cpp b/src/topFrame.cpp index ac8955701..c7523a396 100644 --- a/src/topFrame.cpp +++ b/src/topFrame.cpp @@ -33,10 +33,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w { this->SetSizeHints(wxDefaultSize, wxDefaultSize); this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); - this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT)); - this->SetSizeHints(wxDefaultSize, wxDefaultSize); - this->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)); - this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DLIGHT)); + this->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)); //===================================================== // Menubar Setup m_menubarMain = new wxMenuBar(wxMB_DOCKABLE); @@ -143,7 +140,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_ckboxSNR->SetToolTip(_("Smooth but slow SNR estimation")); snrSizer->Add(m_ckboxSNR, 0, wxALIGN_CENTER_HORIZONTAL, 5); - leftSizer->Add(snrSizer, 2, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 1); + leftSizer->Add(snrSizer, 2, wxEXPAND|wxALL, 1); //------------------------------ // Sync Indicator box @@ -162,7 +159,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w sbSizer3_33->Add(m_BtnReSync, 0, wxALIGN_CENTRE , 1); m_textInterleaverSync->Disable(); - leftSizer->Add(sbSizer3_33,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + leftSizer->Add(sbSizer3_33,0, wxALL|wxEXPAND, 3); //------------------------------ // BER Frames box @@ -191,7 +188,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_textCodec2Var = new wxStaticText(this, wxID_ANY, wxT("Var: 0"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); sbSizer_ber->Add(m_textCodec2Var, 0, wxALIGN_LEFT, 1); - leftSizer->Add(sbSizer_ber,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + leftSizer->Add(sbSizer_ber,0, wxALL|wxEXPAND, 3); //------------------------------ // Signal Level(vert. bargraph) @@ -207,7 +204,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_gaugeLevel->SetToolTip(_("Peak of From Radio in Rx, or peak of From Mic in Tx mode. If Red you should reduce your levels")); levelSizer->Add(m_gaugeLevel, 1, wxALIGN_CENTER_HORIZONTAL|wxALL, 10); - leftSizer->Add(levelSizer, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 1); + leftSizer->Add(levelSizer, 2, wxALL|wxEXPAND, 1); bSizer1->Add(leftSizer, 0, wxALL|wxEXPAND, 5); @@ -230,7 +227,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_auiNbookCtrl->SetFont(wxFont(8, 70, 90, 90, false, wxEmptyString)); upperSizer->Add(m_auiNbookCtrl, 1, wxALIGN_TOP|wxEXPAND, 1); - centerSizer->Add(upperSizer, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALIGN_TOP|wxEXPAND, 0); + centerSizer->Add(upperSizer, 1, wxALIGN_TOP|wxEXPAND, 0); // lower middle used for user ID @@ -242,7 +239,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_txtSSBStatus = new wxStaticText(this, wxID_ANY, wxT("unk"), wxDefaultPosition, wxDefaultSize, wxALIGN_LEFT); m_txtSSBStatus->Enable(false); // enabled only if Hamlib is turned on m_txtSSBStatus->SetMinSize(wxSize(40,-1)); - ssbStatusSizer->Add(m_txtSSBStatus, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 1); + ssbStatusSizer->Add(m_txtSSBStatus, 0, wxALL|wxEXPAND, 1); lowerSizer->Add(ssbStatusSizer, 0, wxALIGN_CENTER_VERTICAL|wxALL, 1); m_BtnCallSignReset = new wxButton(this, wxID_ANY, _("Clear"), wxDefaultPosition, wxDefaultSize, 0); @@ -252,7 +249,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w bSizer15 = new wxBoxSizer(wxVERTICAL); m_txtCtrlCallSign = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY); m_txtCtrlCallSign->SetToolTip(_("Call Sign of transmitting station will appear here")); - bSizer15->Add(m_txtCtrlCallSign, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5); + bSizer15->Add(m_txtCtrlCallSign, 0, wxALL|wxEXPAND, 5); lowerSizer->Add(bSizer15, 1, wxEXPAND, 5); #ifdef __EXPERIMENTAL_UDP__ @@ -296,8 +293,8 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w lowerSizer->Add(bSizer141, 0, wxALIGN_RIGHT, 5); #endif - centerSizer->Add(lowerSizer, 0, wxALIGN_BOTTOM|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 2); - bSizer1->Add(centerSizer, 4, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 1); + centerSizer->Add(lowerSizer, 0, wxEXPAND, 2); + bSizer1->Add(centerSizer, 4, wxALL|wxEXPAND, 1); //===================================================== // Right side @@ -329,7 +326,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_ckboxSQ = new wxCheckBox(this, wxID_ANY, _(""), wxDefaultPosition, wxDefaultSize, wxCHK_2STATE); sbSizer3->Add(m_ckboxSQ, 0, wxALIGN_CENTER_HORIZONTAL, 0); - rightSizer->Add(sbSizer3, 2, wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 0); + rightSizer->Add(sbSizer3, 2, wxEXPAND, 0); //rightSizer->Add(sbSizer3_33,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); @@ -385,7 +382,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w sbSizer_mode->Add(m_rb2000, 0, wxALIGN_LEFT|wxALL, 1); #endif - rightSizer->Add(sbSizer_mode,0, wxALIGN_CENTER_HORIZONTAL|wxALL|wxEXPAND, 3); + rightSizer->Add(sbSizer_mode,0, wxALL|wxEXPAND, 3); #ifdef MOVED_TO_OPTIONS_DIALOG /* new --- */ @@ -462,7 +459,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_togBtnSplit->SetToolTip(_("Toggle split frequency mode.")); bSizer151->Add(m_togBtnSplit, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1); - sbSizer5->Add(bSizer151, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 1); + sbSizer5->Add(bSizer151, 0, wxALL|wxEXPAND, 1); wxBoxSizer* bSizer13; bSizer13 = new wxBoxSizer(wxVERTICAL); @@ -506,7 +503,7 @@ TopFrame::TopFrame(wxString plugInName, wxWindow* parent, wxWindowID id, const w m_btnTogPTT->SetToolTip(_("Push to Talk - Switch between Receive and Transmit - you can also use the space bar ")); bSizer11->Add(m_btnTogPTT, 1, wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 1); sbSizer5->Add(bSizer11, 2, wxEXPAND, 1); - rightSizer->Add(sbSizer5, 2, wxALIGN_CENTER|wxALL|wxEXPAND, 3); + rightSizer->Add(sbSizer5, 2, wxALL|wxEXPAND, 3); bSizer1->Add(rightSizer, 0, wxALL|wxEXPAND, 3); this->SetSizer(bSizer1); this->Layout();