Exemplo n.º 1
0
bool tm_winsparkle::setAutomaticChecks (bool enable)
{
  if (running) return false;
#if WIN_SPARKLE_CHECK_VERSION(0,4,0)
  win_sparkle_set_automatic_check_for_updates (enable ? 1 : 0);
#endif
  return true;
}
Exemplo n.º 2
0
void Updater::setEnabled(bool enable) {
	win_sparkle_set_automatic_check_for_updates(enable);
}
Exemplo n.º 3
0
void PreferencesDialog::TransferFrom(wxConfigBase *cfg)
{
    cfg->Write(_T("translator_name"),
               XRCCTRL(*this, "user_name", wxTextCtrl)->GetValue());
    cfg->Write(_T("translator_email"),
               XRCCTRL(*this, "user_email", wxTextCtrl)->GetValue());
    cfg->Write(_T("compile_mo"),
               XRCCTRL(*this, "compile_mo", wxCheckBox)->GetValue());
    cfg->Write(_T("show_summary"),
               XRCCTRL(*this, "show_summary", wxCheckBox)->GetValue());
    cfg->Write(_T("manager_startup"),
               XRCCTRL(*this, "manager_startup", wxCheckBox)->GetValue());
    cfg->Write(_T("focus_to_text"),
               XRCCTRL(*this, "focus_to_text", wxCheckBox)->GetValue());
    cfg->Write(_T("comment_window_editable"),
               XRCCTRL(*this, "comment_window_editable", wxCheckBox)->GetValue());
    cfg->Write(_T("keep_crlf"),
               XRCCTRL(*this, "keep_crlf", wxCheckBox)->GetValue());
#ifdef USE_SPELLCHECKING
    cfg->Write(_T("enable_spellchecking"),
               XRCCTRL(*this, "enable_spellchecking", wxCheckBox)->GetValue());
#endif

    wxFont listFont = XRCCTRL(*this, "font_list", wxFontPickerCtrl)->GetSelectedFont();
    wxFont textFont = XRCCTRL(*this, "font_text", wxFontPickerCtrl)->GetSelectedFont();

    cfg->Write(_T("custom_font_list_use"),
               listFont.IsOk() && XRCCTRL(*this, "use_font_list", wxCheckBox)->GetValue());
    cfg->Write(_T("custom_font_text_use"),
               textFont.IsOk() && XRCCTRL(*this, "use_font_text", wxCheckBox)->GetValue());
    if ( listFont.IsOk() )
        cfg->Write(_T("custom_font_list_name"), listFont.GetNativeFontInfoDesc());
    if ( textFont.IsOk() )
        cfg->Write(_T("custom_font_text_name"), textFont.GetNativeFontInfoDesc());

    static const wxChar *formats[] = { _T("unix"), _T("win") };
    cfg->Write(_T("crlf_format"), formats[
                   XRCCTRL(*this, "crlf_format", wxChoice)->GetSelection()]);

    m_parsers.Write(cfg);

#ifdef USE_TRANSMEM
    wxArrayString langs;
    XRCCTRL(*this, "tm_langs", wxEditableListBox)->GetStrings(langs);
    wxString languages;
    for (size_t i = 0; i < langs.GetCount(); i++)
    {
        if (i != 0) languages << _T(':');
        languages << langs[i];
    }
    cfg->Write(_T("TM/languages"), languages);
    cfg->Write(_T("TM/max_omitted"),
               (long)XRCCTRL(*this, "tm_omits", wxSpinCtrl)->GetValue());
    cfg->Write(_T("TM/max_delta"),
               (long)XRCCTRL(*this, "tm_delta", wxSpinCtrl)->GetValue());
    cfg->Write(_T("use_tm_when_updating"),
               XRCCTRL(*this, "tm_automatic", wxCheckBox)->GetValue());
#endif

#ifdef USE_SPARKLE
    UserDefaults_SetBoolValue("SUEnableAutomaticChecks",
                              XRCCTRL(*this, "auto_updates", wxCheckBox)->GetValue());
#endif // USE_SPARKLE
#ifdef __WXMSW__
    win_sparkle_set_automatic_check_for_updates(
        XRCCTRL(*this, "auto_updates", wxCheckBox)->GetValue());
#endif
}
Exemplo n.º 4
0
void WinSparkleUpdater::SetAutomaticallyChecksForUpdates( bool automaticallyChecks )
{
  win_sparkle_set_automatic_check_for_updates(automaticallyChecks);
}
Exemplo n.º 5
0
void WinSparkleAutoUpdater::setAutomaticallyChecksForUpdates(bool on)
{
    win_sparkle_set_automatic_check_for_updates(on ? 1 : 0);
}