mirror of https://github.com/procxx/kepka.git
Fixed issue with running both clients (kepka and tdesktop) simultaneously.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
579f5d0b19
commit
45eb128a5e
|
@ -27,7 +27,7 @@ int main(int argc, char *argv[]) {
|
||||||
// Retina display support is working fine, others are not.
|
// Retina display support is working fine, others are not.
|
||||||
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
QCoreApplication::setAttribute(Qt::AA_DisableHighDpiScaling, true);
|
||||||
#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0
|
#endif // not defined Q_OS_MAC and QT_VERSION >= 5.6.0
|
||||||
QCoreApplication::setApplicationName(qsl("TelegramDesktop"));
|
QCoreApplication::setApplicationName(qsl("Kepka"));
|
||||||
|
|
||||||
InitFromCommandLine(argc, argv);
|
InitFromCommandLine(argc, argv);
|
||||||
if (cLaunchMode() == LaunchModeFixPrevious) {
|
if (cLaunchMode() == LaunchModeFixPrevious) {
|
||||||
|
@ -49,10 +49,10 @@ int main(int argc, char *argv[]) {
|
||||||
result = app.exec();
|
result = app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
DEBUG_LOG(("Telegram finished, result: %1").arg(result));
|
DEBUG_LOG(("Kepka finished, result: %1").arg(result));
|
||||||
|
|
||||||
if (cRestarting()) {
|
if (cRestarting()) {
|
||||||
DEBUG_LOG(("Application Info: executing Telegram, because of restart..."));
|
DEBUG_LOG(("Application Info: executing Kepka, because of restart..."));
|
||||||
psExecTelegram();
|
psExecTelegram();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ QString psAppDataPath() {
|
||||||
// If we find data there, we should still use it.
|
// If we find data there, we should still use it.
|
||||||
auto home = getHomeDir();
|
auto home = getHomeDir();
|
||||||
if (!home.isEmpty()) {
|
if (!home.isEmpty()) {
|
||||||
auto oldPath = home + qsl(".TelegramDesktop/");
|
auto oldPath = home + qsl(".Kepka/");
|
||||||
auto oldSettingsBase = oldPath + qsl("tdata/settings");
|
auto oldSettingsBase = oldPath + qsl("tdata/settings");
|
||||||
if (QFile(oldSettingsBase + '0').exists() || QFile(oldSettingsBase + '1').exists()) {
|
if (QFile(oldSettingsBase + '0').exists() || QFile(oldSettingsBase + '1').exists()) {
|
||||||
return oldPath;
|
return oldPath;
|
||||||
|
@ -462,7 +462,7 @@ void psRegisterCustomScheme() {
|
||||||
s << "Exec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n";
|
s << "Exec=" << EscapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n";
|
||||||
s << "Icon=telegram\n";
|
s << "Icon=telegram\n";
|
||||||
s << "Terminal=false\n";
|
s << "Terminal=false\n";
|
||||||
s << "StartupWMClass=TelegramDesktop\n";
|
s << "StartupWMClass=Kepka\n";
|
||||||
s << "Type=Application\n";
|
s << "Type=Application\n";
|
||||||
s << "Categories=Network;InstantMessaging;Qt;\n";
|
s << "Categories=Network;InstantMessaging;Qt;\n";
|
||||||
s << "MimeType=x-scheme-handler/tg;\n";
|
s << "MimeType=x-scheme-handler/tg;\n";
|
||||||
|
|
Loading…
Reference in New Issue