void PreferencesDialog::TransferTo(wxConfigBase *cfg) { XRCCTRL(*this, "user_name", wxTextCtrl)->SetValue( cfg->Read(_T("translator_name"), wxEmptyString)); XRCCTRL(*this, "user_email", wxTextCtrl)->SetValue( cfg->Read(_T("translator_email"), wxEmptyString)); XRCCTRL(*this, "compile_mo", wxCheckBox)->SetValue( cfg->Read(_T("compile_mo"), (long)true)); XRCCTRL(*this, "show_summary", wxCheckBox)->SetValue( cfg->Read(_T("show_summary"), true)); XRCCTRL(*this, "manager_startup", wxCheckBox)->SetValue( (bool)cfg->Read(_T("manager_startup"), (long)false)); XRCCTRL(*this, "focus_to_text", wxCheckBox)->SetValue( (bool)cfg->Read(_T("focus_to_text"), (long)false)); XRCCTRL(*this, "comment_window_editable", wxCheckBox)->SetValue( (bool)cfg->Read(_T("comment_window_editable"), (long)false)); XRCCTRL(*this, "keep_crlf", wxCheckBox)->SetValue( (bool)cfg->Read(_T("keep_crlf"), true)); #ifdef USE_SPELLCHECKING XRCCTRL(*this, "enable_spellchecking", wxCheckBox)->SetValue( (bool)cfg->Read(_T("enable_spellchecking"), true)); #endif XRCCTRL(*this, "use_font_list", wxCheckBox)->SetValue( (bool)cfg->Read(_T("custom_font_list_use"), (long)false)); XRCCTRL(*this, "use_font_text", wxCheckBox)->SetValue( (bool)cfg->Read(_T("custom_font_text_use"), (long)false)); XRCCTRL(*this, "font_list", wxFontPickerCtrl)->SetSelectedFont( wxFont(cfg->Read(_T("custom_font_list_name"), wxEmptyString))); XRCCTRL(*this, "font_text", wxFontPickerCtrl)->SetSelectedFont( wxFont(cfg->Read(_T("custom_font_text_name"), wxEmptyString))); wxString format = cfg->Read(_T("crlf_format"), _T("unix")); int sel; if (format == _T("win")) sel = 1; else /* _T("unix") or obsolete settings */ sel = 0; XRCCTRL(*this, "crlf_format", wxChoice)->SetSelection(sel); m_parsers.Read(cfg); wxListBox *list = XRCCTRL(*this, "parsers_list", wxListBox); for (unsigned i = 0; i < m_parsers.GetCount(); i++) list->Append(m_parsers[i].Name); if (m_parsers.GetCount() == 0) { XRCCTRL(*this, "parser_edit", wxButton)->Enable(false); XRCCTRL(*this, "parser_delete", wxButton)->Enable(false); } else list->SetSelection(0); #ifdef USE_TRANSMEM wxStringTokenizer tkn(cfg->Read(_T("TM/languages"), wxEmptyString), _T(":")); wxArrayString langs; while (tkn.HasMoreTokens()) langs.Add(tkn.GetNextToken()); XRCCTRL(*this, "tm_langs", wxEditableListBox)->SetStrings(langs); XRCCTRL(*this, "tm_omits", wxSpinCtrl)->SetValue( cfg->Read(_T("TM/max_omitted"), 2)); XRCCTRL(*this, "tm_delta", wxSpinCtrl)->SetValue( cfg->Read(_T("TM/max_delta"), 2)); XRCCTRL(*this, "tm_automatic", wxCheckBox)->SetValue( cfg->Read(_T("use_tm_when_updating"), true)); #endif #ifdef USE_SPARKLE XRCCTRL(*this, "auto_updates", wxCheckBox)->SetValue( (bool)UserDefaults_GetBoolValue("SUEnableAutomaticChecks")); #endif // USE_SPARKLE #ifdef __WXMSW__ XRCCTRL(*this, "auto_updates", wxCheckBox)->SetValue( (bool)win_sparkle_get_automatic_check_for_updates()); #endif }
bool Updater::enabled() const { return (bool)win_sparkle_get_automatic_check_for_updates(); }
bool WinSparkleUpdater::AutomaticallyChecksForUpdates() { return win_sparkle_get_automatic_check_for_updates(); }