15#include <wx/checkbox.h>
16#include <wx/radiobut.h>
17#include <wx/textctrl.h>
44 PopulateOrExchange(
S);
53 PopulateOrExchange(
S);
80 S.StartStatic(
XO(
"Account"));
91 S.StartStatic(
XO(
"Export behavior"));
94 auto checkBox =
S.AddCheckBox(
95 XO(
"S&how 'How would you like to export?' dialog"),
97 sync::CloudLocationMode::Ask);
104 event.IsChecked() ? sync::CloudLocationMode::Ask :
105 sync::CloudLocationMode::Local);
110 S.StartStatic(
XO(
"Save behavior"));
114 const auto initialMode =
117 auto BindRadioButton = [](
auto* button,
auto mode)
128 S.StartInvisiblePanel(4);
130 BindRadioButton(
S.AddRadioButton(
132 static_cast<int>(sync::CloudLocationMode::Ask),
134 sync::CloudLocationMode::Ask);
135 BindRadioButton(
S.AddRadioButtonToGroup(
136 XO(
"Always &save to cloud"),
137 static_cast<int>(sync::CloudLocationMode::Cloud),
139 sync::CloudLocationMode::Cloud);
140 BindRadioButton(
S.AddRadioButtonToGroup(
141 XO(
"Always save to the co&mputer"),
142 static_cast<int>(sync::CloudLocationMode::Local),
144 sync::CloudLocationMode::Local);
146 S.EndInvisiblePanel();
150 S.StartStatic(
XO(
"Temporary Cloud files directory"));
153 S.StartMultiColumn(3, wxEXPAND);
158 S.AddButton(
XXO(
"&Browse..."))
159 ->Bind(wxEVT_BUTTON, [
this](
auto&) { Browse(); });
164 S.StartMultiColumn(3);
166 S.NameSuffix(
XO(
"days"))
169 S.AddFixedText(
XO(
"days"),
true);
185 return XO(
"Preferences for Cloud");
193 this,
XO(
"Choose a location to place the temporary directory"),
195 int retval = dlog.ShowModal();
197 if (retval != wxID_CANCEL && !dlog.GetPath().empty())
199 wxFileName tmpDirPath;
200 tmpDirPath.AssignDir(dlog.GetPath());
203 tmpDirPath.GetFullPath(),
204 XO(
"Temporary files directory cannot be on a FAT drive.")))
210 dlog.GetPath(),
XO(
"Cannot set the preference.")))
215 mCloudProjectsSavePath->SetValue(
216 tmpDirPath.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR));
221 wxTextCtrl* mCloudProjectsSavePath {};
230 "AudioComPrefsPanel",
233 assert(parent !=
nullptr);
XXO("&Cut/Copy/Paste Toolbar")
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
bool WriteEnum(Enum value)
A move-only handle representing a connection to a Publisher.
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
void Invalidate() override
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined */
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Holds a msgid for the translation catalog; may also bind format arguments.
sync::CloudLocationMode mSaveLocationMode
sync::CloudLocationMode mExportLocationMode
void PopulateOrExchange(ShuttleGui &S) override
ComponentInterfaceSymbol GetSymbol() const override
TranslatableString GetDescription() const override
Observer::Subscription mFrequencySubscription
AudioComPrefsPanel(wxWindow *parent, wxWindowID winid)
FILES_API bool WritableLocationCheck(const FilePath &path, const TranslatableString &message)
Check location on writable access and return true if checked successfully.
FILES_API bool FATFilesystemDenied(const FilePath &path, const TranslatableString &msg, const BasicUI::WindowPlacement &placement={})
PrefsPanel::Registration sAttachment
EnumSetting< CloudLocationMode > SaveLocationMode
BoolSetting MixdownDialogShown
EnumSetting< CloudLocationMode > ExportLocationMode
StringSetting CloudProjectsSavePath
UserService & GetUserService()
IntSetting DaysToKeepFiles
OAuthService & GetOAuthService()
Returns the instance of the OAuthService.
const ServiceConfig & GetServiceConfig()
Returns the instance of the ServiceConfig.