2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 08:55:59 +00:00

fixed mail links in Win10, include muted chats in the unread badge setting, shared links overview and search, version 0.8.53.dev

This commit is contained in:
John Preston
2015-08-28 18:15:56 +03:00
parent bfde1d2143
commit 9a51e2c7e3
37 changed files with 1253 additions and 211 deletions

View File

@@ -1117,8 +1117,10 @@ static HICON _qt_createHIcon(const QIcon &icon, int xSize, int ySize) {
}
void PsMainWindow::psUpdateCounter() {
int32 counter = App::histories().unreadFull;
style::color bg = (App::histories().unreadMuted < counter) ? st::counterBG : st::counterMuteBG;
int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted);
bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false;
style::color bg = muted ? st::counterMuteBG : st::counterBG;
QIcon iconSmall, iconBig;
iconSmall.addPixmap(QPixmap::fromImage(iconWithCounter(16, counter, bg, true), Qt::ColorOnly));
iconSmall.addPixmap(QPixmap::fromImage(iconWithCounter(32, counter, bg, true), Qt::ColorOnly));
@@ -2123,12 +2125,14 @@ bool psShowOpenWithMenu(int x, int y, const QString &file) {
}
void psOpenFile(const QString &name, bool openWith) {
std::wstring wname = QDir::toNativeSeparators(name).toStdWString();
bool mailtoScheme = name.startsWith(qstr("mailto:"));
std::wstring wname = mailtoScheme ? name.toStdWString() : QDir::toNativeSeparators(name).toStdWString();
if (openWith && useOpenAs) {
if (shOpenWithDialog) {
OPENASINFO info;
info.oaifInFlags = OAIF_ALLOW_REGISTRATION | OAIF_REGISTER_EXT | OAIF_EXEC;
if (mailtoScheme) info.oaifInFlags |= OAIF_FILE_IS_URI | OAIF_URL_PROTOCOL;
info.pcszClass = NULL;
info.pcszFile = wname.c_str();
shOpenWithDialog(0, &info);