Skip to content

Commit c8a90ac

Browse files
committed
fix autostart & tray icon when default dirs are missing; bump version to 1.1.1
1 parent ed692a4 commit c8a90ac

4 files changed

Lines changed: 16 additions & 4 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.28)
22

3-
project("Virtual Surround Manager" VERSION 1.1 LANGUAGES CXX)
3+
project("Virtual Surround Manager" VERSION 1.1.1 LANGUAGES CXX)
44

55
set(APPLICATION_ID "de.berny23.virtual_surround_manager")
66
set(APPLICATION_NAME "Virtual Surround Sound")

dist/de.berny23.virtual_surround_manager.metainfo.xml.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,14 @@
4141
</description>
4242

4343
<releases>
44+
<release version="1.1.1" date="2026-06-20">
45+
<description>
46+
<ul>
47+
<li>Fixed autostart and system tray icon on systems where the default directories are missing</li>
48+
<li>Added Russian translation</li>
49+
</ul>
50+
</description>
51+
</release>
4452
<release version="1.1.0" date="2026-06-12">
4553
<description>
4654
<ul>

src/frontend_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ void FrontendManager::set_autostart_enabled(bool value) {
248248

249249
#if !defined(IS_FLATPAK)
250250
// Native or AppImage: Just copy the desktop file to the user's autostart folder (e. g. ~/.config/autostart)
251+
// Creates directory with all parents, mkpath skips existing folders
252+
QDir().mkpath(QFileInfo(destination).path());
251253
QFile::copy(source, destination);
252254
qDebug("set_autostart_enabled: Copied desktop file from '%s' to '%s'", source.toStdString().c_str(), destination.toStdString().c_str());
253255
#endif

src/tray_icon.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,21 @@ void TrayIcon::set_frontend_manager(FrontendManager *frontend_manager) {
3434

3535
void TrayIcon::setup(const QString &icon_name) {
3636
QIcon icon = QIcon::fromTheme(icon_name);
37-
#ifdef IS_APPIMAGE
37+
// #ifdef IS_APPIMAGE
3838
if (icon.isNull()) {
3939
// The tray icon does NOT work automatically in an AppImage for unknown reasons!
4040
// Both fromTheme and addFile are not working, so the svg file just gets copied to ~/.local/share/icons/hicolor/scalable/apps/
4141
QString source = qEnvironmentVariable("APPDIR") + QStringLiteral("/") + icon_name + QStringLiteral(".svg");
4242
QString destination = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QStringLiteral("/icons/hicolor/scalable/apps/") + icon_name + QStringLiteral(".svg");
43-
if (!QFile::exists(destination)) {
43+
if (!QFile(destination).exists()) {
44+
// Creates directory with all parents, mkpath skips existing folders
45+
QDir().mkpath(QFileInfo(destination).path());
4446
QFile::copy(source, destination);
4547
qDebug("TrayIcon::setup: Copied icon file from '%s' to '%s'.", source.toStdString().c_str(), destination.toStdString().c_str());
4648
}
4749
icon.addFile(destination);
4850
}
49-
#endif
51+
// #endif
5052
m_tray_icon->setIcon(icon);
5153
m_tray_icon->setToolTip(i18nc("@title", "Virtual Surround Sound"));
5254
m_tray_icon->setContextMenu(m_menu);

0 commit comments

Comments
 (0)