From 3e6d4839396b5509fc7d11058a961a7ee0957edf Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 4 Dec 2016 22:40:41 +0300 Subject: [PATCH] Closed beta 10019011: fixed build in Xcode, langs updated. --- Telegram/Resources/langs/lang_de.strings | 4 +-- Telegram/Resources/langs/lang_es.strings | 20 +++++------ Telegram/Resources/langs/lang_it.strings | 34 +++++++++---------- Telegram/Resources/langs/lang_ko.strings | 2 +- Telegram/Resources/langs/lang_nl.strings | 4 +-- Telegram/Resources/langs/lang_pt_BR.strings | 4 +-- Telegram/SourceFiles/dialogswidget.cpp | 9 +++-- Telegram/SourceFiles/dialogswidget.h | 15 ++++---- Telegram/SourceFiles/history.cpp | 4 +-- Telegram/SourceFiles/mainwindow.cpp | 2 +- .../ui/effects/send_action_animations.cpp | 2 ++ .../ui/effects/send_action_animations.h | 4 +++ Telegram/SourceFiles/ui/twidget.h | 13 +++---- 13 files changed, 65 insertions(+), 52 deletions(-) diff --git a/Telegram/Resources/langs/lang_de.strings b/Telegram/Resources/langs/lang_de.strings index 95f2072237..1c5a86b15e 100644 --- a/Telegram/Resources/langs/lang_de.strings +++ b/Telegram/Resources/langs/lang_de.strings @@ -150,7 +150,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_phone_ph" = "Deine Telefonnummer"; "lng_phone_title" = "Dein Telefon"; "lng_phone_desc" = "Bitte Land und Telefonnummer\nohne führende Null eintragen."; -"lng_phone_notreg" = "Hinweis: Wenn du noch kein Telegram Konto haben solltest,\n[b]registriere[/b] dich bitte über unsere [a href=\"https://telegram.org/\"]iOS / Android[/a] apps oder direkt {signup_start}hier »{signup_end}"; +"lng_phone_notreg" = "Du hast noch gar kein Telegram Konto?\n[b]Registriere[/b] dich einfach über unsere\n[a href=\"https://telegram.org/\"]Apps[/a] oder direkt {signup_start}hier »{signup_end}"; "lng_country_code" = "Ländercode"; "lng_bad_country_code" = "Falscher Ländercode"; "lng_country_ph" = "Suche"; @@ -476,7 +476,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_profile_files_header" = "Dateien aus dem Chat"; "lng_profile_audios" = "{count:_not_used_|# Sprachnachricht|# Sprachnachrichten}"; "lng_profile_audios_header" = "Sprachnachrichten aus dem Chat"; -"lng_profile_shared_links" = "{count:_not_used_|# Geteilter Link|# Geteilte Links} »"; +"lng_profile_shared_links" = "{count:_not_used_|# Geteilter Link|# Geteilte Links}"; "lng_profile_shared_links_header" = "Links aus dem Chat"; "lng_profile_copy_phone" = "Telefonnummer kopieren"; "lng_profile_copy_fullname" = "Name kopieren"; diff --git a/Telegram/Resources/langs/lang_es.strings b/Telegram/Resources/langs/lang_es.strings index 08e2411156..dbe4a79466 100644 --- a/Telegram/Resources/langs/lang_es.strings +++ b/Telegram/Resources/langs/lang_es.strings @@ -124,7 +124,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_flood_error" = "Muchos intentos. Por favor, reinténtalo más tarde."; "lng_gif_error" = "Ocurrió un error al leer la animación GIF :("; "lng_edit_error" = "No puedes editar este mensaje"; -"lng_join_channel_error" = "Lo sentimos, te has unido a demasiados canales y supergrupos. Por favor, deja algunos antes de unirte."; +"lng_join_channel_error" = "Lo sentimos, te has unido a demasiados canales y supergrupos. Por favor, sal de algunos antes de unirte."; "lng_edit_deleted" = "Este mensaje fue eliminado"; "lng_edit_too_long" = "Tu texto es demasiado largo"; "lng_edit_message" = "Editar mensaje"; @@ -439,9 +439,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_profile_clear_history" = "Borrar historial"; "lng_profile_delete_conversation" = "Eliminar chat"; "lng_profile_clear_and_exit" = "Eliminar y salir"; -"lng_profile_leave_channel" = "Dejar el canal"; +"lng_profile_leave_channel" = "Salir del canal"; "lng_profile_delete_channel" = "Eliminar el canal"; -"lng_profile_leave_group" = "Dejar el grupo"; +"lng_profile_leave_group" = "Salir del grupo"; "lng_profile_delete_group" = "Eliminar grupo"; "lng_profile_report" = "Reportar"; "lng_profile_search_messages" = "Buscar mensajes"; @@ -457,7 +457,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_profile_add_participant" = "Añadir miembros"; "lng_profile_view_channel" = "Ver canal"; "lng_profile_join_channel" = "Unirme"; -"lng_profile_delete_and_exit" = "Dejar grupo"; +"lng_profile_delete_and_exit" = "Salir"; "lng_profile_kick" = "Eliminar"; "lng_profile_admin" = "administrador"; "lng_profile_sure_kick" = "¿Eliminar a {user} del grupo?"; @@ -539,14 +539,14 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_create_channel_crop" = "Selecciona el área para la foto del canal"; "lng_failed_add_participant" = "No se pudo añadir al usuario. Por favor, reinténtalo más tarde."; -"lng_failed_add_not_mutual" = "Lo sentimos, si una persona deja el grupo, sólo un contacto mutuo puede volver a invitarlo (necesitan tener tu número y tú el suyo)."; -"lng_failed_add_not_mutual_channel" = "Lo sentimos, si una persona deja el canal, sólo un contacto mutuo puede volver a invitarlo (necesitan tener tu número y tú el suyo)."; +"lng_failed_add_not_mutual" = "Lo sentimos, si una persona sale del grupo, sólo un contacto mutuo puede volver a invitarlo (necesitan tener tu número y tú el suyo)."; +"lng_failed_add_not_mutual_channel" = "Lo sentimos, si una persona sale del canal, sólo un contacto mutuo puede volver a invitarlo (necesitan tener tu número y tú el suyo)."; "lng_sure_delete_contact" = "¿Quieres eliminar a {contact} de tu lista de contactos?"; "lng_sure_delete_history" = "¿Quieres borrar todo el historial de mensajes con {contact}?\n\nEsta acción no se puede deshacer."; "lng_sure_delete_group_history" = "¿Quieres borrar todo el historial en «{group}»?\n\nEsta acción no se puede deshacer."; -"lng_sure_delete_and_exit" = "¿Quieres borrar todo el historial de mensajes y dejar el grupo «{group}»?\n\nEsta acción no se puede deshacer."; -"lng_sure_leave_channel" = "¿Quieres dejar este canal?"; +"lng_sure_delete_and_exit" = "¿Quieres borrar todo el historial de mensajes y salir del grupo «{group}»?\n\nEsta acción no se puede deshacer."; +"lng_sure_leave_channel" = "¿Quieres salir de este canal?"; "lng_sure_delete_channel" = "¿Quieres eliminar este canal? Todos los miembros y mensajes se perderán."; "lng_sure_leave_group" = "¿Quieres salir del grupo?\nNo puedes deshacer esta acción."; "lng_sure_delete_group" = "¿Quieres eliminar este grupo? Todos los miembros y mensajes se perderán."; @@ -944,7 +944,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_box_leave" = "Salir"; "lng_about_version" = "versión {version}"; -"lng_about_text_1" = "Aplicación oficial y gratuita basada en la [a href=\"https://core.telegram.org/api\"]API de Telegram[/a]\npara su velocidad y seguridad."; +"lng_about_text_1" = "Aplicación oficial y gratuita basada en la [a href=\"https://core.telegram.org/api\"]API de Telegram[/a] para su velocidad y seguridad."; "lng_about_text_2" = "Este software está licenciado bajo [a href=\"https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\"]GNU GPL[/a] versión 3.\nCódigo fuente disponible en [a href=\"https://github.com/telegramdesktop/tdesktop\"]GitHub[/a]."; "lng_about_text_3" = "Conoce más en las {faq_open}preguntas frecuentes de Telegram{faq_close}."; "lng_about_done" = "Hecho"; @@ -972,7 +972,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_mediaview_saved" = "La imagen fue guardada en tu carpeta [c]Descargas[/c]"; -"lng_new_authorization" = "{name}:\nDetectamos un inicio de sesión en tu cuenta desde un nuevo dispositivo el {day}, {date} a las {time}\n\nDispositivo: {device}\nUbicación: {location}\n\nSi no eras tú, puedes ir a Ajustes > Mostrar todas las sesiones y cerrar esa sesión.\n\nSi crees que alguien inició tu sesión sin tu consentimiento, puedes activar la verificación en dos pasos en Ajustes.\n\nGracias.\nEl equipo de Telegram"; +"lng_new_authorization" = "{name}:\nDetectamos un inicio de sesión en tu cuenta desde un nuevo dispositivo el {day}, {date} a las {time}\n\nDispositivo: {device}\nUbicación: {location}\n\nSi no eras tú, puedes ir a Ajustes > Mostrar todas las sesiones, y cerrar esa sesión.\n\nSi crees que alguien inició tu sesión sin tu consentimiento, puedes activar la verificación en dos pasos en Ajustes.\n\nAtentamente,\nEl equipo de Telegram"; "lng_new_version_wrap" = "Telegram Desktop ha sido actualizada a la versión {version}\n\n{changes}\n\nEl historial completo está disponible aquí:\n{link}"; "lng_new_version_minor" = "— Corrección de errores y otras mejoras menores"; diff --git a/Telegram/Resources/langs/lang_it.strings b/Telegram/Resources/langs/lang_it.strings index 640b9b98fd..ac43f86c75 100644 --- a/Telegram/Resources/langs/lang_it.strings +++ b/Telegram/Resources/langs/lang_it.strings @@ -91,7 +91,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_reconnecting_try_now" = "Prova ora"; "lng_status_service_notifications" = "notifiche di servizio"; -"lng_status_support" = "supporto"; +"lng_status_support" = "assistenza"; "lng_status_bot" = "bot"; "lng_status_bot_reads_all" = "ha accesso ai messaggi"; "lng_status_bot_not_reads_all" = "non ha accesso ai messaggi"; @@ -139,7 +139,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_pinned_notify" = "Notifica tutti i membri"; "lng_intro" = "Benvenuti nell'app desktop ufficiale di [a href=\"https://telegram.org/\"]Telegram[/a].\nÈ [b]veloce[/b] e [b]sicura[/b]."; -"lng_start_msgs" = "INIZIA A CHATTARE"; +"lng_start_msgs" = "INIZIA A MESSAGGIARE"; "lng_intro_next" = "AVANTI"; "lng_intro_finish" = "ISCRIVITI"; @@ -148,9 +148,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_photo_caption" = "Didascalia"; "lng_phone_ph" = "Il tuo numero di telefono"; -"lng_phone_title" = "Tuo telefono"; -"lng_phone_desc" = "Per favore conferma il tuo prefisso nazionale e\ninserisci il tuo numero di telefono."; -"lng_phone_notreg" = "Nota: se non hai ancora un account Telegram,\nper favore [b]registrati[/b] con il tuo dispositivo [a href=\"https://telegram.org/\"]iOS / Android[/a] o {signup_start}qui »{signup_end}"; +"lng_phone_title" = "Il tuo telefono"; +"lng_phone_desc" = "Per favore conferma il tuo prefisso internazionale e\ninserisci il tuo numero di telefono."; +"lng_phone_notreg" = "Se non hai ancora un account Telegram,\nper favore [b]registrati[/b] da [a href=\"https://telegram.org/\"]iOS / Android[/a] o {signup_start}qui »{signup_end}"; "lng_country_code" = "Prefisso nazionale"; "lng_bad_country_code" = "Prefisso nazionale non valido"; "lng_country_ph" = "Cerca"; @@ -254,7 +254,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_notification_preview" = "Hai un nuovo messaggio"; "lng_notification_reply" = "Rispondi"; "lng_notification_hide_all" = "Nascondi tutte"; -"lng_notification_sample" = "Questa è un esempio di notifica"; +"lng_notification_sample" = "Questa è una notifica di esempio"; "lng_settings_section_general" = "Generali"; "lng_settings_change_lang" = "Cambia lingua"; @@ -326,10 +326,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_passcode_remove_button" = "Rimuovi"; -"lng_passcode_turn_on" = "Attiva codice"; -"lng_passcode_change" = "Cambia codice"; -"lng_passcode_create" = "Codice locale"; -"lng_passcode_remove" = "Rimuovi codice"; +"lng_passcode_turn_on" = "Attiva codice di blocco"; +"lng_passcode_change" = "Cambia codice di blocco"; +"lng_passcode_create" = "Codice di blocco"; +"lng_passcode_remove" = "Rimuovi codice di blocco"; "lng_passcode_turn_off" = "Disattiva"; "lng_passcode_autolock" = "Blocco automatico"; "lng_passcode_autolock_away" = "Blocco automatico se lontano per:"; @@ -344,7 +344,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_passcode_differ" = "I codici sono diversi"; "lng_passcode_wrong" = "Codice errato"; "lng_passcode_is_same" = "Il codice non è stato cambiato"; -"lng_passcode_enter" = "Inserisci il tuo codice"; +"lng_passcode_enter" = "Inserisci il tuo codice di blocco"; "lng_passcode_submit" = "Invia"; "lng_passcode_logout" = "Esci"; "lng_passcode_need_unblock" = "Devi prima sbloccarmi."; @@ -398,7 +398,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_reset_done" = "Altre sessioni terminate"; "lng_settings_manage_local_storage" = "Gestisci archivio locale"; "lng_settings_ask_question" = "Fai una domanda"; -"lng_settings_ask_sure" = "Per favore nota che il supporto di Telegram è fornito da volontari. Proviamo a rispondere quanto prima, ma potrebbe volerci del tempo.\n\nDai un'occhiata alle domande frequenti di Telegram: contengono suggerimenti importanti per risolvere i problemi e risposte a quasi tutte le domande."; +"lng_settings_ask_sure" = "Per favore nota che l'assistenza di Telegram è fornita da volontari. Proviamo a rispondere quanto prima, ma potrebbe volerci del tempo.\n\nDai un'occhiata alle domande frequenti di Telegram: contengono suggerimenti importanti per risolvere i problemi e risposte a quasi tutte le domande."; "lng_settings_faq_button" = "Domande frequenti"; "lng_settings_ask_ok" = "Chiedi"; "lng_settings_faq" = "Domande frequenti"; @@ -642,8 +642,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_forwarded" = "Inoltrato da {user}"; "lng_forwarded_channel" = "Inoltrato da {channel}"; -"lng_forwarded_via" = "Inoltrato da {user} tramite {inline_bot}"; -"lng_forwarded_channel_via" = "Inoltrato da {channel} tramite {inline_bot}"; +"lng_forwarded_via" = "Inoltrato da {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Inoltrato da {channel} via {inline_bot}"; "lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "In risposta a"; "lng_edited" = "modificato"; @@ -701,7 +701,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "GIF salvate"; "lng_inline_bot_results" = "Risultati da {inline_bot}"; "lng_inline_bot_no_results" = "Nessun risultato"; -"lng_inline_bot_via" = "tramite {inline_bot}"; +"lng_inline_bot_via" = "via {inline_bot}"; "lng_box_remove" = "Rimuovi"; @@ -761,7 +761,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_will_be_notified" = "I post saranno notificati ai membri"; "lng_wont_be_notified" = "I post non saranno notificati ai membri"; "lng_empty_history" = ""; -"lng_willbe_history" = "Seleziona una chat per iniziare a chattare"; +"lng_willbe_history" = "Seleziona una chat per iniziare a messaggiare"; "lng_from_you" = "Tu"; "lng_from_draft" = "Bozza"; "lng_bot_description" = "Cosa può fare questo bot?"; @@ -972,7 +972,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_mediaview_saved" = "L'immagine è stata salvata nella tua cartella [c]Download[/c]"; -"lng_new_authorization" = "{name},\nAbbiamo rilevato un accesso al tuo account da un nuovo dispositivo il {day}, {date} alle {time}\n\nDispositivo: {device}\nPosizione: {location}\n\nSe non sei tu, puoi andare su Impostazioni – Mostra tutte le sessioni e terminare quella sessione.\n\nSe credi che qualcuno si sia collegato al tuo account contro il tuo volere, puoi attivare la verifica in due passaggi nelle Impostazioni. \n\nGrazie, \nIl Team di Telegram"; +"lng_new_authorization" = "{name},\nAbbiamo rilevato un accesso al tuo account da un nuovo dispositivo {day}, {date} alle {time}\n\nDispositivo: {device}\nPosizione: {location}\n\nSe non sei tu, puoi andare nelle Impostazioni – Mostra tutte le sessioni e terminare quella sessione.\n\nSe credi che qualcuno si sia collegato al tuo account contro il tuo volere, puoi attivare la verifica in due passaggi nelle Impostazioni. \n\nSinceramente, \nIl Team di Telegram"; "lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}"; "lng_new_version_minor" = "— Risoluzione di problemi e altri miglioramenti minori"; diff --git a/Telegram/Resources/langs/lang_ko.strings b/Telegram/Resources/langs/lang_ko.strings index 5ba18317e3..a1899e8081 100644 --- a/Telegram/Resources/langs/lang_ko.strings +++ b/Telegram/Resources/langs/lang_ko.strings @@ -150,7 +150,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_phone_ph" = "휴대폰 번호"; "lng_phone_title" = "전화번호"; "lng_phone_desc" = "국가번호와 전화번호를 입력하세요. \n(대한민국 국가번호: 82)"; -"lng_phone_notreg" = "확인사항: 아직 텔레그램 계정이 없으실 경우 [a href=\"https://telegram.org/\"]iOS / 안드로이드[/a] 기기로 [b]회원가입[/b]을 해주시거나 {signup_start}여기 »{signup_end} 에서 회원가입을 해주세요."; +"lng_phone_notreg" = "아직 텔레그램 계정이 없으실 경우,\n [a href=\"https://telegram.org/\"]iOS / 안드로이드[/a]로 [b]회원가입[/b]을 해주시거나 \n{signup_start}여기 »{signup_end} 에서 회원가입을 해주세요."; "lng_country_code" = "국가번호"; "lng_bad_country_code" = "올바른 국가번호가 아닙니다."; "lng_country_ph" = "검색"; diff --git a/Telegram/Resources/langs/lang_nl.strings b/Telegram/Resources/langs/lang_nl.strings index 1ac90322d3..05987180cd 100644 --- a/Telegram/Resources/langs/lang_nl.strings +++ b/Telegram/Resources/langs/lang_nl.strings @@ -150,7 +150,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_phone_ph" = "Je telefoonnummer"; "lng_phone_title" = "Je telefoon"; "lng_phone_desc" = "Bevestig je landnummer en \nvoer je telefoonnummer in."; -"lng_phone_notreg" = "Als je nog geen Telegram-account hebt,\nkun je je [b]aanmelden [/b] met [a href=\"https://telegram.org/\"]iOS / Android[/a] of {signup_start}hier »{signup_end}"; +"lng_phone_notreg" = "Als je nog geen Telegram-account hebt,\nkun je je [b]aanmelden [/b] met [a href=\"https://telegram.org/\"]iOS / Android[/a] of {signup_start}hier »{signup_end}"; "lng_country_code" = "Landnummer"; "lng_bad_country_code" = "Ongeldig landnummer"; "lng_country_ph" = "Zoeken"; @@ -166,7 +166,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_code_calling" = "Oproepverzoek naar Telegram..."; "lng_code_called" = "Telegram heeft je nummer gebeld"; -"lng_bad_phone" = "Ongeldig telefoonnummer. \nProbeer het opnieuw."; +"lng_bad_phone" = "Ongeldig telefoonnummer. "; "lng_bad_phone_noreg" = "Telefoonnummer is niet geregistreerd."; "lng_bad_code" = "Je hebt een ongeldige code ingevoerd."; "lng_bad_name" = "Voer je voor- en achternaam in."; diff --git a/Telegram/Resources/langs/lang_pt_BR.strings b/Telegram/Resources/langs/lang_pt_BR.strings index f4d9660e21..8a44b6e94b 100644 --- a/Telegram/Resources/langs/lang_pt_BR.strings +++ b/Telegram/Resources/langs/lang_pt_BR.strings @@ -121,7 +121,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_admins_link" = "{count:_not_used_|# administrador|# administradores}"; "lng_server_error" = "Erro interno do servidor."; -"lng_flood_error" = "Muitas tentativas. Por favor, tente novamente mais tarde."; +"lng_flood_error" = "Muitas tentativas. Tente novamente mais tarde."; "lng_gif_error" = "Um erro ocorreu com a animação do GIF :("; "lng_edit_error" = "Você não pode editar essa mensagem"; "lng_join_channel_error" = "Desculpe, você já entrou em muitos canais e supergrupos. Por favor, saia de alguns antes de entrar."; @@ -162,7 +162,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_code_desc" = "Enviamos uma SMS com um código de ativação\npara o seu telefone. Insira-o abaixo."; "lng_code_telegram" = "Por favor, insira o código recebido\nem seu aplicativo prévio do [b]Telegram[/b]"; "lng_code_no_telegram" = "Enviar código via SMS"; -"lng_code_call" = "Telegram irá te ligar em {minutes}{seconds}"; +"lng_code_call" = "Telegram irá te ligar em {minutes}:{seconds}"; "lng_code_calling" = "Aguardando a ligação do Telegram.."; "lng_code_called" = "Telegram ligou para o seu número"; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 692f49082d..974f960999 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -605,6 +605,11 @@ void DialogsInner::leaveEvent(QEvent *e) { clearSelection(); } +void DialogsInner::dragLeft() { + setMouseTracking(false); + clearSelection(); +} + void DialogsInner::clearSelection() { _selByMouse = false; if (_importantSwitchSel || _sel || _filteredSel >= 0 || _hashtagSel >= 0 || _searchedSel >= 0 || _peopleSel >= 0) { @@ -2233,7 +2238,7 @@ void DialogsWidget::dragMoveEvent(QDragMoveEvent *e) { } } else { if (_dragForward) updateDragInScroll(false); - _inner->leaveEvent(0); + _inner->dragLeft(); e->setDropAction(Qt::IgnoreAction); } e->accept(); @@ -2245,7 +2250,7 @@ void DialogsWidget::dragLeaveEvent(QDragLeaveEvent *e) { } else { _chooseByDragTimer.stop(); } - _inner->leaveEvent(0); + _inner->dragLeft(); e->accept(); } diff --git a/Telegram/SourceFiles/dialogswidget.h b/Telegram/SourceFiles/dialogswidget.h index 14dec9b2be..509d4d54c4 100644 --- a/Telegram/SourceFiles/dialogswidget.h +++ b/Telegram/SourceFiles/dialogswidget.h @@ -65,13 +65,6 @@ public: void contactsReceived(const QVector &contacts); - void mouseMoveEvent(QMouseEvent *e); - void mousePressEvent(QMouseEvent *e); - void resizeEvent(QResizeEvent *e); - void enterEvent(QEvent *e); - void leaveEvent(QEvent *e); - void contextMenuEvent(QContextMenuEvent *e); - void selectSkip(int32 direction); void selectSkipPage(int32 pixels, int32 direction); @@ -80,6 +73,8 @@ public: void dlgUpdated(History *row, MsgId msgId); void removeDialog(History *history); + void dragLeft(); + void loadPeerPhotos(int32 yFrom); void clearFilter(); void refresh(bool toTop = false); @@ -152,6 +147,12 @@ signals: protected: void paintRegion(Painter &p, const QRegion ®ion, bool paintingOther) override; + void mouseMoveEvent(QMouseEvent *e) override; + void mousePressEvent(QMouseEvent *e) override; + void resizeEvent(QResizeEvent *e) override; + void enterEvent(QEvent *e) override; + void leaveEvent(QEvent *e) override; + void contextMenuEvent(QContextMenuEvent *e) override; private: void itemRemoved(HistoryItem *item); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 6f4dc2928c..16f80afcd8 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -56,9 +56,9 @@ void historyInit() { History::History(const PeerId &peerId) : peer(App::peer(peerId)) , lastItemTextCache(st::dialogsTextWidthMin) -, _sendActionText(st::dialogsTextWidthMin) , cloudDraftTextCache(st::dialogsTextWidthMin) -, _mute(isNotifyMuted(peer->notify)) { +, _mute(isNotifyMuted(peer->notify)) +, _sendActionText(st::dialogsTextWidthMin) { if (peer->isUser() && peer->asUser()->botInfo) { outboxReadBefore = INT_MAX; } diff --git a/Telegram/SourceFiles/mainwindow.cpp b/Telegram/SourceFiles/mainwindow.cpp index f3f1d265fd..dbcfbc3aa9 100644 --- a/Telegram/SourceFiles/mainwindow.cpp +++ b/Telegram/SourceFiles/mainwindow.cpp @@ -287,7 +287,7 @@ void MainWindow::checkAutoLock() { App::app()->checkLocalTime(); auto ms = getms(true), idle = psIdleTime(), should = Global::AutoLock() * 1000LL; - if (idle >= should || (_shouldLockAt > 0 && ms > _shouldLockAt + 3000ULL)) { + if (idle >= should || (_shouldLockAt > 0 && ms > _shouldLockAt + 3000LL)) { setupPasscode(); } else { _shouldLockAt = ms + (should - idle); diff --git a/Telegram/SourceFiles/ui/effects/send_action_animations.cpp b/Telegram/SourceFiles/ui/effects/send_action_animations.cpp index d207ec3c22..54e5f1d232 100644 --- a/Telegram/SourceFiles/ui/effects/send_action_animations.cpp +++ b/Telegram/SourceFiles/ui/effects/send_action_animations.cpp @@ -217,4 +217,6 @@ std_::unique_ptr SendActionAnimation::createByType(Ty return Implementations->value(type, &TypingAnimation::kMeta)->creator(); } +SendActionAnimation::~SendActionAnimation() = default; + } // namespace Ui diff --git a/Telegram/SourceFiles/ui/effects/send_action_animations.h b/Telegram/SourceFiles/ui/effects/send_action_animations.h index 2e9a3c6114..bfb802e506 100644 --- a/Telegram/SourceFiles/ui/effects/send_action_animations.h +++ b/Telegram/SourceFiles/ui/effects/send_action_animations.h @@ -61,6 +61,8 @@ public: paintFrame(p, color, x, y, outerWidth, qMax(ms - _started, 0LL) % _period); } + virtual ~Impl() = default; + private: virtual void paintFrame(Painter &p, const style::color &color, int x, int y, int outerWidth, int frameMs) = 0; @@ -69,6 +71,8 @@ public: }; + ~SendActionAnimation(); + private: std_::unique_ptr createByType(Type type); diff --git a/Telegram/SourceFiles/ui/twidget.h b/Telegram/SourceFiles/ui/twidget.h index 28811b5eae..7dccc90261 100644 --- a/Telegram/SourceFiles/ui/twidget.h +++ b/Telegram/SourceFiles/ui/twidget.h @@ -81,6 +81,13 @@ public: class PainterHighQualityEnabler { public: PainterHighQualityEnabler(Painter &p) : _painter(p) { + static constexpr QPainter::RenderHint Hints[] = { + QPainter::Antialiasing, + QPainter::SmoothPixmapTransform, + QPainter::TextAntialiasing, + QPainter::HighQualityAntialiasing + }; + auto hints = _painter.renderHints(); for_const (auto hint, Hints) { if (!(hints & hint)) { @@ -102,12 +109,6 @@ public: private: Painter &_painter; QPainter::RenderHints _hints = 0; - static constexpr QPainter::RenderHint Hints[] = { - QPainter::Antialiasing, - QPainter::SmoothPixmapTransform, - QPainter::TextAntialiasing, - QPainter::HighQualityAntialiasing - }; };