mirror of https://github.com/procxx/kepka.git
commit
e1d932aaeb
|
@ -520,7 +520,7 @@ namespace {
|
||||||
};
|
};
|
||||||
|
|
||||||
PsMainWindow::PsMainWindow(QWidget *parent) : QMainWindow(parent),
|
PsMainWindow::PsMainWindow(QWidget *parent) : QMainWindow(parent),
|
||||||
posInited(false), trayIcon(0), trayIconMenu(0), icon256(qsl(":/gui/art/icon256.png")), iconbig256(icon256), wndIcon(QPixmap::fromImage(icon256, Qt::ColorOnly)), _psCheckStatusIconLeft(100), _psLastIndicatorUpdate(0) {
|
posInited(false), trayIcon(0), trayIconMenu(0), icon256(qsl(":/gui/art/icon256.png")), iconbig256(icon256), wndIcon(QIcon::fromTheme("telegram", QIcon(QPixmap::fromImage(icon256, Qt::ColorOnly)))), _psCheckStatusIconLeft(100), _psLastIndicatorUpdate(0) {
|
||||||
connect(&_psCheckStatusIconTimer, SIGNAL(timeout()), this, SLOT(psStatusIconCheck()));
|
connect(&_psCheckStatusIconTimer, SIGNAL(timeout()), this, SLOT(psStatusIconCheck()));
|
||||||
_psCheckStatusIconTimer.setSingleShot(false);
|
_psCheckStatusIconTimer.setSingleShot(false);
|
||||||
|
|
||||||
|
@ -1172,13 +1172,15 @@ void psRegisterCustomScheme() {
|
||||||
DEBUG_LOG(("App Info: placing .desktop file"));
|
DEBUG_LOG(("App Info: placing .desktop file"));
|
||||||
if (QDir(home + qsl(".local/")).exists()) {
|
if (QDir(home + qsl(".local/")).exists()) {
|
||||||
QString apps = home + qsl(".local/share/applications/");
|
QString apps = home + qsl(".local/share/applications/");
|
||||||
|
QString icons = home + qsl(".local/share/icons/");
|
||||||
if (!QDir(apps).exists()) QDir().mkpath(apps);
|
if (!QDir(apps).exists()) QDir().mkpath(apps);
|
||||||
|
if (!QDir(icons).exists()) QDir().mkpath(icons);
|
||||||
|
|
||||||
QString path = cWorkingDir() + qsl("tdata/"), file = path + qsl("telegramdesktop.desktop");
|
QString path = cWorkingDir() + qsl("tdata/"), file = path + qsl("telegramdesktop.desktop");
|
||||||
QDir().mkpath(path);
|
QDir().mkpath(path);
|
||||||
QFile f(file);
|
QFile f(file);
|
||||||
if (f.open(QIODevice::WriteOnly)) {
|
if (f.open(QIODevice::WriteOnly)) {
|
||||||
QString icon = path + qsl("icon.png");
|
QString icon = icons + qsl("telegram.png");
|
||||||
if (!QFile(icon).exists()) {
|
if (!QFile(icon).exists()) {
|
||||||
if (QFile(qsl(":/gui/art/icon256.png")).copy(icon)) {
|
if (QFile(qsl(":/gui/art/icon256.png")).copy(icon)) {
|
||||||
DEBUG_LOG(("App Info: Icon copied to 'tdata'"));
|
DEBUG_LOG(("App Info: Icon copied to 'tdata'"));
|
||||||
|
@ -1194,7 +1196,7 @@ void psRegisterCustomScheme() {
|
||||||
s << "Name=Telegram Desktop\n";
|
s << "Name=Telegram Desktop\n";
|
||||||
s << "Comment=Official desktop version of Telegram messaging app\n";
|
s << "Comment=Official desktop version of Telegram messaging app\n";
|
||||||
s << "Exec=" << escapeShell(cExeDir() + cExeName()) << " -- %u\n";
|
s << "Exec=" << escapeShell(cExeDir() + cExeName()) << " -- %u\n";
|
||||||
s << "Icon=" << icon << "\n";
|
s << "Icon=telegram\n";
|
||||||
s << "Terminal=false\n";
|
s << "Terminal=false\n";
|
||||||
s << "StartupWMClass=Telegram\n";
|
s << "StartupWMClass=Telegram\n";
|
||||||
s << "Type=Application\n";
|
s << "Type=Application\n";
|
||||||
|
|
Loading…
Reference in New Issue