Audacity 3.2.0
Functions | Variables
cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp} Namespace Reference

Functions

void UpdatePublicity (bool value)
 
wxString GenerateTempPath (FileExtension extension)
 
void SetTimeLabel (wxStaticText *label, std::chrono::milliseconds time)
 

Variables

BoolSetting wasOpened { L"/cloud/audiocom/wasOpened", false }
 
BoolSetting SharePublicly { L"/cloud/audiocom/sharePublicly", true }
 
const wxSize avatarSize = { 32, 32 }
 
const auto publicLabelText = XO("Public")
 
const auto publicDescriptionText
 
const auto unlistedLabelText = XO("Unlisted")
 
const auto unlistedDescriptionText
 

Function Documentation

◆ GenerateTempPath()

wxString cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::GenerateTempPath ( FileExtension  extension)

Definition at line 69 of file ShareAudioDialog.cpp.

70{
71 const auto tempPath = GetUploadTempPath();
72
73 wxFileName fileName(
74 tempPath,
75 wxString::Format(
76 "%lld", std::chrono::system_clock::now().time_since_epoch().count()),
77 extension);
78
79 fileName.Mkdir(0700, wxPATH_MKDIR_FULL);
80
81 if (fileName.Exists())
82 {
83 if (!wxRemoveFile(fileName.GetFullPath()))
84 return {};
85 }
86
87 return fileName.GetFullPath();
88}
wxString GetUploadTempPath()

References cloud::audiocom::GetUploadTempPath().

Referenced by cloud::audiocom::ShareAudioDialog::ExportProject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTimeLabel()

void cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::SetTimeLabel ( wxStaticText *  label,
std::chrono::milliseconds  time 
)

Definition at line 504 of file ShareAudioDialog.cpp.

505{
506 wxTimeSpan tsElapsed(0, 0, 0, time.count());
507
508 label->SetLabel(tsElapsed.Format(wxT(" %H:%M:%S")));
509 label->SetName(label->GetLabel());
510 label->Update();
511}
wxT("CloseDown"))
TranslatableString label
Definition: TagsEditor.cpp:164

References label, and wxT().

Referenced by cloud::audiocom::ShareAudioDialog::UpdateProgress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdatePublicity()

void cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::UpdatePublicity ( bool  value)

Definition at line 61 of file ShareAudioDialog.cpp.

62{
63 SharePublicly.Write(value);
64 gPrefs->Flush();
65}
FileConfig * gPrefs
Definition: Prefs.cpp:70
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
bool Write(const T &value)
Write value to config and return true if successful.
Definition: Prefs.h:252

References FileConfig::Flush(), gPrefs, SharePublicly, and Setting< T >::Write().

Referenced by cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ avatarSize

const wxSize cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::avatarSize = { 32, 32 }

◆ publicDescriptionText

const auto cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::publicDescriptionText

◆ publicLabelText

const auto cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::publicLabelText = XO("Public")

◆ SharePublicly

BoolSetting cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::SharePublicly { L"/cloud/audiocom/sharePublicly", true }

◆ unlistedDescriptionText

const auto cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::unlistedDescriptionText
Initial value:
= XO(
"Only you and people you share a link with will be able to listen to this audio.")

Definition at line 95 of file ShareAudioDialog.cpp.

Referenced by cloud::audiocom::ShareAudioDialog::HandleUploadSucceeded(), and cloud::audiocom::ShareAudioDialog::InitialStatePanel::PopulateInitialStatePanel().

◆ unlistedLabelText

const auto cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::unlistedLabelText = XO("Unlisted")

◆ wasOpened

BoolSetting cloud::audiocom::anonymous_namespace{ShareAudioDialog.cpp}::wasOpened { L"/cloud/audiocom/wasOpened", false }