1 --- MEGAsync_ori/src/MEGASync/MegaApplication.cpp Wed Jan 26 20:25:17 2022
2 +++ MEGAsync_patched/src/MEGASync/MegaApplication.cpp Sun Mar 6 01:01:28 2022
8 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
10 #include <condition_variable>
11 #include <QSvgRenderer>
14 void MegaApplication::loadDataPath()
17 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
18 dataPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation)
19 + QString::fromUtf8("/data/Mega Limited/MEGAsync");
22 args += QString::fromUtf8(argv[i]);
26 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
28 if (args.contains(QLatin1String("--version")))
32 setQuitOnLastWindowClosed(false);
35 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
44 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
45 void MegaApplication::setTrayIconFromTheme(QString icon)
47 QString name = QString(icon).replace(QString::fromUtf8("://images/"), QString::fromUtf8("mega")).replace(QString::fromUtf8(".svg"),QString::fromUtf8(""));
50 void MegaApplication::start()
53 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
54 QSvgRenderer qsr; //to have svg library linked
62 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
63 if (counter==4 && getenv("XDG_CURRENT_DESKTOP") && !strcmp(getenv("XDG_CURRENT_DESKTOP"),"XFCE"))
71 +#if defined(Q_OS_LINUX) || defined(Q_OS_SOLARIS)
72 if (getenv("XDG_CURRENT_DESKTOP") && (
73 !strcmp(getenv("XDG_CURRENT_DESKTOP"),"ubuntu:GNOME")
74 || !strcmp(getenv("XDG_CURRENT_DESKTOP"),"LXDE")