diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a5c618a..0000000 --- a/.gitignore +++ /dev/null @@ -1,16 +0,0 @@ -# Build files and dirs -build* - -# KDevelop and other IDE-specific project files -*.kdev* - -# Doxygen files -apidocs/ -kmess.tag - -# Mac stuff -.DS_Store -finkbuild - -# ./configure script stuff -Makefile diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 72173c7..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "contrib/isf-qt"] - path = contrib/isf-qt - url = git://gitorious.org/kmess/libisf-qt.git diff --git a/AUTHORS b/AUTHORS index 19bdbd7..c3849b4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -253,6 +253,7 @@ Timo Tambet - Contact Changed and Group Changed notifications. + - Contact added user dialog tabbing KMerlin - Inspiration and assorted code diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f3ec49..4e6b42e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -150,7 +150,7 @@ INCLUDE_DIRECTORIES( ${KDE4_INCLUDES} ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${LIBXM # Switch between the following two commands to force using a predefined version number # EXECUTE_PROCESS( COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cmake/get-git-version.sh OUTPUT_VARIABLE KMESS_VERSION ) -SET( KMESS_VERSION "2.0.5" ) +SET( KMESS_VERSION "2.0.6" ) #### Define compiler flags #### @@ -178,7 +178,7 @@ ENDIF( CMAKE_COMPILER_IS_GNUCXX ) # - relwithdebinfo (release with debug info) # - minsizerel (minsize release) # Uncomment the next line to always force building in full debug mode -# SET( CMAKE_BUILD_TYPE debugfull ) +SET( CMAKE_BUILD_TYPE debugfull ) # Enable the KMess debug output when compiling a debug build IF( CMAKE_BUILD_TYPE STREQUAL debugfull OR KMESS_DEBUG_OUTPUT EQUAL 1 ) diff --git a/ChangeLog b/ChangeLog index 961df75..8d841bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,39 @@ +--- 2.0.6 released --- + +2011-01-13 (Adam) + * Fix bug where KMess couldn't login due to badly formed URL commands. + +2011-01-08 (Valerio) + * Fixed crash when taking any action in the Contact Added User dialog. + Also removed an unnecessary signal-bouncing slot. + * Fixed a dangling pointer issue when the Contact Added User dialog was + shown, closed and shown again. + +2011-01-05 (Adam) + * Add new widget, FaderWidget, which smoothly fades between the initial view + and the contact list. Disable by setting NoFadeEffect to true under the + MainWindow section of kmessrc. + +2011-01-02 (Pano) + * Merged an updated Japanese translation by Daniel E. Moctezuma. + * Merged an updated Spanish translation by Daniel E. Moctezuma. + * Merged an updated German translation. + +2010-12-24 (Adam) + * Fix retrieval of roaming display picture. + +2010-12-23 (Adam) + * Fix a problem where roaming service profile data was invalid. + +2010-12-13 (Valerio) + * Fixed "Visit Link" context-menu icon in chat. Thanks to IRC's agostino for the + heads-up. + +2010-11-16 (Adam) + * (Finally) merged in a modified patch by Timo Tambet that groups all + "contact added user" windows as tabs under a single dialog. + --- 2.0.5 released --- 2010-10-23 (Valerio) diff --git a/Doxyfile b/Doxyfile index 0076807..76e5bee 100644 --- a/Doxyfile +++ b/Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = KMess -PROJECT_NUMBER = 2.0.5 +PROJECT_NUMBER = 2.0.6 OUTPUT_DIRECTORY = ./apidocs CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff --git a/NEWS b/NEWS index 0b07912..c163bb9 100644 --- a/NEWS +++ b/NEWS @@ -1,9 +1,26 @@ -Changes between KMess SVN and 2.0.5: +Changes between KMess Git and 2.0.6: -------------------------------------- - None yet. +Changes between KMess 2.0.6 and 2.0.5: +-------------------------------------- + +- fix bug where KMess couldn't login due to badly formed URL commands. +- fixed crash when taking any action in the Contact Added User dialog. +- fixed a possible crash when using the Contact Added User dialog. +- Added a fading effect when switching between the initial view + and the contact list. +- fixed retrieval of display pictures from online MSN storage. +- fixed a problem where roaming service profile data was invalid. +- fixed "Visit Link" context-menu icon in chat. Thanks to IRC's agostino. +- improved Contact Added User dialog with tabs. Thanks ti Timo Tambet. +- updated Japanese translation by Daniel E. Moctezuma. +- updated Spanish translation by Daniel E. Moctezuma. +- updated German translation. + + Changes between KMess 2.0.5 and 2.0.4: -------------------------------------- diff --git a/configure b/configure index 52f4049..275ceb9 100755 --- a/configure +++ b/configure @@ -54,7 +54,7 @@ DEBUG=0 # Globals cd `dirname $0` SRC_DIR="$PWD" -KMESS_VER="`./cmake/get-svn-version.sh`" +KMESS_VER="`./cmake/get-git-version.sh`" diff --git a/contrib/isf-qt/.gitignore b/contrib/isf-qt/.gitignore deleted file mode 100644 index 90deaf9..0000000 --- a/contrib/isf-qt/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ - -# Build files and dirs -build* - -# KDevelop and other IDE-specific project files -*.kdev* diff --git a/po/de.po b/po/de.po index 3aa91d4..6ebc3b1 100644 --- a/po/de.po +++ b/po/de.po @@ -10,14 +10,14 @@ msgstr "" "Project-Id-Version: de\n" "Report-Msgid-Bugs-To: http://www.kmess.org/board/\n" "POT-Creation-Date: 2010-08-04 19:23+0200\n" -"PO-Revision-Date: 2010-06-27 14:36+0200\n" +"PO-Revision-Date: 2010-08-29 00:07+0200\n" "Last-Translator: Panagiotis Papadopoulos \n" "Language-Team: German \n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.0\n" +"X-Generator: Lokalize 1.1\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" #: account.cpp:45 account.cpp:755 @@ -2984,8 +2984,8 @@ msgid "" "If you feel your name is missing here, please contact us too!" msgstr "" "Sie sind eingeladen Fehlerkorrekturen und Verbesserungen im KMess-Forum zu " -"veröffentlichen!\n" -"Wenn Sie denken, dass Ihr Name hier fehlt kontaktieren Sie uns bitte!" +"veröffentlichen.\n" +"Wenn Sie denken, dass Ihr Name hier fehlt kontaktieren Sie uns bitte." #: main.cpp:194 msgid "Your name here?" @@ -5617,7 +5617,7 @@ msgid "" "are not using the computer for a few minutes. If this option is not " "available, KMess was built without support for this feature." msgstr "" -"Ist diese Option aktiviert, wird Ihr Status automatisch auf „Inaktiv“ " +"Ist diese Option aktiviert, wird Ihr Status automatisch auf „Inaktiv“ " "gesetzt, wenn Sie Ihren Computer für einige Minuten nicht benutzen. Falls " "diese Option nicht verfügbar ist, wurde KMess ohne Unterstützung für diese " "Funktion kompiliert." @@ -6321,7 +6321,7 @@ msgid "" msgstr "" "Ist diese Option aktiviert, wird eine Benachrichtigung angezeigt, sobald " "eine E-Mail in Ihrem Posteingang eintrifft. Die Anzahl der ungelesen E-Mail-" -"Nachrichten, wird über der Kontaktliste angezeigt. Diese Option ist nur für " +"Nachrichten wird über der Kontaktliste angezeigt. Diese Option ist nur für " "„Live Mail“-Zugänge verfügbar." #. i18n: file: settings/contactlistpage.ui:26 diff --git a/po/es.po b/po/es.po index 96d2f23..2834e98 100644 --- a/po/es.po +++ b/po/es.po @@ -9,19 +9,20 @@ # Alexis Medina , 2009. # Manuel Ramírez , 2009. # Mauricio Muñoz Lucero , 2009, 2010. +# Daniel E. Moctezuma , 2010. msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: http://www.kmess.org/board/\n" "POT-Creation-Date: 2010-08-04 19:23+0200\n" -"PO-Revision-Date: 2010-03-01 09:45+0100\n" -"Last-Translator: Mauricio Muñoz Lucero \n" +"PO-Revision-Date: 2010-12-13 19:26-0800\n" +"Last-Translator: Daniel E. Moctezuma \n" "Language-Team: Spanish \n" "Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Lokalize 1.0\n" +"X-Generator: Lokalize 1.1\n" "First-Translator: Javier Cuesta Alcocer \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Language: es_AR\n" @@ -128,8 +129,9 @@ msgid "" "KMess could not save the log for the chat with "%1":
The chat logs directory, "%2", does not exist." msgstr "" -"KMess no pudo guardar el historial de esta conversación.
No " -"existe el directorio de historiales de conversación "%1"." +"KMess no pudo guardar el historial de la conversación con " +""%1".
No " +"existe el directorio de historiales de conversación "%2"." #: chat/chat.cpp:956 msgctxt "Message shown in the chat window (when the wink name is unknown)" @@ -473,7 +475,6 @@ msgstr "" "guardar los historiales." #: chat/chatview.cpp:563 -#, fuzzy msgctxt "Chat log saving dialog, file type filter" msgid "" "*.html *.htm|Web Page (*.html)\n" @@ -481,7 +482,6 @@ msgid "" msgstr "" "*.html *.htm|Página web (*.html)\n" "*.txt|Documento de texto plano (*.txt)\n" -"*.xml|Documento XML (*.xml)" #: chat/chatview.cpp:581 #, kde-format @@ -2050,7 +2050,6 @@ msgid "[%1] %2 goes offline" msgstr "[%1] %2 se desconectó" #: kmessview.cpp:440 -#, fuzzy msgid "Search in contact list..." msgstr "Buscar entre los contactos..." @@ -2157,7 +2156,7 @@ msgstr "Presione aquí para cambiar su seudónimo" #: kmessview.cpp:1845 msgctxt "Default personal message shown in the contact list" msgid "[i]Click to set a personal message[/i]" -msgstr "" +msgstr "[i]Presione aquí para definir un mensale personal[/i]" #: kmessview.cpp:1846 msgctxt "Default personal message tooltip" @@ -2196,14 +2195,16 @@ msgstr[0] "%1 nuevo mensaje de correo electrónico" msgstr[1] "%1 nuevos mensajes de correo electrónico" #: kmessview.cpp:2253 -#, fuzzy msgid "Show contacts what you are listening to (click to disable)" -msgstr "Mostrarle a mis contactos la &canción que estoy escuchando" +msgstr "" +"Mostrarle a mis contactos la canción que estoy escuchando (presione para " +"deshabilitar)" #: kmessview.cpp:2258 -#, fuzzy msgid "Show contacts what you are listening to (click to enable)" -msgstr "Mostrarle a mis contactos la &canción que estoy escuchando" +msgstr "" +"Mostrarle a mis contactos la canción que estoy escuchando (presione para " +"habilitar)" #: kmessviewdelegate.cpp:298 #, kde-format @@ -2881,8 +2882,10 @@ msgstr "" "contacto en la ventana de conversacion" #: main.cpp:182 +#, fuzzy msgid "Internationalization fixes, drag'n'drop of images into display pictures" msgstr "" +"Correcciones a la internacionalización, drag'n'drop de imágenes para mostrar" #: main.cpp:182 msgid "Marco Mentasti" @@ -2890,7 +2893,7 @@ msgstr "Marco Mentasti" #: main.cpp:183 msgid "Francesco Nwokeka" -msgstr "" +msgstr "Francesco Nwokeka" #: main.cpp:183 msgid "Now Listening toggle button above the contact list." @@ -2969,12 +2972,14 @@ msgstr "¿Su nombre aquí?" #: main.cpp:197 rc.cpp:1 msgctxt "NAME OF TRANSLATORS" msgid "Your names" -msgstr "Juan Pablo González Tognarelli,Manuel Ramírez,Guillermo Arana" +msgstr "" +"Juan Pablo González Tognarelli,Manuel Ramírez,Guillermo Arana,Daniel E. " +"Moctezuma" #: main.cpp:198 msgctxt "EMAIL OF TRANSLATORS" msgid "Your email addresses" -msgstr ",,elgui02@gmail.com" +msgstr ",,elgui02@gmail.com,democtezuma@gmail.com" #: main.cpp:204 msgid "Do not show the contact list window initially" @@ -4137,9 +4142,8 @@ msgid "Contact changed status" msgstr "" #: notification/macnotification.cpp:66 -#, fuzzy msgid "You received a new e-mail message" -msgstr "%1 nuevo mensaje de correo electrónico" +msgstr "Ha recibido un nuevo correo electrónico" #: notification/macnotification.cpp:72 msgid "A contact nudged you!" @@ -4169,9 +4173,8 @@ msgid "A contact changed status" msgstr "" #: notification/macnotification.cpp:107 -#, fuzzy msgid "KMess notification" -msgstr "Icono de KMess" +msgstr "Notificaciones de KMess" #: notification/newemailnotification.cpp:92 #, kde-format @@ -4196,32 +4199,32 @@ msgid "Docking in System Tray" msgstr "Minimizado en la bandeja de sistema" #: notification/newsystemtraywidget.cpp:205 -#, fuzzy, kde-format +#, kde-format msgctxt "" "Tray icon text tooltip when connected, %1 is the friendly name, %2 is the " "status" msgid "Connected as %1 (%2)" -msgstr "Conectando a %1, puerto %2" +msgstr "Conectado como %1 (%2)" #: notification/newsystemtraywidget.cpp:209 -#, fuzzy, kde-format +#, kde-format msgctxt "" "Tray icon HTML tooltip when connected, %1 is the friendly name, %2 is the " "status" msgid "

Connected as:
%1 (%2)

" -msgstr "
%1 (%2)%3" +msgstr "

Conectado como:
%1 (%2)

" #: notification/newsystemtraywidget.cpp:216 #, fuzzy msgctxt "Tray icon text tooltip when not connected" msgid "Not connected" -msgstr "Conectado" +msgstr "No conectado" #: notification/newsystemtraywidget.cpp:219 #, fuzzy msgctxt "Tray icon HTML tooltip when not connected" msgid "

Not connected

" -msgstr "

Se ha perdido la conexión con la red.

" +msgstr "

No conectado

" #: notification/notificationmanager.cpp:120 msgctxt "Button text for KDE notification boxes" @@ -4901,9 +4904,8 @@ msgstr "Filtro de historial" #. i18n: file: dialogs/chathistorydialog.ui:83 #. i18n: ectx: property (text), widget (QLabel, label_) #: rc.cpp:113 -#, fuzzy msgid "Chat date:" -msgstr "Estilo de &conversación:" +msgstr "Fecha de la conversación:" #. i18n: file: dialogs/contactaddeduserdialog.ui:52 #. i18n: ectx: property (title), widget (QGroupBox, groupBox) diff --git a/po/ja.po b/po/ja.po index 077eb7e..5cecb49 100644 --- a/po/ja.po +++ b/po/ja.po @@ -4,21 +4,21 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # -# Daniel E. Moctezuma , 2009, 2010. +# Daniel E. Moctezuma , 2009, 2010. msgid "" msgstr "" "Project-Id-Version: ja\n" "Report-Msgid-Bugs-To: http://www.kmess.org/board/\n" "POT-Creation-Date: 2010-08-04 19:23+0200\n" -"PO-Revision-Date: 2010-07-07 20:43-0700\n" -"Last-Translator: Daniel E. Moctezuma \n" -"Language-Team: 日本語 \n" +"PO-Revision-Date: 2010-12-28 00:30-0800\n" +"Last-Translator: Daniel E. Moctezuma \n" +"Language-Team: Japanese \n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Lokalize 1.0\n" +"X-Generator: Lokalize 1.1\n" #: account.cpp:45 account.cpp:755 msgid "I am away from my computer" @@ -110,13 +110,13 @@ msgid "%1 (This message was sent automatically)" msgstr "%1 (このメッセージは自動的に送信されました)" #: chat/chat.cpp:821 -#, fuzzy, kde-format +#, kde-format msgid "" "KMess could not save the log for the chat with "%1":
The chat logs directory, "%2", does not exist." msgstr "" -"KMess はこの会話のチャット・ログを保存できませんでした:
"" -"%1" のチャット・ログのディレクトリは存在しません。" +"KMess は "%1" さんとの会話のチャット・ログを保存できませんでした:
"" +"%2" のチャット・ログのディレクトリは存在しません。" #: chat/chat.cpp:956 msgctxt "Message shown in the chat window (when the wink name is unknown)" @@ -133,8 +133,7 @@ msgstr ""%1" のウインクを送信しました!" msgid "" "The chat has been disabled because you are no longer connected to the Live " "Messenger server." -msgstr "" -"Live Messengerのサーバにもう接続していませんからチャットが無効にされました。" +msgstr "Live Messengerのサーバにもう接続していませんからチャットが無効にされました。" #: chat/chat.cpp:1157 msgctxt "Warning message shown in chat" @@ -155,8 +154,7 @@ msgstr "" msgctxt "Warning message shown in chat, %1 is the contact's friendly name" msgid "" "%1 has sent you a voice clip, but KMess does not support voice clips yet." -msgstr "" -"%1 さんからボイスクリップを受信しましたがその機能はまだサポートしていません。" +msgstr "%1 さんからボイスクリップを受信しましたがその機能はまだサポートしていません。" #: chat/chat.cpp:1194 #, kde-format @@ -178,8 +176,7 @@ msgstr "知り合いは手書きメッセージをサポートしていません msgctxt "Warning message shown in chat, %1 is the contact's friendly name" msgid "" "%1 has sent you a Live Messenger feature that KMess does not support yet." -msgstr "" -"%1 さんから KMess がまだサポートしないLive Messengerの機能を受信しました。" +msgstr "%1 さんから KMess がまだサポートしないLive Messengerの機能を受信しました。" #: chat/chat.cpp:1245 #, kde-format @@ -347,8 +344,7 @@ msgstr "%2 さんにこのメッセージの配信に失敗しました:
% msgid "" "The file "%1" could not be found on your computer, and the " "download failed." -msgstr "" -""%1" のファイルは見つからなくて、ダウンロードに失敗しました。" +msgstr ""%1" のファイルは見つからなくて、ダウンロードに失敗しました。" #: chat/chat.cpp:1649 #, kde-format @@ -453,7 +449,6 @@ msgstr "" "保存しているフォルダで書き込み許可があるのを検証してください。" #: chat/chatview.cpp:563 -#, fuzzy msgctxt "Chat log saving dialog, file type filter" msgid "" "*.html *.htm|Web Page (*.html)\n" @@ -461,7 +456,6 @@ msgid "" msgstr "" "*.html *.htm|Web Page (*.html)\n" "*.txt|Plain Text Document (*.txt)\n" -"*.xml|XML Document (*.xml)" #: chat/chatview.cpp:581 #, kde-format @@ -645,7 +639,7 @@ msgstr "フォント(&F)" #: chat/chatwindow.cpp:538 msgid "Font &Color" -msgstr "フォンとの色(&C)" +msgstr "フォントの色(&C)" #: chat/chatwindow.cpp:539 msgid "C&lear Chat Window" @@ -701,16 +695,14 @@ msgstr "不明なコマンド" #: chat/chatwindow.cpp:1548 msgctxt "Error message shown in chat" msgid "Failed to send the handwritten message: the contacts do not support it." -msgstr "" -"手書きのメッセージの送信に失敗しました:知り合いはサポートしていません。" +msgstr "手書きのメッセージの送信に失敗しました:知り合いはサポートしていません。" #: chat/chatwindow.cpp:1586 msgctxt "Error message shown in chat" msgid "" "Failed to send the handwritten message: an error has occurred while creating " "it." -msgstr "" -"%1 さんに手書きのメッセージの送信に失敗しました:作成中エラーが発生しました。" +msgstr "%1 さんに手書きのメッセージの送信に失敗しました:作成中エラーが発生しました。" #: chat/chatwindow.cpp:1867 msgctxt "Chat window caption, without contact name" @@ -1708,8 +1700,7 @@ msgid "" msgid_plural "" "Waiting %1 seconds before reconnection...
Reconnect now!" -msgstr[0] "" -"再接続する前に%1秒を待っています...
すぐに再接続!" +msgstr[0] "再接続する前に%1秒を待っています...
すぐに再接続!" #: initialview.cpp:662 msgctxt "Button label" @@ -1734,8 +1725,7 @@ msgstr "有効なメールアドレスを入力してください" #: kmess.cpp:218 #, kde-format msgid "The contact %1 is already in your contact list." -msgstr "" -"%1 の知り合いはあなたのコンタクトリストに既にいます。" +msgstr "%1 の知り合いはあなたのコンタクトリストに既にいます。" #: kmess.cpp:218 msgid "Contact Information" @@ -1908,7 +1898,7 @@ msgstr "検索バーを表示(&S)" #: kmessinterface.cpp:177 msgid "Show &Empty Groups" -msgstr "空きグループを表示(&G)" +msgstr "空のグループを表示(&G)" #: kmessinterface.cpp:178 msgid "&Display Pictures Size" @@ -2002,7 +1992,6 @@ msgid "[%1] %2 goes offline" msgstr "[%1] %2 サインアウトしました" #: kmessview.cpp:440 -#, fuzzy msgid "Search in contact list..." msgstr "知り合いの検索..." @@ -2828,7 +2817,7 @@ msgstr "Francesco Nwokeka" #: main.cpp:183 msgid "Now Listening toggle button above the contact list." -msgstr "" +msgstr "コンタクトリストの上の「今聴いてる曲名を表示」のトグルボタン。" #: main.cpp:186 msgid "Inspiration and assorted code" @@ -3108,8 +3097,7 @@ msgstr "招待が中止されました。内部エラーが発生しました。 #: network/applications/mimeapplication.cpp:170 msgid "The invitation was aborted. Timeout while waiting for user to accept." -msgstr "" -"招待が中止されました。ユーザの承諾を待ちながら、タイムアウトが発生しました。" +msgstr "招待が中止されました。ユーザの承諾を待ちながら、タイムアウトが発生しました。" #: network/applications/mimeapplication.cpp:175 msgid "The invitation was aborted. Timeout while waiting for file data." @@ -3200,8 +3188,7 @@ msgstr "" #: network/applications/p2papplication.cpp:3499 #: network/applications/p2papplication.cpp:3583 msgid "The invitation was cancelled. A timeout occurred waiting for data." -msgstr "" -"招待がキャンセルされました。データを待ちながら、タイムアウトが発生しました。" +msgstr "招待がキャンセルされました。データを待ちながら、タイムアウトが発生しました。" #: network/applications/p2papplicationbase.cpp:622 #: network/applications/p2papplicationbase.cpp:1045 @@ -3214,8 +3201,7 @@ msgstr "転送に失敗しました。" #: network/applications/p2papplicationbase.cpp:1030 msgid "The transfer failed. Timeout while waiting for user to accept." -msgstr "" -"転送に失敗しました。ユーザの承諾を待ちながら、タイムアウトが発生しました。" +msgstr "転送に失敗しました。ユーザの承諾を待ちながら、タイムアウトが発生しました。" #: network/applications/p2papplicationbase.cpp:1049 msgid "The transfer failed. An internal error occured." @@ -3359,15 +3345,13 @@ msgstr "知り合いは許可及び禁止リストに追加できません" msgid "" "The group name is already present in your contact list. Please use a " "different name" -msgstr "" -"グループ名はコンタクトリストに既にあります。他の名前を入力してください。" +msgstr "グループ名はコンタクトリストに既にあります。他の名前を入力してください。" #: network/msnconnection.cpp:437 msgid "" "Your contact list has too many groups; you are allowed to only have at most " "30" -msgstr "" -"コンタクトリストはたくさんのグループがあります。最大のグループ数は30つです。" +msgstr "コンタクトリストはたくさんのグループがあります。最大のグループ数は30つです。" #: network/msnconnection.cpp:441 msgid "This group cannot be changed" @@ -3379,7 +3363,7 @@ msgstr "知り合いはこのグループに追加していません" #: network/msnconnection.cpp:450 msgid "This group is not empty" -msgstr "グループは空きではありません" +msgstr "グループは空ではありません" #: network/msnconnection.cpp:454 msgid "The group name is too long; it cannot be longer than 61 characters" @@ -3400,7 +3384,7 @@ msgstr "無効なグループ" #: network/msnconnection.cpp:467 msgid "Empty domain" -msgstr "空きドメイン" +msgstr "ドメインが指定されていません" #: network/msnconnection.cpp:471 msgid "Wrong ADL command format" @@ -3499,8 +3483,7 @@ msgstr "不良 USR チケット" #: network/msnconnection.cpp:576 msgid "Error accessing contact list, try again later" -msgstr "" -"コンタクトリストにアクセスできませんでした。後でもう一度試してください。" +msgstr "コンタクトリストにアクセスできませんでした。後でもう一度試してください。" #: network/msnconnection.cpp:585 msgid "" @@ -3774,8 +3757,7 @@ msgstr "" #: network/msnsocketbase.cpp:135 msgctxt "Dialog box message" msgid "Enter your username and password to access the network proxy." -msgstr "" -"ネットワークプロキシに接続するためにユーザ名とパスワードを入力してください。" +msgstr "ネットワークプロキシに接続するためにユーザ名とパスワードを入力してください。" #: network/msnsockethttp.cpp:691 #, kde-format @@ -3819,8 +3801,7 @@ msgctxt "Error message" msgid "" "The specified email address, \"%1\", does not belong to a Live Messenger " "account!" -msgstr "" -"入力したメールアドレス \"%1\" は、Live Messengerのアカウントに属しません!" +msgstr "入力したメールアドレス \"%1\" は、Live Messengerのアカウントに属しません!" #: network/soap/addressbookservice.cpp:853 #: network/soap/addressbookservice.cpp:876 @@ -4473,8 +4454,7 @@ msgctxt "Feedback dialog text, text to disallow feature requests" msgid "" "Please, do not ask for new features: this kind of request will be ignored." "
" -msgstr "" -"新しい機能を尋ねないでください:そのようなリクエストは無視します。
" +msgstr "新しい機能を尋ねないでください:そのようなリクエストは無視します。
" #: utils/likeback/likebackdialog.cpp:183 #, kde-format @@ -4728,7 +4708,7 @@ msgstr "チャット履歴のフィルタ" #: rc.cpp:113 #, fuzzy msgid "Chat date:" -msgstr "チャットスタイル(&C):" +msgstr "チャットの日付:" #. i18n: file: dialogs/contactaddeduserdialog.ui:52 #. i18n: ectx: property (title), widget (QGroupBox, groupBox) @@ -4966,8 +4946,9 @@ msgstr "送信" #. i18n: file: dialogs/networkwindow.ui:132 #. i18n: ectx: property (text), widget (QLabel, label_2) #: rc.cpp:248 +#, fuzzy msgid "Command payload (can be empty):" -msgstr "コマンドのペイロード(空きになれる):" +msgstr "コマンドのペイロード(指定しないでもいい):" #. i18n: file: dialogs/transferentry.ui:196 #. i18n: ectx: property (text), widget (KUrlLabel, openLabel_) @@ -5021,8 +5002,7 @@ msgstr "" #: rc.cpp:277 msgid "" "Enter here the email address of your registered Passport or Live account" -msgstr "" -"登録したパスポートまたはLiveアカウントのメールアドレスを入力してください。" +msgstr "登録したパスポートまたはLiveアカウントのメールアドレスを入力してください。" #. i18n: file: initialview.ui:195 #. i18n: ectx: property (text), widget (QLabel, TextLabel3) @@ -5085,8 +5065,7 @@ msgstr "自動的にサインイン" #: rc.cpp:313 msgid "" "Click this button to start using KMess, or to cancel a connection attempt" -msgstr "" -"このボタンをクリックして、KMess を使用するまたは接続の試しをキャンセルする。" +msgstr "このボタンをクリックして、KMess を使用するまたは接続の試しをキャンセルする。" #. i18n: file: initialview.ui:444 #. i18n: ectx: property (text), widget (KUrlLabel, newAccountLabel_) @@ -5507,8 +5486,7 @@ msgstr "チャット履歴を有効にする" msgid "" "If enabled, KMess additionaly saves your chat logs as HTML or plain text " "files" -msgstr "" -"有効にすると、チャット履歴は HTML またはプレーンテキストとして保存します" +msgstr "有効にすると、チャット履歴は HTML またはプレーンテキストとして保存します" #. i18n: file: settings/chatloggingpage.ui:39 #. i18n: ectx: property (title), widget (QGroupBox, saveChatsToFileCheckBox_) @@ -5663,7 +5641,7 @@ msgstr "年、月、日" #. i18n: ectx: property (toolTip), widget (QRadioButton, singleDirectoryRadioButton_) #: rc.cpp:597 msgid "Place all saved chat logs directly in the directory specified below" -msgstr "" +msgstr "チャット履歴は以下の指定するディレクトリを保存" #. i18n: file: settings/chatloggingpage.ui:227 #. i18n: ectx: property (whatsThis), widget (QRadioButton, singleDirectoryRadioButton_) @@ -5754,11 +5732,12 @@ msgstr "チャットウィンドウでウインクを表示するのを有効に #. i18n: file: settings/chatstylepage.ui:246 #. i18n: ectx: property (whatsThis), widget (QCheckBox, showWinksCheckBox_) #: rc.cpp:648 +#, fuzzy msgid "" "If enabled, winks you send or receive will be displayed in the chat window. " "Please note that in order to use this feature, you need to have a working " "Flash-plugin installed." -msgstr "" +msgstr "有効にすると、チャットウィンドウに送信するまたは受信するウインクを表示します(Flash プラグインが必要です)。" #. i18n: file: settings/chatstylepage.ui:249 #. i18n: ectx: property (text), widget (QCheckBox, showWinksCheckBox_) @@ -6122,11 +6101,11 @@ msgstr "カスタムコマンド(&S):" #. i18n: file: settings/miscellaneouspage.ui:247 #. i18n: ectx: property (whatsThis), widget (QLineEdit, customMailClientEdit_) #: rc.cpp:842 rc.cpp:877 -#, no-c-format +#, fuzzy, no-c-format msgid "" "Specify the path of a program to use to open links; a '%u' here will be " "replaced with the links' URL." -msgstr "" +msgstr "ハイパーリンクを開くプログラムを指定できます。URL は '%u' として置き換えます。" #. i18n: file: settings/miscellaneouspage.ui:126 #. i18n: ectx: property (text), widget (QLabel, customBrowserInfo_) @@ -6161,8 +6140,7 @@ msgstr "アカウントがサポートしたら、Live Mailを使う(&L)" #. i18n: ectx: property (toolTip), widget (QRadioButton, useKDEMailClientRadio_) #: rc.cpp:858 msgid "Choose this option to use the email client used by the rest of KDE." -msgstr "" -"このオプションを選択して、KDE で使っているメールクライアントを使います。" +msgstr "このオプションを選択して、KDE で使っているメールクライアントを使います。" #. i18n: file: settings/miscellaneouspage.ui:170 #. i18n: ectx: property (text), widget (QRadioButton, useKDEMailClientRadio_) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f8a6da4..f147dc7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,6 +30,7 @@ SET(kmess_SOURCES dialogs/awaymessagedialog.cpp dialogs/chathistorydialog.cpp dialogs/contactaddeduserdialog.cpp + dialogs/contactaddeduserwidget.cpp dialogs/contactentry.cpp dialogs/contactpropertiesdialog.cpp dialogs/invitedialog.cpp @@ -101,6 +102,7 @@ SET(kmess_SOURCES utils/xautolock.cpp utils/xmlfunctions.cpp utils/gradientelidelabel.cpp + utils/faderwidget.cpp account.cpp accountaction.cpp accountsmanager.cpp @@ -128,7 +130,7 @@ SET(kmess_UI_FILES dialogs/addemoticondialog.ui dialogs/awaymessagedialog.ui dialogs/chathistorydialog.ui - dialogs/contactaddeduserdialog.ui + dialogs/contactaddeduserwidget.ui dialogs/transferentry.ui dialogs/transferwindow.ui dialogs/contactentry.ui diff --git a/src/chat/chatview.cpp b/src/chat/chatview.cpp index 817d8c4..fe196c8 100644 --- a/src/chat/chatview.cpp +++ b/src/chat/chatview.cpp @@ -970,7 +970,7 @@ void ChatView::slotShowContextMenu( const QString &clickedUrl, const QPoint &poi } else { - urlAction = new KAction( KIcon( "launch" ), i18n("Visit &Link"), this ); + urlAction = new KAction( KIcon( "document-open-remote" ), i18n("Visit &Link"), this ); connect( urlAction, SIGNAL(triggered(bool)), this, SLOT(slotVisitAddress()) ); contextMenu->addAction( urlAction ); diff --git a/src/dialogs/contactaddeduserdialog.cpp b/src/dialogs/contactaddeduserdialog.cpp index 4a3451f..ce3d769 100644 --- a/src/dialogs/contactaddeduserdialog.cpp +++ b/src/dialogs/contactaddeduserdialog.cpp @@ -1,9 +1,11 @@ /*************************************************************************** - contactaddeduserdialog.cpp - description + contactaddeduserdialog.cpp ------------------- begin : Sun Apr 14 2002 copyright : (C) 2002 by Mike K. Bennett email : mkb137b@hotmail.com + copyright : (C) 2010 by Timo Tambet + email : ttambet@gmail.com ***************************************************************************/ /*************************************************************************** @@ -16,11 +18,8 @@ ***************************************************************************/ #include "contactaddeduserdialog.h" -#include "../contact/contact.h" -#include "../model/contactlist.h" -#include "../contact/group.h" -#include "../currentaccount.h" -#include "../kmessdebug.h" +#include "contactaddeduserwidget.h" + #include "../utils/kmessconfig.h" @@ -28,73 +27,38 @@ /** * Constructor * - * The dialog is instantly shown as modal when the class is instantiated. + * This KDialog creates a QTabWidget which holds ContactAddedUserWidget instances. New + * instances can be added by calling addTab(). * * @param contactHandle Reference to the handle of the contact that has added you * @param contactFriendlyName The friendly name of the contact */ -ContactAddedUserDialog::ContactAddedUserDialog( const QString &contactHandle, const QString &contactFriendlyName ) - : KDialog() - , Ui::ContactAddedUserDialog() - , contactHandle_( contactHandle ) +ContactAddedUserDialog::ContactAddedUserDialog( const QString& contactHandle, const QString& contactFriendlyName, QWidget* parent ) + : KDialog(parent) { - // Load the ui file in a main qwidget + tabWidget_ = new QTabWidget( this ); + setMainWidget( tabWidget_ ); setObjectName( "ContactAddedUser" ); - QWidget *mainWidget = new QWidget( this ); - setupUi( mainWidget ); - - setMainWidget( mainWidget ); // Let the dialog destroy itself when it's done setAttribute( Qt::WA_DeleteOnClose ); - //adjust or restore saved size adjustSize(); - restoreDialogSize( KMessConfig::instance()->getGlobalConfig( "ContactAddedUserDialog" ) ); + setButtons(KDialog::Close); + restoreDialogSize( KMessConfig::instance()->getGlobalConfig( "ContactAddedUserDialog" )); - // Update the window properties - setCaption( i18n( "You have been added by someone" ) ); + // Update the window properties + setWindowTitle( i18n( "You have been added by someone" )); + tabWidget_->setTabsClosable(true); - // Set up the label - if( contactHandle == contactFriendlyName ) - { - messageLabel_->setText( i18n( "%1\nhas added you to his or her contact list." - , contactHandle ) ); - } - else - { - messageLabel_->setText( i18n( "%1 (%2)\nhas added you to his or her contact list." - , contactFriendlyName - , contactHandle ) ); - } + addTab( contactHandle, contactFriendlyName ); - // if they're already a friend, ie in the contact list, don't allow the "add" option to - // be selected. only options should be to allow or block. - Contact *c = CurrentAccount::instance()->getContactList()->getContactByHandle( contactHandle ); - if ( c && c->isFriend() ) - { - addContactOption_->setEnabled( false ); - } - - // Fill up the groups list from the contactlist data - QList groupList( CurrentAccount::instance()->getContactList()->getGroupList() ); - QListWidgetItem *item; - - foreach( const Group *group, groupList ) - { - if( ! group->isSpecialGroup() ) - { - item = new QListWidgetItem( group->getName(), groupList_ ); - - // Set the groupId in the item's data, to retrieve it later - item->setData( Qt::UserRole, group->getId() ); - item->setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsEnabled ); - item->setCheckState( Qt::Unchecked ); - } - } + connect( tabWidget_, SIGNAL( tabCloseRequested(int) ), + this, SLOT( slotCloseTab(int) ) ); } + /** * @brief Destructor * @@ -108,56 +72,65 @@ ContactAddedUserDialog::~ContactAddedUserDialog() /** -* @brief Called when the user pressed the "ok" button -* +* @brief Called when a new contact request is received */ -void ContactAddedUserDialog::accept() +void ContactAddedUserDialog::addTab( const QString& contactHandle, const QString& contactFriendlyName ) { - QStringList groupIds; + ContactAddedUserWidget *widget = new ContactAddedUserWidget( contactHandle, contactFriendlyName ); - if( addContactOption_->isChecked() ) - { - // Find all checked items in the list - QListWidgetItem *item; - for( int i = 0; i < groupList_->count(); i++ ) - { - item = groupList_->item( i ); - if( item->checkState() == Qt::Checked ) - { - // Retrieve the group id from the item's data - groupIds.append( item->data( Qt::UserRole ).toString() ); - } - } + connect( widget, SIGNAL( userChoice(QString,QStringList,int) ), + this, SIGNAL( userChoice(QString,QStringList,int) ) ); - emit userChoice( contactHandle_, groupIds, ADD ); - } - else if( allowContactOption_->isChecked() ) + if ( contactFriendlyName != contactHandle ) { - emit userChoice( contactHandle_, groupIds, ALLOW ); + tabWidget_->addTab( widget, contactFriendlyName ); } else { - emit userChoice( contactHandle_, groupIds, BLOCK ); + tabWidget_->addTab( widget, contactHandle ); } - // Call parent - KDialog::accept(); + connect( widget, SIGNAL( destroyed(QObject*) ), + this, SLOT ( slotTabDeleted() ) ); } /** -* @brief Called when the user pressed the "cancel" button -* -*/ -void ContactAddedUserDialog::reject() + * @brief Called when the user wants to ignore a request. + * + * Close the tab as if the user clicked "ignore the request" and confirmed. + */ +void ContactAddedUserDialog::slotCloseTab( int index ) { - // No choice for the moment, the question will be asked the next time + ContactAddedUserWidget* widget = static_cast( tabWidget_->widget( index ) ); + if( ! widget ) + { + return; + } - // Call parent - KDialog::reject(); + widget->reject(); } -#include "contactaddeduserdialog.moc" + +/** + * @brief Slot to destroy the window when all tabs are gone. + * + * When a tab gets destroyed - for whatever reason - check if + * any tabs are left. If none, the window has to be closed. + */ +void ContactAddedUserDialog::slotTabDeleted() +{ + // When the destroyed() signal is sent out for a tab, it's not yet gone + // from the tab widget; so it still counts the tab, and we have to fix + // the count ourselves + int count = tabWidget_->count() - 1; + + if( count <= 0 ) + { + deleteLater(); + } +} + diff --git a/src/dialogs/contactaddeduserdialog.h b/src/dialogs/contactaddeduserdialog.h index 6daa8e4..3dfe922 100644 --- a/src/dialogs/contactaddeduserdialog.h +++ b/src/dialogs/contactaddeduserdialog.h @@ -18,51 +18,40 @@ #ifndef CONTACTADDEDUSERDIALOG_H #define CONTACTADDEDUSERDIALOG_H -#include "ui_contactaddeduserdialog.h" - #include +class QTabWidget; + /** * The dialog for when someone has added the user to his or her contact list. * - * @author Mike K. Bennett + * @author Mike K. Bennett, Timo Tambet * @ingroup Dialogs */ -class ContactAddedUserDialog : public KDialog, private Ui::ContactAddedUserDialog +class ContactAddedUserDialog : public KDialog { Q_OBJECT - public: - // Return types for the dialog - enum ReturnCode - { - ADD = 0 - , ALLOW = 1 - , BLOCK = 2 - }; - public: // The constructor - ContactAddedUserDialog( const QString &contactHandle, const QString &contactFriendlyName ); + ContactAddedUserDialog( const QString& contactHandle, const QString& contactFriendlyName, QWidget *parent = 0 ); // The destructor virtual ~ContactAddedUserDialog(); + void addTab( const QString& contactHandle, const QString& contactFriendlyName ); - public slots: // Protected slots - // The user pressed the "ok" button - virtual void accept(); - // The user pressed the "cancel" button - virtual void reject(); - - private: // Private properties - // The handle of the contact who has added the user - QString contactHandle_; + private slots: + void slotCloseTab( int index ); + void slotTabDeleted(); signals: - // Notify of the choice made by the user - void userChoice( const QString &handle, const QStringList &groupsId, const int code ); + void userChoice( const QString &handle, const QStringList &groupIds, const int code ); + private: + QTabWidget *tabWidget_; }; + + #endif diff --git a/src/dialogs/contactaddeduserwidget.cpp b/src/dialogs/contactaddeduserwidget.cpp new file mode 100644 index 0000000..98bd6a4 --- /dev/null +++ b/src/dialogs/contactaddeduserwidget.cpp @@ -0,0 +1,154 @@ +/*************************************************************************** + contactaddeduserwidget.cpp - QWidget class with + QTabWidget + ------------------- + begin : Friday Sept 24 2010 + copyright : (C) 2010 by Timo Tambet + email : ttambet@gmail.com + copyright : (C) 2002 by Mike K. Bennett + email : mkb137b@hotmail.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "contactaddeduserwidget.h" +#include "../contact/contact.h" +#include "../model/contactlist.h" +#include "../contact/group.h" +#include "../currentaccount.h" +#include "../kmessdebug.h" +#include "../utils/kmessconfig.h" +#include + + + +/** + * Constructor + * + * This contains all the widgets for selecting what action to perform when a user adds you + * to their contact list. Multiple instances of this widget are added to the QTabWidget in + * ContactAddedUserDialog. + * + * @param contactHandle Reference to the handle of the contact that has added you + * @param contactFriendlyName The friendly name of the contact + */ +ContactAddedUserWidget::ContactAddedUserWidget( const QString& contactHandle, const QString& contactFriendlyName ) + : QWidget() + , Ui::ContactAddedUserWidget() + , contactHandle_( contactHandle ) +{ + setupUi( this ); + + buttonbox->addButton( KStandardGuiItem::ok(), QDialogButtonBox::AcceptRole, this, SLOT( accept())); + buttonbox->addButton( KStandardGuiItem::discard(), QDialogButtonBox::RejectRole, this, SLOT( reject())); + + if( contactHandle == contactFriendlyName ) + { + messageLabel_->setText( i18n( "%1\nhas added you to his or her contact list." + , contactHandle ) ); + } + else + { + messageLabel_->setText( i18n( "%1 (%2)\nhas added you to his or her contact list." + , contactFriendlyName + , contactHandle ) ); + } + + // if they're already a friend, ie in the contact list, don't allow the "add" option to + // be selected. only options should be to allow or block. + Contact *c = CurrentAccount::instance()->getContactList()->getContactByHandle( contactHandle ); + if ( c && c->isFriend() ) + { + addContactOption_->setEnabled( false ); + } + + // Fill up the groups list from the contactlist data + QList groupList( CurrentAccount::instance()->getContactList()->getGroupList() ); + QListWidgetItem *item; + + foreach( const Group *group, groupList ) + { + if( ! group->isSpecialGroup() ) + { + item = new QListWidgetItem( group->getName(), groupList_ ); + + // Set the groupId in the item's data, to retrieve it later + item->setData( Qt::UserRole, group->getId() ); + item->setFlags( Qt::ItemIsUserCheckable | Qt::ItemIsEnabled ); + item->setCheckState( Qt::Unchecked ); + } + } +} + + + +/** +* @brief Destructor +* +*/ +ContactAddedUserWidget::~ContactAddedUserWidget() +{ +} + + + +/** +* @brief Called when the user pressed the "ok" button +* +*/ +void ContactAddedUserWidget::accept() +{ + QStringList groupIds; + if( addContactOption_->isChecked() ) + { + // Find all checked items in the list + QListWidgetItem *item; + for( int i = 0; i < groupList_->count(); i++ ) + { + item = groupList_->item( i ); + if( item->checkState() == Qt::Checked ) + { + // Retrieve the group id from the item's data + groupIds.append( item->data( Qt::UserRole ).toString() ); + } + } + emit userChoice( contactHandle_, groupIds, ADD ); + } + else if( allowContactOption_->isChecked() ) + { + emit userChoice( contactHandle_, groupIds, ALLOW ); + } + else if ( blockContactOption_->isChecked() ) + { + emit userChoice( contactHandle_, groupIds, BLOCK ); + } + + // The widget is not necessary anymore, delete it + deleteLater(); +} + + + +/** +* @brief Called when the user pressed the "cancel" button +* +*/ +void ContactAddedUserWidget::reject() +{ + // Communicate the user choice + emit userChoice( contactHandle_, QStringList(), IGNORE ); + + // The widget is not necessary anymore, delete it + deleteLater(); +} + + + +#include "contactaddeduserwidget.moc" diff --git a/src/dialogs/contactaddeduserwidget.h b/src/dialogs/contactaddeduserwidget.h new file mode 100644 index 0000000..9b3a386 --- /dev/null +++ b/src/dialogs/contactaddeduserwidget.h @@ -0,0 +1,69 @@ +/*************************************************************************** + contactaddeduserwidget.h - + ------------------- + begin : Friday Sept 24 2010 + copyright : (C) 2010 by Timo Tambet + email : ttambet@gmail.com + copyright : (C) 2002 - ... by Mike K. Bennett + email : mkb137b@hotmail.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef CONTACTADDEDUSERWIDGET_H +#define CONTACTADDEDUSERWIDGET_H + +#include "ui_contactaddeduserwidget.h" + + + +/** + * The dialog for when someone has added the user to his or her contact list. + * + * @author Timo Tambet, Mike K. Bennett + * @ingroup Dialogs + */ +class ContactAddedUserWidget : public QWidget, private Ui::ContactAddedUserWidget +{ + Q_OBJECT + + public: + // Return types for the dialog + enum ReturnCode + { + ADD = 0 + , ALLOW = 1 + , BLOCK = 2 + , IGNORE = 3 + }; + + public: + // The constructor + ContactAddedUserWidget( const QString& contactHandle, const QString& contactFriendlyName ); + // The destructor + virtual ~ContactAddedUserWidget(); + + public slots: // Protected slots + // The user pressed the "ok" button + void accept(); + // The user pressed the "cancel" button + void reject(); + + private: // Private properties + // The handle of the contact who has added the user + QString contactHandle_; + signals: + // Notify of the choice made by the user + void userChoice( const QString &handle, const QStringList &groupsId, const int code ); +}; + + + +#endif diff --git a/src/dialogs/contactaddeduserdialog.ui b/src/dialogs/contactaddeduserwidget.ui similarity index 86% rename from src/dialogs/contactaddeduserdialog.ui rename to src/dialogs/contactaddeduserwidget.ui index c8d001a..dcaedba 100644 --- a/src/dialogs/contactaddeduserdialog.ui +++ b/src/dialogs/contactaddeduserwidget.ui @@ -1,13 +1,13 @@ - ContactAddedUserDialog - + ContactAddedUserWidget + 0 0 - 417 - 363 + 472 + 389 @@ -23,7 +23,7 @@ - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + Qt::AlignHCenter|Qt::AlignTop false @@ -111,7 +111,7 @@ - &Do not add this person, but allow him or her to see your status + &Do not add this person, but allow him or her to see your status @@ -141,10 +141,24 @@ + + + + QDialogButtonBox::NoButton + + + qPixmapFromMimeSource + + + KDialogButtonBox + QDialogButtonBox +
kdialogbuttonbox.h
+
+
diff --git a/src/kmess.cpp b/src/kmess.cpp index 45a207d..98e82c2 100644 --- a/src/kmess.cpp +++ b/src/kmess.cpp @@ -31,6 +31,7 @@ #include "dialogs/awaymessagedialog.h" #include "dialogs/chathistorydialog.h" #include "dialogs/contactaddeduserdialog.h" +#include "dialogs/contactaddeduserwidget.h" #include "dialogs/listexportdialog.h" #include "dialogs/transferwindow.h" #include "model/contactlist.h" @@ -48,6 +49,7 @@ #include "utils/kmessshared.h" #include "utils/nowlisteningclient.h" #include "utils/richtextparser.h" +#include "utils/faderwidget.h" #include "account.h" #include "accountsmanager.h" #include "accountaction.h" @@ -88,6 +90,7 @@ KMess::KMess( QWidget *parent ) contactStatusNotification_(0), newEmailNotification_(0), addressBookNotifications_(0), + contactAddedUserDialog_(0), idleTimer_(0), initialized_(false), initialView_(0), @@ -538,12 +541,19 @@ void KMess::showContactAddedUserDialog( const QString handle ) #endif // Show a dialog and let the user choose whether to add, allow, or block the contact. - ContactAddedUserDialog *dialog = new ContactAddedUserDialog( handle , handle ); + if ( !contactAddedUserDialog_ ) + { + contactAddedUserDialog_ = new ContactAddedUserDialog( handle , handle ); + } + else + { + contactAddedUserDialog_->addTab( handle, handle ); + } - connect( dialog, SIGNAL( userChoice(const QString&,const QStringList&,const int) ), - this, SLOT ( slotContactAddedUserDialogChoice(const QString&,const QStringList&,const int) ) ); + connect( contactAddedUserDialog_, SIGNAL( userChoice( const QString&, const QStringList&, const int)), + this, SLOT( slotContactAddedUserDialogChoice( const QString&, const QStringList&, const int ))); - dialog->show(); + contactAddedUserDialog_->show(); } @@ -1042,22 +1052,27 @@ void KMess::slotContactAddedUserDialogChoice( const QString &handle, const QStri << "Group list:" << groupIds; #endif - switch( (ContactAddedUserDialog::ReturnCode) code ) + switch( (ContactAddedUserWidget::ReturnCode) code ) { - case ContactAddedUserDialog::ADD: + case ContactAddedUserWidget::ADD: // Add the contact to the allowed and friends lists msnNotificationConnection_->addNewContact( handle, groupIds ); break; - case ContactAddedUserDialog::ALLOW: + case ContactAddedUserWidget::ALLOW: // Add the contact to the allowed list msnNotificationConnection_->allowContact( handle ); break; - case ContactAddedUserDialog::BLOCK: + case ContactAddedUserWidget::BLOCK: // Add the contact to the blocked list. msnNotificationConnection_->blockContact( handle ); break; + + case ContactAddedUserWidget::IGNORE: + default: + // Action ignored + break; } } @@ -1352,7 +1367,7 @@ bool KMess::initChatMaster() connect( chatMaster_, SIGNAL( unblockContact(QString) ), msnNotificationConnection_, SLOT ( unblockContact(QString) ) ); connect( chatMaster_, SIGNAL( addContact(QString) ), - msnNotificationConnection_, SLOT ( addNewContact(QString) ) ); + msnNotificationConnection_, SLOT ( addNewContact(QString, const QStringList) ) ); connect( chatMaster_, SIGNAL( removeContact(QString,bool) ), msnNotificationConnection_, SLOT ( removeContact(QString,bool) ) ); connect( chatMaster_, SIGNAL( allowContact(QString) ), @@ -1880,11 +1895,6 @@ void KMess::switchViewToContactList() view_->deleteLater(); view_ = 0; } - if( initialView_ ) - { - initialView_->deleteLater(); - initialView_ = 0; - } #ifdef KMESSTEST KMESS_ASSERT( msnNotificationConnection_ != 0 ); @@ -1934,6 +1944,22 @@ void KMess::switchViewToContactList() // Set it as the application's main widget setCentralWidget( view_ ); + + bool nofade = KMessConfig::instance()->getGlobalConfig( "MainWindow" ).readEntry( "NoFadeEffect", false ); + + if ( ! nofade ) + { + FaderWidget *fader = new FaderWidget( initialView_, view_ ); + fader->setDuration( 1000 ); + fader->resize( initialView_->size() ); + fader->start(); + } + + if( initialView_ ) + { + initialView_->deleteLater(); + initialView_ = 0; + } } diff --git a/src/kmess.h b/src/kmess.h index 45eef38..a2103f4 100644 --- a/src/kmess.h +++ b/src/kmess.h @@ -23,10 +23,10 @@ #include #include +#include #include - // Forward declarations class Account; class AccountAction; @@ -49,6 +49,7 @@ class KMessView; class MsnNotificationConnection; class NowListeningClient; class QItemSelection; +class ContactAddedUserDialog; @@ -228,6 +229,8 @@ class KMess : public KMessInterface NewEmailNotification *newEmailNotification_; // The notification object for when a new contact added AddressBookNotifications *addressBookNotifications_; + // Contact added user dialog object + QPointer contactAddedUserDialog_; // A pointer to the instance of the current account CurrentAccount *currentAccount_; // The idle timer @@ -246,7 +249,6 @@ class KMess : public KMessInterface KMessView *view_; // The DBus class KMessDBus *dbus_; - }; #endif diff --git a/src/kmessdebug.h b/src/kmessdebug.h index a0b7813..77507ac 100644 --- a/src/kmessdebug.h +++ b/src/kmessdebug.h @@ -63,8 +63,8 @@ #define KMESSDEBUG_CONTACTBASE #define KMESSDEBUG_CONTACTEXTENSION #define KMESSDEBUG_CONTACTLIST -// #define KMESSDEBUG_CONTACTLISTMODELTEST -// #define KMESSDEBUG_CONTACTLISTMODEL + #define KMESSDEBUG_CONTACTLISTMODELTEST + #define KMESSDEBUG_CONTACTLISTMODEL #define KMESSDEBUG_GROUP diff --git a/src/kmesstest.cpp b/src/kmesstest.cpp index fc030a7..a25ce0f 100644 --- a/src/kmesstest.cpp +++ b/src/kmesstest.cpp @@ -32,6 +32,7 @@ #include "contact/specialgroups.h" #include "dialogs/addcontactdialog.h" #include "dialogs/chathistorydialog.h" +#include "dialogs/contactaddeduserwidget.h" #include "dialogs/contactaddeduserdialog.h" #include "dialogs/transferentry.h" #include "dialogs/transferwindow.h" @@ -377,8 +378,10 @@ void KMessTest::testContactAddedUserDialog() testGroupsAndContacts(); ContactAddedUserDialog *dialog = new ContactAddedUserDialog( "someone@hotmail.com", "SomeNickName" ); + + dialog->addTab( "someone1@hotmail.com", "SomeNickName1" ); - connect( dialog, SIGNAL( userChoice(const QString&, const QStringList&, const int) ), + connect( dialog, SIGNAL( userChoice(const QString&, const QStringList&, const int) ), this, SLOT ( testContactAddedUserDialogSlot(const QString&, const QStringList&, const int) ) ); dialog->show(); @@ -387,21 +390,25 @@ void KMessTest::testContactAddedUserDialog() void KMessTest::testContactAddedUserDialogSlot( const QString &handle, const QStringList &groupsId, const int code ) { - switch( (ContactAddedUserDialog::ReturnCode) code ) + switch( (ContactAddedUserWidget::ReturnCode) code ) { - case ContactAddedUserDialog::ADD: + case ContactAddedUserWidget::ADD: kmDebug() << "result: Add contact" << handle; kmDebug() << "result: Adding in groups" << groupsId; break; - case ContactAddedUserDialog::ALLOW: + case ContactAddedUserWidget::ALLOW: kmDebug() << "result: Allow contact" << handle; break; - case ContactAddedUserDialog::BLOCK: + case ContactAddedUserWidget::BLOCK: kmDebug() << "result: Block contact" << handle; break; + case ContactAddedUserWidget::IGNORE: + kmDebug() << "result: Ignore request of contact" << handle; + break; + default: kmDebug() << "result: undefined, contact:" << handle; break; diff --git a/src/kmessview.cpp b/src/kmessview.cpp index 09415fa..c04b060 100644 --- a/src/kmessview.cpp +++ b/src/kmessview.cpp @@ -1452,7 +1452,15 @@ void KMessView::slotItemClicked( const QModelIndex &index, const bool accidental return; } - contactListView_->setExpanded( index, ! itemData[ "isExpanded" ].toBool() ); + // Keep the group expansion state volatile while filtering (don't save it) + if( ! viewModel_->filterRegExp().isEmpty() ) + { + contactListView_->setExpanded( index, ! contactListView_->isExpanded( index ) ); + } + else + { + contactListView_->setExpanded( index, ! itemData[ "isExpanded" ].toBool() ); + } break; @@ -1949,6 +1957,10 @@ void KMessView::slotSearchContact( const QString& searchFor ) searchEdit_->setStyleSheet( "" ); } + // True if the user was filtering for something and wanted to filter for something else; + // used to maintain the group expansion states while refining the search terms + bool isFilteringAgain = ( ! searchExpression.isEmpty() && ! viewModel_->filterRegExp().isEmpty() ); + viewModel_->setFilterRegExp( searchExpression ); // Show or hide groups which do or do not contain results @@ -1985,7 +1997,11 @@ void KMessView::slotSearchContact( const QString& searchFor ) bool isHidden = ( ! viewModel_->hasChildren( index ) ); contactListView_->setRowHidden( row, QModelIndex(), isHidden ); - contactListView_->setExpanded( index, true ); + + if( ! isFilteringAgain ) + { + contactListView_->setExpanded( index, true ); + } } // When the search terms are removed, enable back all groups else diff --git a/src/main.cpp b/src/main.cpp index 619d2f0..d98ee2b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) aboutData.addCredit( ki18n("Anastasios Bourazanis"), ki18n("Emoticon preview in settings page,clickable contact properties dialog text"), "a.brzns" "@" "gmail" "." "com"); aboutData.addCredit( ki18n("Marco Mentasti"), ki18n("Internationalization fixes, drag'n'drop of images into display pictures"), "marcomentasti" "@" "gmail" "." "com" ); aboutData.addCredit( ki18n("Francesco Nwokeka"), ki18n("Now Listening toggle button above the contact list."), "" ); - aboutData.addCredit( ki18n("Timo Tambet"), ki18n("Contact Changed and Group Changed notifications"), "ttambet" "@" "gmail" "." "com" ); + aboutData.addCredit( ki18n("Timo Tambet"), ki18n("Contact Changed and Group Changed notifications, contact added user dialog tabbing"), "ttambet" "@" "gmail" "." "com" ); // Other apps aboutData.addCredit( ki18n("KMerlin (kmerlin.olsd.de)"), ki18n("Inspiration and assorted code")); diff --git a/src/model/contactlistmodelfilter.cpp b/src/model/contactlistmodelfilter.cpp index feafa87..b9f402c 100644 --- a/src/model/contactlistmodelfilter.cpp +++ b/src/model/contactlistmodelfilter.cpp @@ -173,6 +173,16 @@ bool ContactListModelFilter::filterAcceptsRow( int sourceRow, const QModelIndex& return false; } + // Manage contact searches: the list view sets the filter expression, and we use it here; + // however only contacts within their original group are shown + if( ! filterRegExp().isEmpty() ) + { + isVisible = ( itemData[ "group" ] != SpecialGroups::ONLINE + && itemData[ "group" ] != SpecialGroups::OFFLINE ); + isVisible = isVisible && ( QSortFilterProxyModel::filterAcceptsRow( sourceRow, sourceParent ) ); + break; + } + Status contactStatus = (Status) itemData[ "status" ].toInt(); // Contacts in special groups are always visible. Their group may be not, though. @@ -212,13 +222,6 @@ bool ContactListModelFilter::filterAcceptsRow( int sourceRow, const QModelIndex& break; } } - - // Manage contact searches: the list view sets the filter expression, and we use it here - if( isVisible && ! filterRegExp().isEmpty() ) - { - isVisible = ( QSortFilterProxyModel::filterAcceptsRow( sourceRow, sourceParent ) ); - break; - } } break; diff --git a/src/network/mimemessage.cpp b/src/network/mimemessage.cpp index 12f9d88..936b21f 100644 --- a/src/network/mimemessage.cpp +++ b/src/network/mimemessage.cpp @@ -596,6 +596,11 @@ void MimeMessage::setBinaryBody(const QByteArray &data) // Split a line between field and value void MimeMessage::splitLine(QString& field, QString& value, const QString& line) const { + if ( line.isEmpty() ) + { + return; + } + int index; index = line.indexOf(":"); if ( index >= 0 ) @@ -628,6 +633,9 @@ void MimeMessage::splitHead(QStringList& stringList, const QString& head) const stringList = head.split("\n"); for( int i = 0; i < stringList.count(); i++ ) { + // special case for email headers (apparently?) + if ( stringList[i].startsWith( "\t" ) ) continue; + stringList[i] = stringList[i].trimmed(); } } diff --git a/src/network/msnnotificationconnection.cpp b/src/network/msnnotificationconnection.cpp index a446e79..fc8c6c1 100644 --- a/src/network/msnnotificationconnection.cpp +++ b/src/network/msnnotificationconnection.cpp @@ -1029,16 +1029,12 @@ void MsnNotificationConnection::goOnline() hash.insert( QString::number(ack), "INBOX" ); // Ask for compose URL - ack = sendCommand("URL", "COMPOSE"); + ack = sendCommand("URL", "COMPOSE some.invalid@kmess.email" ); hash.insert( QString::number(ack), "COMPOSE" ); // Ask the personal profile URL - ack = sendCommand("URL", "PROFILE"); + ack = sendCommand("URL", "PROFILE 0x" + QString::number( CurrentAccount::instance()->getLanguageCode().toInt(), 8 ) ); hash.insert( QString::number(ack), "PROFILE" ); - - // Ask the URL for change account info - ack = sendCommand("URL", "PERSON"); - hash.insert( QString::number(ack), "PERSON" ); } // Notify observers that the server is connected diff --git a/src/network/soap/addressbookservice.cpp b/src/network/soap/addressbookservice.cpp index 71ad52a..d7f85c5 100644 --- a/src/network/soap/addressbookservice.cpp +++ b/src/network/soap/addressbookservice.cpp @@ -579,6 +579,9 @@ void AddressBookService::parseAddressBook( const QDomElement &body ) QString information; QStringList guidList; + QString cid; + int blp = 0; + for( int index = 0; index < contactsNode.count(); index++ ) { const QDomNode contact( contactsNode.item( index ) ); @@ -591,11 +594,10 @@ void AddressBookService::parseAddressBook( const QDomElement &body ) // Check if the contact type is Me: it has the information about personal profile if( contactType == "Me" ) { - const QString cid( XmlFunctions::getNodeValue( contactInfo, "CID" ) ); + cid = XmlFunctions::getNodeValue( contactInfo, "CID" ); // Search for "...MSN.IM.BLPVALUE.." const QDomNodeList annotations( contactInfo.toElement().elementsByTagName( "Annotation" ) ); - int blp = 0; // = 0 fixes compile time warning for( int index2 = 0; index2 < annotations.count(); index2++ ) { const QDomNode annotation( annotations.at( index2 ) ); @@ -608,7 +610,6 @@ void AddressBookService::parseAddressBook( const QDomElement &body ) } } - emit gotPersonalInformation( cid, blp ); continue; } @@ -687,6 +688,11 @@ void AddressBookService::parseAddressBook( const QDomElement &body ) // Signal that the of address book has been parsed emit gotAddressBookList( contacts ); + + // adam (16 Jan 11) - shifted the signal emit for this + // to after the address book is parsed. This prevents SOAP timeouts + // with Roaming Service requests for large contact lists. + emit gotPersonalInformation( cid, blp ); } diff --git a/src/network/soap/roamingservice.cpp b/src/network/soap/roamingservice.cpp index f1eb803..48e0fb3 100644 --- a/src/network/soap/roamingservice.cpp +++ b/src/network/soap/roamingservice.cpp @@ -351,9 +351,29 @@ void RoamingService::processProfileResult( const QDomElement &body ) const QDomNode expressionProfile( XmlFunctions::getNode( body, "GetProfileResponse/GetProfileResult/ExpressionProfile" ) ); - QString fullPictureUrl( XmlFunctions::getNodeValue( expressionProfile, "StaticUserTilePublicURL" ) ); - QString pictureLastModified( XmlFunctions::getNodeValue( expressionProfile, "Photo/DateModified" ) ); - QString pictureName( XmlFunctions::getNodeValue( expressionProfile, "Photo/Name" ) ); + // adam (23 Dec 10): if this node is missing, something is fubar with the profile. + // solution is to create a new one. + if ( expressionProfile.isNull() ) + { + createProfile(); + return; + } + + const QDomNodeList streams( XmlFunctions::getNode( expressionProfile, "Photo" ).toElement().elementsByTagName( "DocumentStream" ) ); + QString fullPictureUrl; + QString remotePictureHash; + for( int i = 0; i < streams.count(); i++ ) + { + const QDomNode node( streams.at(i) ); + QString name( XmlFunctions::getNodeValue( node, "DocumentStreamName" ) ); + if ( name == "UserTileStatic" ) + { + fullPictureUrl = XmlFunctions::getNodeValue( node, "PreAuthURL" ); + break; + } + } + + QString pictureLastModified( XmlFunctions::getNodeValue( expressionProfile, "DateModified" ) ); // This message also contains DisplayName profileResourceId_ = XmlFunctions::getNodeValue( expressionProfile, "ResourceID" ); @@ -394,20 +414,6 @@ void RoamingService::processProfileResult( const QDomElement &body ) return; } - // check if we don't have a picture with the same name (the msn server converts the image to jpeg and compresses it when storing, - // so the hash changes and kmess can't see that the image is actually the same as one he uploaded earlier) - const QString pictureDir( KMessConfig::instance()->getAccountDirectory( currentAccount->getHandle() ) + "/displaypics/" ); - const QString localPicture( pictureDir + pictureName + ".png" ); // accountpage always saves the images in png format - if( QFile::exists( localPicture ) ) - { -#ifdef KMESSDEBUG_ROAMINGSERVICE - kmDebug() << "Have a local picture with the same name (" << localPicture << "), not downloading display picture"; -#endif - lastKnownDisplayPicturePath_ = localPicture; - currentAccount->setPicturePath( localPicture ); - return; - } - // Check if the picture on the server is newer const QString displayPicturePath( currentAccount->getPicturePath( false /* don't fallback to the kmess default pic */ ) ); QFileInfo info( displayPicturePath ); diff --git a/src/utils/faderwidget.cpp b/src/utils/faderwidget.cpp new file mode 100644 index 0000000..d4861b6 --- /dev/null +++ b/src/utils/faderwidget.cpp @@ -0,0 +1,128 @@ +/*************************************************************************** + faderwidget.h - smoothly fades one widget to reveal a second + based on the Qt "Fade-Effects" demo; updated to use a + QWidget source. + + ------------------- + begin : Wednesday 05 Jan 2011 + copyright : (C) 2011 by Adam Goossens + email : adam.goossens@gmail.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include +#include +#include + +#include "../kmessdebug.h" +#include "faderwidget.h" + + +/** + * Construct a new FaderWidget. + * + * \arg begin is the source widget. A pixmap will be grabbed from this widget and will be + * used as the fading source. + * + * \arg parent must be a valid QWidget and should be the widget you are fading out to. + * + * @param begin Source widget which will "fade out" + * @param parent Widget which is being revealed. + */ +FaderWidget::FaderWidget( QWidget *begin, QWidget *parent ) +: QWidget( parent ) +{ + timeline_ = new QTimeLine( 1000, this ); // 1sec fade by default + timeline_->setFrameRange( 1000, 0 ); + + connect( timeline_, SIGNAL( frameChanged( int ) ), + this, SLOT( update() ) ); + + KMESS_ASSERT( parent ); + KMESS_ASSERT( begin ); + + resize( parent->size() ); + + setAttribute( Qt::WA_DeleteOnClose ); + + pixmap_ = QPixmap::grabWidget( begin ); +} + + + +/** + * Change the duration of the fade. + * + * The default is 1000ms (1sec) + * @param milliseconds Fade duration + */ +void FaderWidget::setDuration( uint16_t milliseconds ) +{ + if ( timeline_->state() == QTimeLine::Running ) + { + kWarning() << "Cannot change duration whilst fade is running"; + return; + } + + timeline_->setDuration( milliseconds ); +} + + + +/** + * Start the fade effect. + * + * Calling this whilst the fade is already running has no effect. + */ +void FaderWidget::start() +{ + if ( timeline_->state() == QTimeLine::Running ) + { + kWarning() << "Fade is already running."; + return; + } + + timeline_->start(); + show(); +} + + + +/** + * Stop the fade effect. + * + * Calling this whilst already stopped has no effect. + */ +void FaderWidget::stop() +{ + timeline_->stop(); +} + + + +/** + * Paint the grabbed pixmap with a given opacity over our parent widget. + */ +void FaderWidget::paintEvent( QPaintEvent * ) +{ + QPainter painter( this ); + qreal frame = timeline_->currentFrame(); + painter.setOpacity( frame / 1000 ); // 1000 frames possible + painter.drawPixmap( 0, 0, pixmap_ ); + + if ( frame <= 0 ) + { + close(); + } +} + +#include "faderwidget.moc" diff --git a/src/utils/faderwidget.h b/src/utils/faderwidget.h new file mode 100644 index 0000000..ceb252f --- /dev/null +++ b/src/utils/faderwidget.h @@ -0,0 +1,60 @@ +/*************************************************************************** + faderwidget.h - smoothly fades one widget to reveal a second + based on the Qt "Fade-Effects" demo; updated to use a + QWidget source. + + ------------------- + begin : Wednesday 05 Jan 2011 + copyright : (C) 2011 by Adam Goossens + email : adam.goossens@gmail.com + ***************************************************************************/ + +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef FADERWIDGET_H +#define FADERWIDGET_H + +#include + +#include +#include +#include + +class QPaintEvent; +class QTimeLine; + +/** + * A Fader Widget will fade out one widget to reveal another. + * + * It is (rather heavily) based on the Fade-Effects Qt demo, but updated to use + * a QWidget source rather than a solid colour. + * + * @author Adam Goossens (adam@kmess.org) + */ +class FaderWidget : public QWidget +{ + Q_OBJECT + + public: + FaderWidget( QWidget *begin, QWidget *parent = 0 ); + + void setDuration( uint16_t milliseconds ); + void start(); + void stop(); + + protected: + void paintEvent( QPaintEvent *event ); + + private: + QTimeLine *timeline_; + QPixmap pixmap_; +}; + +#endif diff --git a/src/utils/kmessshared.cpp b/src/utils/kmessshared.cpp index 1c8e29e..b508b59 100644 --- a/src/utils/kmessshared.cpp +++ b/src/utils/kmessshared.cpp @@ -139,13 +139,11 @@ QString KMessShared::createRequestFile( const QString &mailto, const QString &fo return QString(); } + // this will have our (urlencoded) dodgy email address we used to satisfy URL COMPOSE + // at the initial login. replace it where we actually want it to go. QString command( folder ); - - // Check if the user wants to send an email - if( ! mailto.isEmpty() ) - { - command += "?mailto=1&to=" + mailto; - } + + command = command.replace( "some.invalid%40kmess.email", mailto ); // Use the method into passport to compute the token QString token( PassportLoginService::createHotmailToken( currentAccount->getToken( "Passport" ),