Skip to content

Commit

Permalink
Adds audiocom module
Browse files Browse the repository at this point in the history
  • Loading branch information
crsib committed Dec 7, 2023
1 parent bd99d14 commit c1e1c25
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 5 deletions.
1 change: 1 addition & 0 deletions libraries/lib-module-manager/ModuleSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ static const std::unordered_set<wxString> &autoEnabledModules()
"mod-aup",
"mod-opus",
"mod-midi-import-export",
"mod-cloud-audiocom"
};
return modules;
}
Expand Down
6 changes: 6 additions & 0 deletions modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ if ( USE_LIBOPUS AND USE_OPUSFILE AND USE_LIBOGG )
list ( APPEND MODULES mod-opus )
endif()

if ( ${_OPT}has_audiocom_upload)
list( APPEND MODULES
mod-cloud-audiocom
)
endif()

foreach( MODULE ${MODULES} )
add_subdirectory("${MODULE}")
endforeach()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@
Audacity: A Digital Audio Editor
CloudSyncTask.cpp
AudioComModule.cpp
Dmitry Vedenko
**********************************************************************/
#include "CloudSyncTask.h"

namespace cloud::audiocom::sync
{
} // namespace cloud::audiocom::sync
#include "ModuleConstants.h"

DEFINE_MODULE_ENTRIES
15 changes: 15 additions & 0 deletions modules/mod-cloud-audiocom/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
set( TARGET mod-cloud-audiocom )

set( SOURCES
menus/Menus.cpp

AudioComModule.cpp
)

set( LIBRARIES
PRIVATE
lib-cloud-audiocom
lib-menus
)

audacity_module( ${TARGET} "${SOURCES}" "${LIBRARIES}" "" "" )
31 changes: 31 additions & 0 deletions modules/mod-cloud-audiocom/menus/Menus.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*!********************************************************************
Audacity: A Digital Audio Editor
Menus.cpp
Dmitry Vedenko
**********************************************************************/

#include "MenuRegistry.h"
#include "CloudSyncService.h"
#include "CommandContext.h"

namespace
{

void OnSaveToCloud(const CommandContext& context)
{
cloud::audiocom::CloudSyncService::Get().SaveToCloud(context.project);
}

using namespace MenuRegistry;

AttachedItem sAttachment { Command(
wxT("SaveToCloud"), XXO("Save to Cloud"),
OnSaveToCloud, AlwaysEnabledFlag),
wxT("File/Save") };
}

0 comments on commit c1e1c25

Please sign in to comment.