Skip to content

Commit

Permalink
Merge branch 'master' into ms-ux-cat-control
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiw authored Sep 21, 2023
2 parents 40e4b09 + 239d608 commit 19126dc
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions USER_MANUAL.html
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ <h2 data-number="18.1" id="v1.9.3-tbd-2023"><span class="header-section-number">
<li>FreeDV Reporter: Fix regression preventing proper display of “RX Only” stations. (PR #542)</li>
<li>Default to the audio from the current TX mode if no modes decode (works around Codec2 bug with 1600 mode). (PR #544)</li>
<li>Fix bug preventing proper restore of selected tabs. (PR #548)</li>
<li>Clarify behavior of “On Top” menu option. (PR #549)</li>
</ul></li>
<li>Enhancements:
<ul>
Expand Down
1 change: 1 addition & 0 deletions USER_MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Default to the audio from the current TX mode if no modes decode (works around Codec2 bug with 1600 mode). (PR #544)
* Fix bug preventing proper restore of selected tabs. (PR #548)
* Improve labeling of PTT/CAT control options. (PR #550)
* Clarify behavior of "On Top" menu option. (PR #549)
2. Enhancements:
* Add configuration for background/foreground colors in FreeDV Reporter. (PR #545)
* Always connect to FreeDV Reporter (in view only mode if necessary), regardless of valid configuration. (PR #542, #547)
Expand Down
Binary file modified USER_MANUAL.pdf
Binary file not shown.
13 changes: 7 additions & 6 deletions src/ongui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,16 +358,17 @@ void MainFrame::OnCloseFrame(wxCloseEvent& event)
//-------------------------------------------------------------------------
void MainFrame::OnTop(wxCommandEvent& event)
{
int style = GetWindowStyle();
auto style = GetWindowStyle();

if (style & wxSTAY_ON_TOP)
{
style &= ~wxSTAY_ON_TOP;
}
else
// Clear wxSTAY_ON_TOP first if it's already set.
style &= ~wxSTAY_ON_TOP;

// (Re)set wxSTAY_ON_TOP depending on whether the menu option is checked.
if (event.IsChecked())
{
style |= wxSTAY_ON_TOP;
}

SetWindowStyle(style);
}

Expand Down
7 changes: 5 additions & 2 deletions src/topFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,13 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
m_menubarMain = new wxMenuBar(wxMB_DOCKABLE);
file = new wxMenu();

#if !defined(__WXGTK__)
/* "On Top" isn't reliable on Linux, so there's no point in having it visible. */
wxMenuItem* m_menuItemOnTop;
m_menuItemOnTop = new wxMenuItem(file, wxID_ANY, wxString(_("&On Top")) , _("Always Top Window"), wxITEM_NORMAL);
m_menuItemOnTop = new wxMenuItem(file, wxID_ANY, wxString(_("Keep &On Top")) , _("Always keeps FreeDV above other windows"), wxITEM_CHECK);
file->Append(m_menuItemOnTop);
this->Connect(m_menuItemOnTop->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnTop));
#endif // !defined(__WXGTK__)

wxMenuItem* m_menuItemExit;
m_menuItemExit = new wxMenuItem(file, ID_EXIT, wxString(_("E&xit")) , _("Exit Program"), wxITEM_NORMAL);
Expand Down Expand Up @@ -789,7 +793,6 @@ TopFrame::TopFrame(wxWindow* parent, wxWindowID id, const wxString& title, const
this->Connect(wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::topFrame_OnUpdateUI));
this->Connect(wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEventHandler(TopFrame::OnSystemColorChanged));
this->Connect(m_menuItemExit->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnExit));
this->Connect(m_menuItemOnTop->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnTop));

this->Connect(m_menuItemEasySetup->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(TopFrame::OnToolsEasySetup));
this->Connect(m_menuItemEasySetup->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(TopFrame::OnToolsEasySetupUI));
Expand Down

0 comments on commit 19126dc

Please sign in to comment.