forked from vslavik/poedit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into master_fork_travis
- Loading branch information
Showing
7 changed files
with
50 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -302,6 +302,7 @@ BEGIN_EVENT_TABLE(PoeditFrame, wxFrame) | |
EVT_MENU (XRCID("menu_purge_deleted"), PoeditFrame::OnPurgeDeleted) | ||
EVT_MENU (XRCID("menu_fuzzy"), PoeditFrame::OnFuzzyFlag) | ||
EVT_MENU (XRCID("menu_ids"), PoeditFrame::OnIDsFlag) | ||
EVT_MENU (XRCID("menu_warnings"), PoeditFrame::OnToggleWarnings) | ||
EVT_MENU (XRCID("sort_by_order"), PoeditFrame::OnSortByFileOrder) | ||
EVT_MENU (XRCID("sort_by_source"), PoeditFrame::OnSortBySource) | ||
EVT_MENU (XRCID("sort_by_translation"), PoeditFrame::OnSortByTranslation) | ||
|
@@ -514,6 +515,7 @@ PoeditFrame::PoeditFrame() : | |
m_toolbar = MainToolbar::Create(this); | ||
|
||
GetMenuBar()->Check(XRCID("menu_ids"), m_displayIDs); | ||
GetMenuBar()->Check(XRCID("menu_warnings"), Config::ShowWarnings()); | ||
|
||
if (wxConfigBase::Get()->ReadBool("/statusbar_shown", true)) | ||
CreateStatusBar(1, wxST_SIZEGRIP); | ||
|
@@ -1950,6 +1952,33 @@ void PoeditFrame::OnIDsFlag(wxCommandEvent&) | |
m_list->SetDisplayLines(m_displayIDs); | ||
} | ||
|
||
void PoeditFrame::OnToggleWarnings(wxCommandEvent& e) | ||
{ | ||
bool enable = (bool)e.GetInt(); | ||
Config::ShowWarnings(enable); | ||
|
||
// refresh display of items in the window: | ||
if (m_catalog) | ||
{ | ||
m_catalog->Validate(); | ||
if (m_list && m_list->sortOrder().errorsFirst) | ||
m_list->Sort(); | ||
} | ||
|
||
if (!enable) | ||
{ | ||
wxWindowPtr<wxMessageDialog> err(new wxMessageDialog | ||
( | ||
this, | ||
_("Warnings have been disabled."), | ||
"Poedit", | ||
wxOK | ||
)); | ||
err->SetExtendedMessage(_("If you disabled the warnings because of excessive false positives, please consider sending a sample file to [email protected] to help improve them.")); | ||
err->ShowWindowModalThenDo([err](int){}); | ||
} | ||
} | ||
|
||
void PoeditFrame::OnCopyFromSingular(wxCommandEvent&) | ||
{ | ||
m_editingArea->CopyFromSingular(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters