Exemplo n.º 1
0
    void EnableSyncWithCrowdin(bool on) override
    {
        auto tool = m_tb->FindById(m_idUpdate);

        if (on)
        {
            tool->SetLabel(_("Sync"));
            tool->SetShortHelp(_("Synchronize the translation with Crowdin"));
            #ifdef __WXGTK3__
            SetIcon(4 , "poedit-sync-symbolic");
            #else
            m_tb->SetToolNormalBitmap(m_idUpdate, wxArtProvider::GetBitmap("poedit-sync", wxART_TOOLBAR));
            #endif
            #ifdef __WXMSW__
            m_tb->SetToolDisabledBitmap(m_idUpdate, wxArtProvider::GetBitmap("poedit-sync@disabled", wxART_TOOLBAR));
            #endif
        }
        else
        {
            tool->SetLabel(MSW_OR_OTHER(_("Update from code"), _("Update from Code")));
            tool->SetShortHelp(_("Update catalog - synchronize it with sources"));
            #ifdef __WXGTK3__
            SetIcon(4 , "poedit-update-symbolic");
            #else
            m_tb->SetToolNormalBitmap(m_idUpdate, wxArtProvider::GetBitmap("poedit-update", wxART_TOOLBAR));
            #endif
            #ifdef __WXMSW__
            m_tb->SetToolDisabledBitmap(m_idUpdate, wxArtProvider::GetBitmap("poedit-update@disabled", wxART_TOOLBAR));
            #endif
        }
    }
Exemplo n.º 2
0
void AttentionMessage::AddDontShowAgain()
{
    auto id = m_id;
    AddAction(
        MSW_OR_OTHER(_("Don't show again"), _("Don't Show Again")), [id]{
        AddToBlacklist(id);
    });
}