Merge remote-tracking branch 'origin/master' into dev

This commit is contained in:
John Preston 2017-02-09 22:31:11 +03:00
commit 3dbe187f56
2 changed files with 23 additions and 2 deletions

View File

@ -118,7 +118,7 @@ If you already have multiple commits, you can add the commits together (squash t
1. Open `Git Bash` (or `Git Shell`)
2. Enter following command to squash the recent {N} commits: `git reset --soft HEAD~{N} && git commit` (replace `{N}` with the number of commits you want to squash)
3. Press <kbd>i</kbd> to get into Insert-mode
4. Enter the commit message of the new commit (and add the [signature](#sign-your-work) at the and)
4. Enter the commit message of the new commit (and add the [signature](#sign-your-work) at the end)
5. After adding the message, press <kbd>ESC</kbd> to get out of the Insert-mode
6. Write `:wq` and press <kbd>Enter</kbd> to save the new message or write `:q!` to discard your changes
7. Enter `git push --force` to push the new commit to the remote repository
@ -154,4 +154,4 @@ Don't forget to [sign your patch](#sign-your-work) to put it in the public domai
[help_change_commit_message]: https://help.github.com/articles/changing-a-commit-message/
[commit_message]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[pr]: https://github.com/telegramdesktop/tdesktop/compare
[build_instructions]: https://github.com/telegramdesktop/tdesktop/blob/master/README.md#build-instructions
[build_instructions]: https://github.com/telegramdesktop/tdesktop/blob/master/README.md#build-instructions

View File

@ -813,6 +813,7 @@ void RegisterCustomScheme() {
HKEY rkey;
QString exe = QDir::toNativeSeparators(cExeDir() + cExeName());
// Legacy URI scheme registration
if (!_psOpenRegKey(L"Software\\Classes\\tg", &rkey)) return;
if (!_psSetKeyValue(rkey, L"URL Protocol", QString())) return;
if (!_psSetKeyValue(rkey, 0, qsl("URL:Telegram Link"))) return;
@ -824,6 +825,26 @@ void RegisterCustomScheme() {
if (!_psOpenRegKey(L"Software\\Classes\\tg\\shell\\open", &rkey)) return;
if (!_psOpenRegKey(L"Software\\Classes\\tg\\shell\\open\\command", &rkey)) return;
if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl("\" -workdir \"") + cWorkingDir() + qsl("\" -- \"%1\""))) return;
// URI scheme registration as Default Program - Windows Vista and above
if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg", &rkey)) return;
if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\DefaultIcon", &rkey)) return;
if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl(",1\""))) return;
if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\shell", &rkey)) return;
if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\shell\\open", &rkey)) return;
if (!_psOpenRegKey(L"Software\\Classes\\tdesktop.tg\\shell\\open\\command", &rkey)) return;
if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl("\" -workdir \"") + cWorkingDir() + qsl("\" -- \"%1\""))) return;
if (!_psOpenRegKey(L"Software\\TelegramDesktop", &rkey)) return;
if (!_psOpenRegKey(L"Software\\TelegramDesktop\\Capabilities", &rkey)) return;
if (!_psSetKeyValue(rkey, L"ApplicationName", qls("Telegram Desktop"))) return;
if (!_psSetKeyValue(rkey, L"ApplicationDescription", qls("Telegram Desktop"))) return;
if (!_psOpenRegKey(L"Software\\TelegramDesktop\\Capabilities\\UrlAssociations", &rkey)) return;
if (!_psSetKeyValue(rkey, L"tg", qls("tdesktop.tg"))) return;
if (!_psOpenRegKey(L"Software\\RegisteredApplications", &rkey)) return;
if (!_psSetKeyValue(key, L"Telegram Desktop", qls("SOFTWARE\\TelegramDesktop\\Capabilities"))) return;
#endif // !TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME
}