mirror of
https://github.com/telegramdesktop/tdesktop
synced 2024-12-15 10:54:48 +00:00
fixed title for first run, fixed linux exec-by-link
This commit is contained in:
parent
929d1e2ad9
commit
96e72af509
@ -803,6 +803,9 @@ QString psCurrentExeDirectory(int argc, char *argv[]) {
|
|||||||
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
|
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
|
||||||
if (!first.isEmpty()) {
|
if (!first.isEmpty()) {
|
||||||
QFileInfo info(first);
|
QFileInfo info(first);
|
||||||
|
if (info.isSymLink()) {
|
||||||
|
info = info.symLinkTarget();
|
||||||
|
}
|
||||||
if (info.exists()) {
|
if (info.exists()) {
|
||||||
return QDir(info.absolutePath()).absolutePath() + '/';
|
return QDir(info.absolutePath()).absolutePath() + '/';
|
||||||
}
|
}
|
||||||
@ -814,7 +817,10 @@ QString psCurrentExeName(int argc, char *argv[]) {
|
|||||||
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
|
QString first = argc ? QString::fromLocal8Bit(argv[0]) : QString();
|
||||||
if (!first.isEmpty()) {
|
if (!first.isEmpty()) {
|
||||||
QFileInfo info(first);
|
QFileInfo info(first);
|
||||||
if (info.exists()) {
|
if (info.isSymLink()) {
|
||||||
|
info = info.symLinkTarget();
|
||||||
|
}
|
||||||
|
if (info.exists()) {
|
||||||
return info.fileName();
|
return info.fileName();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ void settingsParseArgs(int argc, char *argv[]) {
|
|||||||
memset_rand(&gInstance, sizeof(gInstance));
|
memset_rand(&gInstance, sizeof(gInstance));
|
||||||
gExeDir = psCurrentExeDirectory(argc, argv);
|
gExeDir = psCurrentExeDirectory(argc, argv);
|
||||||
gExeName = psCurrentExeName(argc, argv);
|
gExeName = psCurrentExeName(argc, argv);
|
||||||
for (int32 i = 0; i < argc; ++i) {
|
for (int32 i = 0; i < argc; ++i) {
|
||||||
if (string("-release") == argv[i]) {
|
if (string("-release") == argv[i]) {
|
||||||
gTestMode = false;
|
gTestMode = false;
|
||||||
} else if (string("-debug") == argv[i]) {
|
} else if (string("-debug") == argv[i]) {
|
||||||
|
@ -65,6 +65,8 @@ TitleWidget::TitleWidget(Window *window)
|
|||||||
{
|
{
|
||||||
setGeometry(0, 0, wnd->width(), st::titleHeight);
|
setGeometry(0, 0, wnd->width(), st::titleHeight);
|
||||||
_update.hide();
|
_update.hide();
|
||||||
|
_cancel.hide();
|
||||||
|
_back.hide();
|
||||||
if (App::app()->updatingState() == Application::UpdatingReady) {
|
if (App::app()->updatingState() == Application::UpdatingReady) {
|
||||||
showUpdateBtn();
|
showUpdateBtn();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user