From 77b35891d4335077057abb8ba9c13a943bd293d8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 6 Dec 2014 14:21:19 +0300 Subject: [PATCH] fixed case insensitive contacts filtering in boxes, setting as default tg scheme handler --- Telegram/SourceFiles/boxes/addparticipantbox.cpp | 2 ++ Telegram/SourceFiles/boxes/contactsbox.cpp | 2 ++ Telegram/SourceFiles/boxes/newgroupbox.cpp | 2 ++ Telegram/SourceFiles/pspecific_mac_p.mm | 1 + Telegram/Telegram.plist | 4 ++-- 5 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/boxes/addparticipantbox.cpp b/Telegram/SourceFiles/boxes/addparticipantbox.cpp index 9661111b2f..baeaf5cafb 100644 --- a/Telegram/SourceFiles/boxes/addparticipantbox.cpp +++ b/Telegram/SourceFiles/boxes/addparticipantbox.cpp @@ -305,6 +305,8 @@ void AddParticipantInner::updateSel() { } void AddParticipantInner::updateFilter(QString filter) { + filter = textSearchKey(filter); + _time = unixtime(); QStringList f; if (!filter.isEmpty()) { diff --git a/Telegram/SourceFiles/boxes/contactsbox.cpp b/Telegram/SourceFiles/boxes/contactsbox.cpp index 9423c1ff13..ae027bf715 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.cpp +++ b/Telegram/SourceFiles/boxes/contactsbox.cpp @@ -250,6 +250,8 @@ void ContactsInner::updateSel() { } void ContactsInner::updateFilter(QString filter) { + filter = textSearchKey(filter); + QStringList f; if (!filter.isEmpty()) { QStringList filterList = filter.split(cWordSplit(), QString::SkipEmptyParts); diff --git a/Telegram/SourceFiles/boxes/newgroupbox.cpp b/Telegram/SourceFiles/boxes/newgroupbox.cpp index fc895dcc70..f5762b2b9e 100644 --- a/Telegram/SourceFiles/boxes/newgroupbox.cpp +++ b/Telegram/SourceFiles/boxes/newgroupbox.cpp @@ -276,6 +276,8 @@ void NewGroupInner::updateSel() { } void NewGroupInner::updateFilter(QString filter) { + filter = textSearchKey(filter); + QStringList f; if (!filter.isEmpty()) { QStringList filterList = filter.split(cWordSplit(), QString::SkipEmptyParts); diff --git a/Telegram/SourceFiles/pspecific_mac_p.mm b/Telegram/SourceFiles/pspecific_mac_p.mm index d4bb182c2c..3e5ac5c4f9 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.mm +++ b/Telegram/SourceFiles/pspecific_mac_p.mm @@ -638,6 +638,7 @@ void objc_finish() { } void objc_registerCustomScheme() { + LSSetDefaultHandlerForURLScheme(CFSTR("tg"), (CFStringRef)[[NSBundle mainBundle] bundleIdentifier]); } BOOL _execUpdater(BOOL update = YES) { diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 3da70d1804..680cd29c25 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -18,11 +18,11 @@ CFBundleTypeRole - Editor + Viewer CFBundleURLIconFile AppIcon.icns CFBundleURLName - com.tdesktop.TelegramUrl + com.tdesktop.Telegram CFBundleURLSchemes tg