From 18e6598a95d5e7f914b154c60766887e51600db8 Mon Sep 17 00:00:00 2001 From: Wizzard <25581244+Wizzard@users.noreply.toomuchslop.com> Date: Tue, 11 Jul 2023 20:52:16 -0400 Subject: [PATCH] Added header files to CMakeLists and rebranded --- CMakeLists.txt | 8 ++++++++ assets/userscript.js | 10 +++++----- src/main.cpp | 8 ++++---- src/mainwindow.cpp | 4 ++-- src/virtmic.cpp | 4 ++-- 5 files changed, 21 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d36013..b682a48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,14 @@ set(discord-screenaudio_SRC src/userscript.cpp src/centralwidget.cpp src/localserver.cpp + src/centralwidget.h + src/discordpage.h + src/localserver.h + src/log.h + src/mainwindow.h + src/streamdialog.h + src/userscript.h + src/virtmic.h resources.qrc ) diff --git a/assets/userscript.js b/assets/userscript.js index 72e0352..7137917 100644 --- a/assets/userscript.js +++ b/assets/userscript.js @@ -28,7 +28,7 @@ function setGetDisplayMedia(video = true, overrideArgs = undefined) { var id; try { let myDiscordAudioSink = await getAudioDevice( - "discord-screenaudio-virtmic" + "discord-awesomeaudio-virtmic" ); id = myDiscordAudioSink.deviceId; } catch (error) { @@ -240,7 +240,7 @@ function main() { } else { aboutEl = document.createElement("div"); } - aboutEl.innerText = `discord-screenaudio ${userscript.version}`; + aboutEl.innerText = `discord-awesomeaudio ${userscript.version}`; aboutEl.style.fontSize = "12px"; aboutEl.style.color = "var(--text-muted)"; aboutEl.style.textTransform = "none"; @@ -319,7 +319,7 @@ function main() { const title = document.createElement("h2"); title.className = "h1-3iMExa title-lXcL8p defaultColor-3Olr-9 defaultMarginh1-1UYutH"; - title.innerText = "discord-screenaudio"; + title.innerText = "discord-awesomeaudio"; section.appendChild(title); section.appendChild( @@ -342,7 +342,7 @@ function main() { section.appendChild( createSwitch( - "Move discord-screenaudio to the system tray instead of closing", + "Move discord-awesomeaudio to the system tray instead of closing", await userscript.getBoolPref("trayIcon", false), (enabled) => { userscript.setTrayIcon(enabled); @@ -352,7 +352,7 @@ function main() { section.appendChild( createSwitch( - "Start discord-screenaudio hidden to tray", + "Start discord-awesomeaudio hidden to tray", await userscript.getPref("startHidden", false), (hidden) => { userscript.setPref("startHidden", hidden); diff --git a/src/main.cpp b/src/main.cpp index 1cd38cc..2d4ad10 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -16,11 +16,11 @@ int main(int argc, char *argv[]) { QApplication app(argc, argv); - QApplication::setApplicationName("discord-screenaudio"); + QApplication::setApplicationName("discord-awesomeaudio"); QApplication::setWindowIcon( QIcon(":assets/de.shorsh.discord-screenaudio.png")); QApplication::setApplicationVersion(DISCORD_SCEENAUDIO_VERSION_FULL); - QApplication::setDesktopFileName("de.shorsh.discord-screenaudio"); + QApplication::setDesktopFileName("lol.deadzone.discord-awesomeaudio"); qSetMessagePattern("[%{category}] %{message}"); @@ -57,10 +57,10 @@ int main(int argc, char *argv[]) { MainWindow w(parser.isSet(notifySendOption)); // Check if discord is already running - QString program_name = "discord-screenaudio"; + QString program_name = "discord-awesomeaudio"; if (isProgramRunning(program_name)) { // if running show error message - showErrorMessage("discord-screenaudio is already running"); + showErrorMessage("discord-awesomeaudio is already running"); return 1; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 94f1398..09d6a70 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -64,7 +64,7 @@ void MainWindow::setupTrayIcon() { return; auto aboutAction = new QAction( - "discord-screenaudio v" + QString(DISCORD_SCEENAUDIO_VERSION_FULL), this); + "discord-awesomeaudio v" + QString(DISCORD_SCEENAUDIO_VERSION_FULL), this); aboutAction->setIcon(QIcon(":assets/de.shorsh.discord-screenaudio.png")); aboutAction->setEnabled(false); @@ -99,7 +99,7 @@ void MainWindow::cleanTrayIcon() { void MainWindow::setupSettings() { m_settings = - new QSettings("discord-screenaudio", "discord-screenaudio", this); + new QSettings("discord-awesomeaudio", "discord-awesomeaudio", this); m_settings->beginGroup("settings"); m_settings->endGroup(); } diff --git a/src/virtmic.cpp b/src/virtmic.cpp index ce53b92..3a691d2 100644 --- a/src/virtmic.cpp +++ b/src/virtmic.cpp @@ -6,7 +6,7 @@ namespace Virtmic { -const QStringList EXCLUDE_TARGETS{"Chromium input", "discord-screenaudio"}; +const QStringList EXCLUDE_TARGETS{"Chromium input", "discord-awesomeaudio"}; const std::string nullstr = ""; const std::string &getTarget(const pipewire::spa::dict &props) { @@ -108,7 +108,7 @@ void start(QString _target) { std::string target = _target.toUtf8().toStdString(); auto virtual_mic = core.create("adapter", - {{"node.name", "discord-screenaudio-virtmic"}, + {{"node.name", "discord-awesomeaudio-virtmic"}, {"media.class", "Audio/Source/Virtual"}, {"factory.name", "support.null-audio-sink"}, {"audio.channels", "2"},