15#include <wx/checkbox.h>
16#include <wx/radiobut.h>
17#include <wx/textctrl.h>
43 PopulateOrExchange(
S);
52 PopulateOrExchange(
S);
79 S.StartStatic(
XO(
"Account"));
89 S.StartStatic(
XO(
"Export behavior"));
92 auto checkBox =
S.AddCheckBox(
93 XO(
"S&how 'How would you like to export?' dialog"),
95 sync::CloudLocationMode::Ask);
102 event.IsChecked() ? sync::CloudLocationMode::Ask :
103 sync::CloudLocationMode::Local);
108 S.StartStatic(
XO(
"Save behavior"));
112 const auto initialMode =
115 auto BindRadioButton = [](
auto* button,
auto mode)
126 S.StartInvisiblePanel(4);
128 BindRadioButton(
S.AddRadioButton(
130 static_cast<int>(sync::CloudLocationMode::Ask),
132 sync::CloudLocationMode::Ask);
133 BindRadioButton(
S.AddRadioButtonToGroup(
134 XO(
"Always &save to cloud"),
135 static_cast<int>(sync::CloudLocationMode::Cloud),
137 sync::CloudLocationMode::Cloud);
138 BindRadioButton(
S.AddRadioButtonToGroup(
139 XO(
"Always save to the co&mputer"),
140 static_cast<int>(sync::CloudLocationMode::Local),
142 sync::CloudLocationMode::Local);
144 S.EndInvisiblePanel();
148 S.StartStatic(
XO(
"Temporary Cloud files directory"));
151 S.StartMultiColumn(3, wxEXPAND);
156 S.AddButton(
XXO(
"&Browse..."))
157 ->Bind(wxEVT_BUTTON, [
this](
auto&) { Browse(); });
162 S.StartMultiColumn(3);
164 S.NameSuffix(
XO(
"days"))
167 S.AddFixedText(
XO(
"days"),
true);
183 return XO(
"Preferences for Cloud");
191 this,
XO(
"Choose a location to place the temporary directory"),
193 int retval = dlog.ShowModal();
195 if (retval != wxID_CANCEL && !dlog.GetPath().empty())
197 wxFileName tmpDirPath;
198 tmpDirPath.AssignDir(dlog.GetPath());
201 tmpDirPath.GetFullPath(),
202 XO(
"Temporary files directory cannot be on a FAT drive.")))
208 dlog.GetPath(),
XO(
"Cannot set the preference.")))
213 mCloudProjectsSavePath->SetValue(
214 tmpDirPath.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR));
219 wxTextCtrl* mCloudProjectsSavePath {};
228 "AudioComPrefsPanel",
231 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.