diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 460c52653ab0dcca6f19a4f492ed2c5e4e963ab0 (patch) | |
tree | 67208f7c145782a7e90b123b982ca78d88cc2c87 /kaddressbook/editors | |
download | tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.tar.gz tdepim-460c52653ab0dcca6f19a4f492ed2c5e4e963ab0.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/editors')
36 files changed, 2242 insertions, 0 deletions
diff --git a/kaddressbook/editors/Makefile.am b/kaddressbook/editors/Makefile.am new file mode 100644 index 000000000..e611bb5ea --- /dev/null +++ b/kaddressbook/editors/Makefile.am @@ -0,0 +1,32 @@ +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/kaddressbook/interfaces \ + -I$(top_srcdir)/kaddressbook \ + -I$(top_srcdir)/certmanager/lib \ + -I$(top_srcdir)/libkdenetwork \ + -I$(top_builddir)/kaddressbook/editors \ + $(GPGME_CFLAGS) \ + $(all_includes) + +kde_module_LTLIBRARIES = libkaddrbk_cryptosettings.la + +XXLIBS = $(top_builddir)/kaddressbook/interfaces/libkabinterfaces.la \ + $(top_builddir)/certmanager/lib/libkleopatra.la + +libkaddrbk_cryptosettings_la_SOURCES = cryptowidget.cpp +libkaddrbk_cryptosettings_la_LDFLAGS = -module $(KDE_PLUGIN) $(KDE_RPATH) $(all_libraries) # -no-undefined +libkaddrbk_cryptosettings_la_LIBADD = $(XXLIBS) + +noinst_HEADERS = cryptowidget.h imeditorwidget.h imaddresswidget.h + +METASOURCES = AUTO + +SUBDIRS = protocols icons +servicedir = $(kde_servicesdir)/kaddressbook +service_DATA = cryptosettings.desktop + +servicetypedir = $(kde_servicetypesdir) +servicetype_DATA = kaddressbookimprotocol.desktop + +noinst_LTLIBRARIES = libkabim.la +libkabim_la_SOURCES = imeditorwidget.cpp imeditorbase.ui imaddressbase.ui imaddresswidget.cpp +libkabim_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) -no-undefined +libkabim_la_LIBADD = $(top_builddir)/kaddressbook/interfaces/libkabinterfaces.la diff --git a/kaddressbook/editors/cryptosettings.desktop b/kaddressbook/editors/cryptosettings.desktop new file mode 100644 index 000000000..90ea108b7 --- /dev/null +++ b/kaddressbook/editors/cryptosettings.desktop @@ -0,0 +1,56 @@ +[Desktop Entry] +X-KDE-Library=libkaddrbk_cryptosettings +Name=Crypto Preferences +Name[af]=Kripto Voorkeure +Name[be]=Перавагі крыптаграфіі +Name[bg]=Шифроване +Name[bs]=Postavke kriptografije +Name[ca]=Preferències de criptografia +Name[cs]=Nastavení šifrování +Name[da]=Krypto-indstillinger +Name[de]=Kryptographie-Einstellungen +Name[el]=Προτιμήσεις κρυπτογραφίας +Name[eo]=Agordoj pri Ĉifrado +Name[es]=Preferencias de cifrado +Name[et]=Krüptoseadistused +Name[eu]=Kriptografia hobespenak +Name[fa]=تنظیمات مخفی +Name[fi]=Salauksen asetukset +Name[fr]=Préférences de chiffrement +Name[fy]=Fersiferingynstellings +Name[gl]=Preferencias de Cifraxe +Name[he]=מאפייני הצפנה +Name[hu]=Titkosítási beállítások +Name[is]=Stillingar dulritunar +Name[it]=Preferenze crittografia +Name[ja]=暗号の設定 +Name[ka]=დაშიფრვის პარამეტრები +Name[kk]=Шифрлау параметрлері +Name[km]=ចំណង់ចំណូលចិត្ត Crypto +Name[ko]=암호화 설정 +Name[lt]=Šifravimo pasirinkimai +Name[ms]=Keutamaan Kripto +Name[nb]=Krypteringsinnstillinger +Name[nds]=Verslöteln-Instellen +Name[ne]=गुप्तिकरण प्राथमिकता +Name[nl]=Versleutelingsinstellingen +Name[nn]=Krypteringsinnstillinger +Name[pl]=Ustawienia kryptograficzne +Name[pt]=Preferências de Encriptação +Name[pt_BR]=Configurações de Criptografia +Name[ru]=Настройки шифрования +Name[se]=Krypterenheivehusat +Name[sk]=Nastavenie šifrovania +Name[sl]=Lastnosti šifriranja +Name[sr]=Криптографска подешавања +Name[sr@Latn]=Kriptografska podešavanja +Name[sv]=Krypteringsinställningar +Name[ta]= க்ரிப்டோ முன்னுரிமைகள் +Name[tg]=Танзимоти рамзгузорӣ +Name[tr]=Şifreleme Özellikleri +Name[uk]=Параметри шифрування +Name[zh_CN]=加密首选项 +Name[zh_TW]=加密設定 +Type=Service +ServiceTypes=KAddressBook/ContactEditorWidget +X-KDE-KAddressBook-CEWPluginVersion=1 diff --git a/kaddressbook/editors/cryptowidget.cpp b/kaddressbook/editors/cryptowidget.cpp new file mode 100644 index 000000000..d2d5917f9 --- /dev/null +++ b/kaddressbook/editors/cryptowidget.cpp @@ -0,0 +1,227 @@ +/* + This file is part of KAddressBook. + Copyright (c) 2004 Klar�vdalens Datakonsult AB + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. +*/ + +#include <config.h> +#include "certmanager/lib/ui/keyrequester.h" +#include "certmanager/lib/cryptplugfactory.h" +#include "certmanager/lib/cryptplugwrapper.h" +#include "certmanager/lib/kleo/enum.h" + +#include "gpgmepp/data.h" +#include "gpgmepp/key.h" + +#include <kdebug.h> +#include <kdialog.h> +#include <kiconloader.h> +#include <klocale.h> + +#include <qlayout.h> +#include <qlabel.h> +#include <qcheckbox.h> +#include <qcombobox.h> +#include <qpushbutton.h> +#include <qvgroupbox.h> +#include <qhbox.h> + +#include "cryptowidget.h" + +extern "C" { + void *init_libkaddrbk_cryptosettings() + { + return ( new CryptoWidgetFactory ); + } +} + +CryptoWidgetFactory::CryptoWidgetFactory() +{ + KGlobal::locale()->insertCatalogue( "libkleopatra" ); + KGlobal::iconLoader()->addAppDir( "libkleopatra" ); +} + +QString CryptoWidgetFactory::pageTitle() const +{ + return i18n( "Crypto Settings" ); +} + +QString CryptoWidgetFactory::pageIdentifier() const +{ + return "crypto"; +} + +CryptoWidget::CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + : KAB::ContactEditorWidget( ab, parent, name ), mReadOnly( false ) +{ + QGridLayout *topLayout = new QGridLayout( this, 2, 5, KDialog::marginHint(), + KDialog::spacingHint() ); + topLayout->setColStretch( 1, 1 ); + topLayout->setRowStretch( 4, 1 ); + + QVGroupBox* protGB = new QVGroupBox( i18n( "Allowed Protocols" ), this ); + topLayout->addMultiCellWidget( protGB, 0, 0, 0, 1 ); + + uint msgFormat = 1; + for ( uint i = 0 ; i < NumberOfProtocols ; ++i ) { + Kleo::CryptoMessageFormat f = static_cast<Kleo::CryptoMessageFormat>( msgFormat ); + mProtocolCB[ i ] = new QCheckBox( Kleo::cryptoMessageFormatToLabel( f ), protGB ); + connect( mProtocolCB[i], SIGNAL( clicked() ), this, SLOT( setModified() ) ); + + // Iterating over a bitfield means *2 every time + msgFormat *= 2; + } + + QLabel* l = new QLabel( i18n( "Preferred OpenPGP encryption key:" ), this ); + topLayout->addWidget( l, 1, 0 ); + + mPgpKey = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::OpenPGP, this ); + topLayout->addWidget( mPgpKey, 1, 1 ); + + l = new QLabel( i18n( "Preferred S/MIME encryption certificate:" ), this ); + topLayout->addWidget( l, 2, 0 ); + + mSmimeCert = new Kleo::EncryptionKeyRequester( true, Kleo::EncryptionKeyRequester::SMIME, this ); + topLayout->addWidget( mSmimeCert, 2, 1 ); + + QGroupBox* box = new QVGroupBox( i18n( "Message Preference" ), this ); + topLayout->addMultiCellWidget( box, 3, 3, 0, 1 ); + + + // Send preferences/sign (see certmanager/lib/kleo/enum.h) + QHBox* hbox = new QHBox( box ); + + l = new QLabel( i18n( "Sign:" ), hbox ); + + mSignPref = new QComboBox( false, hbox ); + for ( unsigned int i = Kleo::UnknownSigningPreference; i < Kleo::MaxSigningPreference ; ++i ) + mSignPref->insertItem( Kleo::signingPreferenceToLabel( + static_cast<Kleo::SigningPreference>( i ) ) ); + + // Send preferences/encrypt (see certmanager/lib/kleo/enum.h) + hbox = new QHBox( box ); + + l = new QLabel( i18n("Encrypt:"), hbox ); + + mCryptPref = new QComboBox( false, hbox ); + for ( unsigned int i = Kleo::UnknownPreference; i < Kleo::MaxEncryptionPreference ; ++i ) + mCryptPref->insertItem( Kleo::encryptionPreferenceToLabel( + static_cast<Kleo::EncryptionPreference>( i ) ) ); + + // Emit "changed()" signal + connect( mSignPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) ); + connect( mCryptPref, SIGNAL( activated(int) ), this, SLOT( setModified() ) ); + // Not optimal, but KeyRequester doesn't emit any signals when the key changes + connect( mPgpKey->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); + connect( mPgpKey->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); + connect( mSmimeCert->eraseButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); + connect( mSmimeCert->dialogButton(), SIGNAL( clicked() ), this, SLOT( setModified() ) ); +} + +CryptoWidget::~CryptoWidget() +{ +} + +void CryptoWidget::loadContact( KABC::Addressee *addr ) +{ + bool blocked = signalsBlocked(); + blockSignals( true ); + + QStringList lst = QStringList::split( ',', addr->custom( "KADDRESSBOOK", + "CRYPTOPROTOPREF" ) ); + uint cryptoFormats = Kleo::stringListToCryptoMessageFormats( lst ); + + uint msgFormat = 1; + for ( uint i = 0 ; i < NumberOfProtocols ; ++i, msgFormat *= 2 ) { + mProtocolCB[i]->setChecked( cryptoFormats & msgFormat ); + } + + mSignPref->setCurrentItem( Kleo::stringToSigningPreference( addr->custom( "KADDRESSBOOK", + "CRYPTOSIGNPREF" ) ) ); + mCryptPref->setCurrentItem( Kleo::stringToEncryptionPreference( addr->custom( "KADDRESSBOOK", + "CRYPTOENCRYPTPREF" ) ) ); + + // We dont use the contents of addr->key(...) because we want just a ref. + // to the key/cert. stored elsewhere. + + mPgpKey->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "OPENPGPFP" ) ) ); + mSmimeCert->setFingerprints( QStringList::split( ",", addr->custom( "KADDRESSBOOK", "SMIMEFP" ) ) ); + + blockSignals( blocked ); +} + +void CryptoWidget::storeContact( KABC::Addressee *addr ) +{ + uint cryptoFormats = 0; + uint msgFormat = 1; + for ( uint i = 0 ; i < NumberOfProtocols ; ++i, msgFormat *= 2 ) { + if ( mProtocolCB[ i ]->isChecked() ) + cryptoFormats |= msgFormat; + } + + QStringList lst = Kleo::cryptoMessageFormatsToStringList( cryptoFormats ); + if ( !lst.isEmpty() ) + addr->insertCustom( "KADDRESSBOOK", "CRYPTOPROTOPREF", lst.join( "," ) ); + else + addr->removeCustom( "KADDRESSBOOK", "CRYPTOPROTOPREF" ); + + Kleo::SigningPreference signPref = + static_cast<Kleo::SigningPreference>( mSignPref->currentItem() ); + if ( signPref != Kleo::UnknownSigningPreference ) + addr->insertCustom( "KADDRESSBOOK", "CRYPTOSIGNPREF", + Kleo::signingPreferenceToString( signPref ) ); + else + addr->removeCustom( "KADDRESSBOOK", "CRYPTOSIGNPREF" ); + + Kleo::EncryptionPreference encryptPref = + static_cast<Kleo::EncryptionPreference>( mCryptPref->currentItem() ); + if ( encryptPref != Kleo::UnknownPreference ) + addr->insertCustom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF", + Kleo::encryptionPreferenceToString( encryptPref ) ); + else + addr->removeCustom( "KADDRESSBOOK", "CRYPTOENCRYPTPREF" ); + + QStringList pfp = mPgpKey->fingerprints(); + QStringList sfp = mSmimeCert->fingerprints(); + + if ( !pfp.isEmpty() ) + addr->insertCustom( "KADDRESSBOOK", "OPENPGPFP", pfp.join( "," ) ); + else + addr->removeCustom( "KADDRESSBOOK", "OPENPGPFP" ); + + if ( !sfp.isEmpty() ) + addr->insertCustom( "KADDRESSBOOK", "SMIMEFP", sfp.join( "," ) ); + else + addr->removeCustom( "KADDRESSBOOK", "SMIMEFP" ); +} + +void CryptoWidget::setReadOnly( bool readOnly ) +{ + mReadOnly = readOnly; + for ( uint i = 0 ; i < NumberOfProtocols ; ++i ) + mProtocolCB[ i ]->setEnabled( !readOnly ); + + mSignPref->setEnabled( !readOnly ); + mCryptPref->setEnabled( !readOnly ); + mPgpKey->setEnabled( !readOnly ); + mSmimeCert->setEnabled( !readOnly ); +} + +#include "cryptowidget.moc" diff --git a/kaddressbook/editors/cryptowidget.h b/kaddressbook/editors/cryptowidget.h new file mode 100644 index 000000000..de2c7bfcc --- /dev/null +++ b/kaddressbook/editors/cryptowidget.h @@ -0,0 +1,71 @@ +/* + This file is part of KAddressBook. + Copyright (c) 2004 Klarlvdalens Datakonsult AB + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. +*/ + +#ifndef CRYPTOWIDGET_H +#define CRYPTOWIDGET_H + +#include "contacteditorwidget.h" + +class QComboBox; + +namespace Kleo { + class KeyRequester; +} +class QCheckBox; + +class CryptoWidget : public KAB::ContactEditorWidget +{ + Q_OBJECT + + public: + CryptoWidget( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); + ~CryptoWidget(); + + void loadContact( KABC::Addressee *addr ); + void storeContact( KABC::Addressee *addr ); + void setReadOnly( bool readOnly ); + + private: + enum { NumberOfProtocols = 4 }; + QCheckBox* mProtocolCB[NumberOfProtocols]; + QComboBox* mSignPref; + QComboBox* mCryptPref; + Kleo::KeyRequester* mPgpKey; + Kleo::KeyRequester* mSmimeCert; + bool mReadOnly; +}; + +class CryptoWidgetFactory : public KAB::ContactEditorWidgetFactory +{ + public: + CryptoWidgetFactory(); + KAB::ContactEditorWidget *createWidget( KABC::AddressBook *ab, QWidget *parent, const char *name ) + { + return new CryptoWidget( ab, parent, name ); + } + + QString pageTitle() const; + QString pageIdentifier() const; +}; + +#endif diff --git a/kaddressbook/editors/icons/Makefile.am b/kaddressbook/editors/icons/Makefile.am new file mode 100644 index 000000000..828085c74 --- /dev/null +++ b/kaddressbook/editors/icons/Makefile.am @@ -0,0 +1,3 @@ +kaddressbookicondir = $(kde_datadir)/kaddressbook/icons +kaddressbookicon_ICON = AUTO + diff --git a/kaddressbook/editors/icons/cr16-app-aim_protocol.png b/kaddressbook/editors/icons/cr16-app-aim_protocol.png Binary files differnew file mode 100644 index 000000000..1e89df85c --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-aim_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-gadu_protocol.png b/kaddressbook/editors/icons/cr16-app-gadu_protocol.png Binary files differnew file mode 100644 index 000000000..46f062c3d --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-gadu_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-groupwise_protocol.png b/kaddressbook/editors/icons/cr16-app-groupwise_protocol.png Binary files differnew file mode 100644 index 000000000..87dcf0dca --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-groupwise_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-icq_protocol.png b/kaddressbook/editors/icons/cr16-app-icq_protocol.png Binary files differnew file mode 100644 index 000000000..eda0f8c4d --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-icq_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-irc_protocol.png b/kaddressbook/editors/icons/cr16-app-irc_protocol.png Binary files differnew file mode 100644 index 000000000..c5678d1ef --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-irc_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-jabber_protocol.png b/kaddressbook/editors/icons/cr16-app-jabber_protocol.png Binary files differnew file mode 100644 index 000000000..48dd715eb --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-jabber_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-meanwhile_protocol.png b/kaddressbook/editors/icons/cr16-app-meanwhile_protocol.png Binary files differnew file mode 100644 index 000000000..69767ef3a --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-meanwhile_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-msn_protocol.png b/kaddressbook/editors/icons/cr16-app-msn_protocol.png Binary files differnew file mode 100644 index 000000000..a18ff5d4e --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-msn_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-skype_protocol.png b/kaddressbook/editors/icons/cr16-app-skype_protocol.png Binary files differnew file mode 100644 index 000000000..5649464ff --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-skype_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-sms_protocol.png b/kaddressbook/editors/icons/cr16-app-sms_protocol.png Binary files differnew file mode 100644 index 000000000..3bfa3627c --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-sms_protocol.png diff --git a/kaddressbook/editors/icons/cr16-app-yahoo_protocol.png b/kaddressbook/editors/icons/cr16-app-yahoo_protocol.png Binary files differnew file mode 100644 index 000000000..30569212b --- /dev/null +++ b/kaddressbook/editors/icons/cr16-app-yahoo_protocol.png diff --git a/kaddressbook/editors/imaddressbase.ui b/kaddressbook/editors/imaddressbase.ui new file mode 100644 index 000000000..f62ac00d7 --- /dev/null +++ b/kaddressbook/editors/imaddressbase.ui @@ -0,0 +1,89 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>IMAddressBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>IMAddressBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>208</width> + <height>121</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="caption"> + <string>Edit Address</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <widget class="QComboBox" row="0" column="1"> + <property name="name"> + <cstring>cmbProtocol</cstring> + </property> + </widget> + <widget class="QLabel" row="0" column="0"> + <property name="name"> + <cstring>labelProtocol</cstring> + </property> + <property name="text"> + <string>&Protocol:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>cmbProtocol</cstring> + </property> + </widget> + <widget class="QLineEdit" row="1" column="1"> + <property name="name"> + <cstring>edtAddress</cstring> + </property> + </widget> + <widget class="QLabel" row="1" column="0"> + <property name="name"> + <cstring>labelAddress</cstring> + </property> + <property name="text"> + <string>&Address:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>edtAddress</cstring> + </property> + </widget> + <widget class="QLabel" row="2" column="0"> + <property name="name"> + <cstring>labelNetwork</cstring> + </property> + <property name="text"> + <string>&Network:</string> + </property> + <property name="buddy" stdset="0"> + <cstring>edtNetwork</cstring> + </property> + </widget> + <widget class="QLineEdit" row="2" column="1"> + <property name="name"> + <cstring>edtNetwork</cstring> + </property> + </widget> + </grid> +</widget> +<tabstops> + <tabstop>cmbProtocol</tabstop> + <tabstop>edtAddress</tabstop> +</tabstops> +<slots> + <slot>slotProtocolChanged( const QString & )</slot> + <slot>slotProtocolChanged()</slot> +</slots> +<layoutdefaults spacing="6" margin="11"/> +</UI> diff --git a/kaddressbook/editors/imaddresseditor.desktop b/kaddressbook/editors/imaddresseditor.desktop new file mode 100644 index 000000000..64dc74425 --- /dev/null +++ b/kaddressbook/editors/imaddresseditor.desktop @@ -0,0 +1,104 @@ +[Desktop Entry] +Type=Service +Name=Instant Messaging +Name[af]=Kits bootskap +Name[bg]=Мигновени съобщения +Name[br]=Postelerezh a-benn-kaer +Name[bs]=Instant poruke +Name[ca]=Missatgeria instantània +Name[cs]=Komunikátor +Name[el]=Στιγμιαίο μήνυμα +Name[eo]=Rapidmesaĝilo +Name[es]=Mensajería instantánea +Name[et]=Kiirsuhtlus +Name[eu]=Berehalako mezularitza +Name[fa]=پیامدهی فوری +Name[fi]=Pikaviestintä +Name[fr]=Messagerie instantanée +Name[gl]=Mensaxería Instantánea +Name[he]=מסרים מיידיים +Name[hu]=Azonnali üzenetküldés (IM) +Name[is]=Skilaboðaforrit +Name[it]=Messaggistica istantanea +Name[ja]=インスタントメッセージ +Name[ka]=მყისიერი შეტყობინებები +Name[kk]=Лезде хабарласу +Name[km]=ផ្ញើសារបន្ទាន់ +Name[ko]=인스턴트 페시징 +Name[lt]=Momentinės žinutės +Name[ms]=Penghantaran Mesej Segera +Name[nb]=Lynmelding +Name[nds]=Kortnarichten-Maker +Name[ne]=संदेशन दृश्टान्त +Name[nn]=Lynmelding +Name[pl]=Komunikacja internetowa +Name[pt]=Mensagens Instantâneas +Name[pt_BR]=Mensagem Instantâneo +Name[ru]=Службы обмена сообщениями +Name[se]=Šleađgadieđáhus +Name[sk]=Rozhovor +Name[sl]=Takojšno sporočanje +Name[sr]=Тренутне поруке +Name[sr@Latn]=Trenutne poruke +Name[sv]=Direktmeddelanden +Name[ta]=உடனடி செய்தி பரிமாற்றம் +Name[tg]=Хизматгоҳи мубодилаи иттилоот +Name[tr]=Hızlı Mesajlaşma +Name[uk]=Миттєвий зв'язок +Name[uz]=Xabar almashish +Name[uz@cyrillic]=Хабар алмашиш +Name[zh_CN]=即时通讯 +Name[zh_TW]=即時通訊 +Comment=Instant Messaging Address Editor +Comment[af]=Kits boodskap adres redigeerder +Comment[bg]=Редактор на адреси за мигновените съобщения +Comment[bs]=Editor adresa za instant poruke +Comment[ca]=Editor d'adreces de missatgeria instantània +Comment[cs]=Editor adres komunikátorů +Comment[da]=Instant Messaging adresseeditor +Comment[de]=Editor für Instant Messaging-Adressen +Comment[el]=Επεξεργαστής διευθύνσεων στιγμιαίων μηνυμάτων +Comment[eo]=Rapidmesaĝila Adres-Redaktilo +Comment[es]=Editor de direcciones de mensajería instantánea +Comment[et]=Kiirsuhtluse aadresside redaktor +Comment[eu]=Berehalako mezularitza helbide editorea +Comment[fa]=ویرایشگر نشانی پیامدهی فوری +Comment[fi]=Pikaviestinnän osoitteet +Comment[fr]=Éditeur d'adresses de messagerie instantanée +Comment[fy]=Instant Messaging Adresbewurker +Comment[gl]=Editor de Enderezos de Mensaxería Instantánea +Comment[he]=עורך כתובות מסרים מידיים +Comment[hu]=IM-címszerkesztő +Comment[is]=Vistfangaritill fyrir skilaboðaforrit +Comment[it]=Editor degli indirizzi per messaggi istantanei +Comment[ja]=インスタントメッセージのアドレスを編集 +Comment[ka]=მყისიერი შეტყობინებების წიგნაკის რედაქტორი +Comment[kk]=Лезде хабарласу адрестер өңдегіші +Comment[km]=កម្មវិធីនិពន្ធអាសយដ្ឋានដើម្បីផ្ញើសារបន្ទាន់ +Comment[ko]=인스턴트 메시징 주소 편집기 +Comment[lt]=Momentinių žinučių adresų redaktorius +Comment[ms]=Pengedit Alamat Penghantaran Mesej Segera +Comment[nb]=Adresse-redigerer for lynmelding +Comment[nds]=Editor för Kortnarichten-Adressen +Comment[ne]=दृष्टान्त संदेशन ठेगाना सम्पादक +Comment[nl]=Instant Messaging Adresbewerker +Comment[nn]=Adresseredigering for lynmelding +Comment[pl]=Edytor adresów komunikatorów internetowych +Comment[pt]=Editor de Endereços do Mensageiro Instantâneo +Comment[pt_BR]=Editor de Endereços do Mensageiro Instantâneo +Comment[ru]=Редактор контактов служб обмена сообщениями +Comment[se]=Šleađgadieđáhusaid čujuhusdoaimmaheaddji +Comment[sk]=Editor adries pre Instant Messaging +Comment[sl]=Urejevalnik naslovov takojšnega sporočanja +Comment[sr]=Едитор адреса тренутних порука +Comment[sr@Latn]=Editor adresa trenutnih poruka +Comment[sv]=Adresseditor för direktmeddelanden +Comment[ta]= உடனடி செய்தி பரிமாற்றத்தின் முகவரி தொகுப்பான் +Comment[tg]=Муҳаррири алоқоти хизматгоҳҳои мубодилаи иттилоот +Comment[tr]=Hızlı Mesajlaşma Adres Düzenleyicisi +Comment[uk]=Редактор адрес миттєвого зв'язку +Comment[zh_CN]=即时通讯地址编辑器 +Comment[zh_TW]=即時通訊位址編輯器 +ServiceTypes=KAddressBook/ContactEditorWidget +X-KDE-Library=libkaddrbk_instantmessaging +X-KDE-KAddressBook-CEWPluginVersion=1 diff --git a/kaddressbook/editors/imaddresswidget.cpp b/kaddressbook/editors/imaddresswidget.cpp new file mode 100644 index 000000000..3d2af677e --- /dev/null +++ b/kaddressbook/editors/imaddresswidget.cpp @@ -0,0 +1,137 @@ +/* + IM address editor widget for KAddressbook + + Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. +*/ +#include <qcheckbox.h> +#include <qcombobox.h> +#include <qlineedit.h> +#include <qlabel.h> + +#include <kdebug.h> +#include <kiconloader.h> +#include <klocale.h> +#include <kplugininfo.h> + +#include "imaddresswidget.h" + +IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols ) + : IMAddressBase( parent ) +{ + mProtocols = protocols; + populateProtocols(); + init(); +} + +IMAddressWidget::IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols, + KPluginInfo *protocol, const QString& address, + const IMContext& context ) + : IMAddressBase( parent ) +{ + Q_UNUSED( context ); + + mProtocols = protocols; + populateProtocols(); + cmbProtocol->setCurrentItem( mProtocols.findIndex( protocol ) ); + + edtAddress->setText( address.section( QChar( 0xE120 ), 0, 0 ) ); + edtNetwork->setText( address.section( QChar( 0xE120 ), 1 ) ); + + init(); +} + +void IMAddressWidget::init() +{ + connect( cmbProtocol, SIGNAL( activated( const QString& ) ), + this, SLOT( slotProtocolChanged() ) ); + connect( edtAddress, SIGNAL( textChanged( const QString& ) ), + this, SLOT( slotAddressChanged( const QString& ) ) ); + + slotProtocolChanged(); +} + +void IMAddressWidget::slotAddressChanged( const QString &text ) +{ + emit inValidState( !text.stripWhiteSpace().isEmpty() ); +} + +KPluginInfo * IMAddressWidget::protocol() const +{ + int protocolIndex = cmbProtocol->currentItem(); + + return mProtocols[ protocolIndex ]; +} + +IMContext IMAddressWidget::context() const +{ + IMContext context = Any; +/* if ( cmbContext->currentItem() ) + { + + int contextIndex = cmbContext->currentItem(); + switch ( contextIndex ) + { + case 0: + context = Any; + break; + case 1: + context = Home; + break; + case 2: + context = Work; + break; + } + } + */ + + return context; +} + +QString IMAddressWidget::address() const +{ + // The protocol irc is a special case and hard coded in. + // It's not nice, but the simplest way that I can see. + if ( protocol()->name() == "IRC" && !edtNetwork->text().stripWhiteSpace().isEmpty() ) + return edtAddress->text().stripWhiteSpace() + QChar( 0xE120 ) + edtNetwork->text().stripWhiteSpace(); + else + return edtAddress->text().stripWhiteSpace(); +} + +void IMAddressWidget::populateProtocols() +{ + // insert the protocols in order + QValueList<KPluginInfo *>::ConstIterator it; + for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) + cmbProtocol->insertItem( SmallIcon( (*it)->icon() ), (*it)->name() ); +} + +void IMAddressWidget::slotProtocolChanged() +{ + if ( protocol()->name() == "IRC" ) { + edtNetwork->show(); + labelNetwork->show(); + } else { + edtNetwork->hide(); + labelNetwork->hide(); + } +} + +#include "imaddresswidget.moc" diff --git a/kaddressbook/editors/imaddresswidget.h b/kaddressbook/editors/imaddresswidget.h new file mode 100644 index 000000000..29d93b13f --- /dev/null +++ b/kaddressbook/editors/imaddresswidget.h @@ -0,0 +1,74 @@ +/* + IM address editor widget for KAddressbook + + Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. +*/ +#ifndef IMADDRESSWIDGET_H +#define IMADDRESSWIDGET_H + +#include <qvaluelist.h> + +#include "imaddressbase.h" +#include "imeditorwidget.h" + +class KPluginInfo; + +/* Note regarding Context: + * It wasn not possible to get an idea of Context into Kopete in time for KDE 3.3, + * so it has been removed from the UI and functionally disabled in the code. + */ + +/** + * A widget for editing an instant messaging address + */ +class IMAddressWidget : public IMAddressBase +{ + Q_OBJECT + + public: + IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols); + IMAddressWidget( QWidget *parent, QValueList<KPluginInfo *> protocols, + KPluginInfo *protocol, const QString& address, + const IMContext& context = Any ); + + KPluginInfo * protocol() const; + IMContext context() const; + QString address() const ; + QValueList<KPluginInfo *> mProtocols; + + signals: + void inValidState( bool ); + + protected: + /** + * Populate combobox with protocols + */ + void populateProtocols(); + + protected slots: + void slotProtocolChanged(); + void slotAddressChanged( const QString &text ); + + private: + void init(); +}; + +#endif diff --git a/kaddressbook/editors/imeditorbase.ui b/kaddressbook/editors/imeditorbase.ui new file mode 100644 index 000000000..24a5696a9 --- /dev/null +++ b/kaddressbook/editors/imeditorbase.ui @@ -0,0 +1,164 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>IMEditorBase</class> +<widget class="QWidget"> + <property name="name"> + <cstring>IMEditorBase</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>442</width> + <height>247</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>7</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="caption"> + <string>IM Addresses</string> + </property> + <grid> + <property name="name"> + <cstring>unnamed</cstring> + </property> + <spacer row="4" column="1"> + <property name="name"> + <cstring>spacer1</cstring> + </property> + <property name="orientation"> + <enum>Vertical</enum> + </property> + <property name="sizeType"> + <enum>Expanding</enum> + </property> + <property name="sizeHint"> + <size> + <width>20</width> + <height>16</height> + </size> + </property> + </spacer> + <widget class="QPushButton" row="3" column="1"> + <property name="name"> + <cstring>btnSetStandard</cstring> + </property> + <property name="text"> + <string>&Set Standard</string> + </property> + <property name="toolTip" stdset="0"> + <string>The IM Address that is set as the standard is the address that is shown in main editor window.</string> + </property> + <property name="whatsThis" stdset="0"> + <string><qt>Only one IM Address can be set as the standard IM Address.<br>The standard IM Address is shown in the main editor window, and other programs may use this as hint for deciding which IM Address to show.</qt></string> + </property> + </widget> + <widget class="KPushButton" row="2" column="1"> + <property name="name"> + <cstring>btnDelete</cstring> + </property> + <property name="text"> + <string>&Remove</string> + </property> + </widget> + <widget class="KPushButton" row="1" column="1"> + <property name="name"> + <cstring>btnEdit</cstring> + </property> + <property name="text"> + <string>&Edit...</string> + </property> + </widget> + <widget class="KPushButton" row="0" column="1"> + <property name="name"> + <cstring>btnAdd</cstring> + </property> + <property name="text"> + <string>&Add...</string> + </property> + </widget> + <widget class="KListView" row="0" column="0" rowspan="5" colspan="1"> + <column> + <property name="text"> + <string>Protocol</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizable"> + <bool>true</bool> + </property> + </column> + <column> + <property name="text"> + <string>Address</string> + </property> + <property name="clickable"> + <bool>true</bool> + </property> + <property name="resizable"> + <bool>true</bool> + </property> + </column> + <property name="name"> + <cstring>lvAddresses</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>3</vsizetype> + <horstretch>1</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="minimumSize"> + <size> + <width>200</width> + <height>28</height> + </size> + </property> + <property name="selectionMode" stdset="0"> + <enum>Extended</enum> + </property> + <property name="allColumnsShowFocus"> + <bool>true</bool> + </property> + <property name="fullWidth"> + <bool>true</bool> + </property> + </widget> + <widget class="KActiveLabel" row="5" column="0" rowspan="1" colspan="2"> + <property name="name"> + <cstring>lblWarning</cstring> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string><em>Note:</em> Please read the help page before adding or editing Instant Messenging Addresses here.</string> + </property> + </widget> + </grid> +</widget> +<customwidgets> +</customwidgets> +<layoutdefaults spacing="6" margin="0"/> +<layoutfunctions spacing="KDialog::spacingHint"/> +<includehints> + <includehint>kpushbutton.h</includehint> + <includehint>kpushbutton.h</includehint> + <includehint>kpushbutton.h</includehint> + <includehint>klistview.h</includehint> + <includehint>kactivelabel.h</includehint> +</includehints> +</UI> diff --git a/kaddressbook/editors/imeditorwidget.cpp b/kaddressbook/editors/imeditorwidget.cpp new file mode 100644 index 000000000..f61e06386 --- /dev/null +++ b/kaddressbook/editors/imeditorwidget.cpp @@ -0,0 +1,491 @@ +/* + IM address editor widget for KAddressBook + + Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. +*/ + +#include <qlistview.h> +#include <qstringlist.h> +#include <qvbox.h> +#include <qlayout.h> +#include <qfont.h> +#include <qpainter.h> + +#include <kdialogbase.h> +#include <kdebug.h> +#include <kiconloader.h> +#include <klocale.h> +#include <kmessagebox.h> +#include <kplugininfo.h> +#include <kpushbutton.h> +#include <ktrader.h> + +#include "imaddresswidget.h" +#include "imeditorbase.h" +#include "imeditorwidget.h" + + +IMAddressLVI::IMAddressLVI( KListView *parent, KPluginInfo *protocol, + const QString &address, const IMContext &context ) + : KListViewItem( parent ) +{ + setProtocol( protocol ); + setAddress( address ); + setContext( context ); + mPreferred = false; +} + +void IMAddressLVI::setPreferred( bool preferred ) +{ + mPreferred = preferred; +} + +bool IMAddressLVI::preferred() const +{ + return mPreferred; +} + +void IMAddressLVI::paintCell( QPainter *p, const QColorGroup &cg, + int column, int width, int alignment ) +{ + if ( mPreferred ) { + QFont font = p->font(); + font.setBold( true ); + p->setFont( font ); + } + + KListViewItem::paintCell( p, cg, column, width, alignment ); +} + +void IMAddressLVI::setAddress( const QString &address ) +{ + // irc uses 0xE120 to seperate the nick and the server group. + QString serverOrGroup = address.section( QChar( 0xE120 ), 1 ); + + if ( serverOrGroup.isEmpty() ) + setText( 1, address ); + else { + QString nickname = address.section( QChar( 0xE120 ), 0, 0 ); + setText( 1, i18n( "<nickname> on <server>","%1 on %2" ) + .arg( nickname ).arg( serverOrGroup ) ); + } + + mAddress = address; +} + +void IMAddressLVI::setContext( const IMContext &context ) +{ + mContext = context; + // set context +/* switch ( context ) + { + case Home: + setText( 2, i18n( "Home" ) ); + break; + case Work: + setText( 2, i18n( "Work" ) ); + break; + case Any: + setText( 2, i18n( "Any" ) ); + break; + } +*/ +} + +void IMAddressLVI::setProtocol( KPluginInfo *protocol ) +{ + mProtocol = protocol; + + setPixmap( 0, SmallIcon( mProtocol->icon() ) ); + setText( 0, mProtocol->name() ); +} + +KPluginInfo * IMAddressLVI::protocol() const +{ + return mProtocol; +} + +IMContext IMAddressLVI::context() const +{ + return mContext; +} + +QString IMAddressLVI::address() const +{ + return mAddress; +} + +void IMAddressLVI::activate() +{ + // show editor +} + +/*===========================================================================*/ + +IMEditorWidget::IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name ) + : KDialogBase( parent, name, false, i18n( "Edit Instant Messenging Address" ), + Help | Ok | Cancel, Ok, false ), + mReadOnly( false ) +{ + mWidget = new IMEditorBase( this ); + setMainWidget( mWidget ); + + connect( mWidget->btnAdd, SIGNAL( clicked() ), SLOT( slotAdd() ) ); + connect( mWidget->btnEdit, SIGNAL( clicked() ), SLOT( slotEdit() ) ); + connect( mWidget->btnDelete, SIGNAL( clicked() ), SLOT( slotDelete() ) ); + connect( mWidget->btnSetStandard, SIGNAL( clicked()), SLOT( slotSetStandard() ) ); + connect( mWidget->lvAddresses, SIGNAL( selectionChanged() ), SLOT( slotUpdateButtons() ) ); + + connect( mWidget->lvAddresses, SIGNAL( doubleClicked( QListViewItem*, const QPoint&, int ) ), + SLOT( slotEdit() ) ); + + setHelp( "managing-contacts-im-addresses" ); + + mWidget->btnEdit->setEnabled( false ); + mWidget->btnDelete->setEnabled( false ); + mWidget->btnSetStandard->setEnabled( false ); + // Disabled pending implementation + //mWidget->btnUp->setEnabled( false ); + //mWidget->btnDown->setEnabled( false ); + mPreferred = preferredIM; + mPreferred = mPreferred.replace( " on ", QString( QChar( 0xE120 ) ), true ); + mProtocols = KPluginInfo::fromServices( KTrader::self()->query( QString::fromLatin1( "KABC/IMProtocol" ) ) ); + + // order the protocols by putting them in a qmap, then sorting the set of keys and recreating the list + QMap<QString, KPluginInfo *> protocolMap; + QValueList<KPluginInfo *>::ConstIterator it; + QValueList<KPluginInfo *> sorted; + for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) + protocolMap.insert( (*it)->name(), (*it) ); + + QStringList keys = protocolMap.keys(); + keys.sort(); + QStringList::ConstIterator keyIt = keys.begin(); + QStringList::ConstIterator end = keys.end(); + for ( ; keyIt != end; ++keyIt ) + sorted.append( protocolMap[*keyIt] ); + mProtocols = sorted; +} + +QValueList<KPluginInfo *> IMEditorWidget::availableProtocols() const +{ + return mProtocols; +} + +void IMEditorWidget::loadContact( KABC::Addressee *addr ) +{ + if ( mWidget->lvAddresses ) + mWidget->lvAddresses->clear(); + + // see README for details of how Evolution stores IM addresses (differently) + const QStringList customs = addr->customs(); + + QStringList::ConstIterator it; + bool isSet = false; + for ( it = customs.begin(); it != customs.end(); ++it ) { + QString app, name, value; + splitField( *it, app, name, value ); + + if ( app.startsWith( QString::fromLatin1( "messaging/" ) ) ) { + if ( name == QString::fromLatin1( "All" ) ) { + KPluginInfo *protocol = protocolFromString( app ); + if ( protocol ) { + QStringList addresses = QStringList::split( QChar( 0xE000 ), value ); + QStringList::iterator end = addresses.end(); + for ( QStringList::ConstIterator it = addresses.begin(); it != end; ++it ) { + IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, protocol, *it, Any/*, false*/ ); + if ( !isSet && (*it).stripWhiteSpace().lower() == mPreferred.stripWhiteSpace().lower() ) { + imaddresslvi->setPreferred( true ); + isSet = true; //Only set one item to be preferred + } + } + } else + kdDebug( 5720 ) << k_funcinfo << " no protocol found for: " << app << endl; + } + } + } + + if ( mWidget->lvAddresses->firstChild() ) + mWidget->lvAddresses->firstChild()->setSelected( true ); +} + +void IMEditorWidget::storeContact( KABC::Addressee *addr ) +{ + // for each changed protocol, write a new custom field containing the current set of + // addresses + QValueList<KPluginInfo *>::ConstIterator protocolIt; + for ( protocolIt = mChangedProtocols.begin(); protocolIt != mChangedProtocols.end(); ++protocolIt ) { + QStringList lst; + QListViewItemIterator addressIt( mWidget->lvAddresses ); + while ( addressIt.current() ) { + IMAddressLVI* currentAddress = static_cast<IMAddressLVI*>( *addressIt ); + if ( currentAddress->protocol() == *protocolIt ) + lst.append( currentAddress->address() ); + ++addressIt; + } + + QString addrBookField = (*protocolIt)->property( "X-KDE-InstantMessagingKABCField" ).toString(); + if ( !lst.isEmpty() ) + addr->insertCustom( addrBookField, QString::fromLatin1( "All" ), lst.join( QChar( 0xE000 ) ) ); + else + addr->removeCustom( addrBookField, QString::fromLatin1( "All" ) ); + } +} + +void IMEditorWidget::setReadOnly( bool readOnly ) +{ + mReadOnly = readOnly; + slotUpdateButtons(); +} + +void IMEditorWidget::slotSetStandard() +{ + QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + + // Just set the first one selected as standard + if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) { + QListViewItemIterator it2( mWidget->lvAddresses ); + while ( it2.current() ) { + IMAddressLVI *item = static_cast<IMAddressLVI*>( it2.current() ); + + if ( item->preferred() ) { + if ( current == item ) + return; //Selected is already preferred + else { + item->setPreferred( false ); + mWidget->lvAddresses->repaintItem( item ); + break; + } + } + + ++it2; + } + + mPreferred = current->address(); + current->setPreferred( true ); + setModified( true ); + mWidget->lvAddresses->repaintItem( current ); + } +} + +void IMEditorWidget::slotUpdateButtons() +{ + int num_selected = 0; + QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + while ( it.current() ) { + ++num_selected; + if ( num_selected > 1 ) + break; //no need to count above 2. + + ++it; + } + + if ( !mReadOnly && num_selected == 1 ) { + mWidget->btnAdd->setEnabled( true ); + mWidget->btnEdit->setEnabled( true ); + mWidget->btnDelete->setEnabled( true ); + IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ); + + // Disable "set standard" if already standard + mWidget->btnSetStandard->setEnabled( !current || !current->preferred() ); + } else if ( !mReadOnly && num_selected > 1 ) { + mWidget->btnAdd->setEnabled( true ); + mWidget->btnEdit->setEnabled( false ); + mWidget->btnDelete->setEnabled( true ); + mWidget->btnSetStandard->setEnabled( false ); + } else { + mWidget->btnAdd->setEnabled( !mReadOnly ); + mWidget->btnSetStandard->setEnabled( false ); + mWidget->btnEdit->setEnabled( false ); + mWidget->btnDelete->setEnabled( false ); + } +} + +void IMEditorWidget::setModified( bool modified ) +{ + mModified = modified; +} + +bool IMEditorWidget::isModified() const +{ + return mModified; +} + +void IMEditorWidget::slotAdd() +{ + KDialogBase addDialog( this, "addaddress", true, i18n( "Instant messaging", "Add Address" ), + KDialogBase::Ok | KDialogBase::Cancel ); + + IMAddressWidget *addressWid = new IMAddressWidget( &addDialog, mProtocols ); + addDialog.enableButtonOK( false ); + connect( addressWid, SIGNAL( inValidState( bool ) ), + &addDialog, SLOT( enableButtonOK( bool ) ) ); + addDialog.setMainWidget( addressWid ); + + if ( addDialog.exec() == QDialog::Accepted ) { + // add the new item + IMAddressLVI *imaddresslvi = new IMAddressLVI( mWidget->lvAddresses, addressWid->protocol(), + addressWid->address() /*, addressWid->context() */ ); + + // If it's a new address, set is as preferred. + if ( mPreferred.isEmpty() ) { + imaddresslvi->setPreferred( true ); + mPreferred = addressWid->address(); + } + + if ( mChangedProtocols.find( addressWid->protocol() ) == mChangedProtocols.end() ) + mChangedProtocols.append( addressWid->protocol() ); + + mWidget->lvAddresses->sort(); + + setModified( true ); + } +} + +void IMEditorWidget::slotEdit() +{ + QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + + // Just edit the first one selected. + if ( IMAddressLVI *current = static_cast<IMAddressLVI*>( it.current() ) ) { + KDialogBase editDialog( this, "editaddress", true, i18n( "Instant messaging", "Edit Address" ), + KDialogBase::Ok | KDialogBase::Cancel ); + IMAddressWidget *addressWid = new IMAddressWidget( &editDialog, mProtocols, current->protocol(), + current->address(), current->context() ) ; + connect( addressWid, SIGNAL( inValidState( bool ) ), + &editDialog, SLOT( enableButtonOK( bool ) ) ); + editDialog.setMainWidget( addressWid ); + + if ( editDialog.exec() == QDialog::Accepted ) { + bool modified = false; + if ( addressWid->address() != current->address() ) { + modified = true; + current->setAddress( addressWid->address() ); + } + if ( addressWid->context() != current->context() ) { + modified = true; + current->setContext( addressWid->context() ); + } + + // the entry for the protocol of the current address has changed + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) { + mChangedProtocols.append( current->protocol() ); + } + // update protocol - has another protocol gained an address? + if ( current->protocol() != addressWid->protocol() ) { + modified = true; + // this proto is losing an entry + current->setProtocol( addressWid->protocol() ); + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) + mChangedProtocols.append( current->protocol() ); + } + + if ( modified ) + setModified(true); + } + } +} + +void IMEditorWidget::slotDelete() +{ + int num_selected = 0; + + { + QListViewItemIterator it( mWidget->lvAddresses, QListViewItemIterator::Selected ); + while ( it.current() ) { + num_selected++; + ++it; + } + } + + if ( num_selected == 0 ) + return; + + if ( KMessageBox::warningContinueCancel( this, i18n( "Do you really want to delete the selected address?", + "Do you really want to delete the %n selected addresses?", num_selected ), + i18n( "Confirm Delete" ), KStdGuiItem::del() ) != KMessageBox::Continue ) + return; + + QListViewItemIterator it( mWidget->lvAddresses ); + bool deletedPreferred = false; + while( it.current() ) { + if ( it.current()->isSelected() ) { + IMAddressLVI * current = static_cast<IMAddressLVI*>( *it ); + if ( mChangedProtocols.find( current->protocol() ) == mChangedProtocols.end() ) + mChangedProtocols.append( current->protocol() ); + + if ( current->preferred() ) + deletedPreferred = true; + + delete current; + } else + ++it; + } + + if ( deletedPreferred ) { + IMAddressLVI *first = static_cast<IMAddressLVI*>( mWidget->lvAddresses->firstChild() ); + if ( first ) { + first->setPreferred( true ); + mPreferred = first->address(); + } else + mPreferred = ""; + } + + setModified( true ); +} + +QString IMEditorWidget::preferred() const +{ + QString retval( mPreferred ); + return retval.replace( QChar( 0xE120 ), " on " ); +} + + +KPluginInfo * IMEditorWidget::protocolFromString( const QString &fieldValue ) const +{ + QValueList<KPluginInfo *>::ConstIterator it; + KPluginInfo * protocol = 0; + for ( it = mProtocols.begin(); it != mProtocols.end(); ++it ) { + if ( (*it)->property( "X-KDE-InstantMessagingKABCField" ).toString() == fieldValue ) { + protocol = *it; + break; + } + } + + return protocol; +} + +void IMEditorWidget::splitField( const QString &str, QString &app, QString &name, QString &value ) +{ + int colon = str.find( ':' ); + if ( colon != -1 ) { + QString tmp = str.left( colon ); + value = str.mid( colon + 1 ); + + int dash = tmp.find( '-' ); + if ( dash != -1 ) { + app = tmp.left( dash ); + name = tmp.mid( dash + 1 ); + } + } +} + +#include "imeditorwidget.moc" diff --git a/kaddressbook/editors/imeditorwidget.h b/kaddressbook/editors/imeditorwidget.h new file mode 100644 index 000000000..441db257b --- /dev/null +++ b/kaddressbook/editors/imeditorwidget.h @@ -0,0 +1,128 @@ +/* + IM addresses editor widget for KAddressbook + + Copyright (c) 2004 Will Stephenson <lists@stevello.free-online.co.uk> + + 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. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of Qt, and distribute the resulting executable, + without including the source code for Qt in the source distribution. +*/ + +#ifndef IMEDITORWIDGET_H +#define IMEDITORWIDGET_H + +#include <qvaluelist.h> +#include <klistview.h> +#include <kdialogbase.h> + +#include "contacteditorwidget.h" + + +class AddressWidget; +class KPluginInfo; +class IMEditorBase; + +enum IMContext { Any, Home, Work }; + +/* Note regarding Context: + * It wasn not possible to get an idea of Context into Kopete in time for KDE 3.3, + * so it has been removed from the UI and functionally disabled in the code. + */ + +/** + * The widget we add to KAddressbook's contact editor dialog + */ +class IMEditorWidget : public KDialogBase +{ + Q_OBJECT + + public: + IMEditorWidget( QWidget *parent, const QString &preferredIM, const char *name = 0 ); + ~IMEditorWidget() {}; + + void loadContact( KABC::Addressee *addr ); + void storeContact( KABC::Addressee *addr ); + void setReadOnly( bool readOnly ); + QValueList<KPluginInfo *> availableProtocols() const; + bool isModified() const; + QString preferred() const; + + protected slots: + void slotUpdateButtons(); + void slotAdd(); + void slotEdit(); + void slotDelete(); + void slotSetStandard(); + + protected: + /** + * Helper method to split the contents of an addressbook field up + */ + static void splitField( const QString &str, QString &app, QString &name, QString &value ); + + /** + * Find a protocol that matches the KABC key, or 0 if none found + */ + KPluginInfo * protocolFromString( const QString &fieldValue ) const; + + private: + bool mReadOnly; + bool mModified; + QString mPreferred; + IMEditorBase *mWidget; + void setModified( bool modified ); + + // Used to track changed protocols to reduce KABC writes + QValueList<KPluginInfo *> mChangedProtocols; + QValueList<KPluginInfo *> mProtocols; +}; + +/** + * List view item representing a single IM address. + */ + +// VCard has been disabled as there is no standard VCard location to store IM addresses yet. +class IMAddressLVI : public KListViewItem +{ + public: + IMAddressLVI( KListView *parent, KPluginInfo * protocol, + const QString &address, const IMContext &context = Any ); + + void setAddress( const QString &address ); + void setProtocol( KPluginInfo * protocol ); + void setContext( const IMContext &context ); + void activate(); + + KPluginInfo * protocol() const; + QString address() const; + IMContext context() const; + + void setPreferred( bool preferred ); + bool preferred() const; + + protected: + virtual void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ); + + private: + KPluginInfo * mProtocol; + bool mPreferred; + IMContext mContext; + QString mAddress; +}; + +#endif + diff --git a/kaddressbook/editors/kaddressbookimprotocol.desktop b/kaddressbook/editors/kaddressbookimprotocol.desktop new file mode 100644 index 000000000..80a6f89aa --- /dev/null +++ b/kaddressbook/editors/kaddressbookimprotocol.desktop @@ -0,0 +1,57 @@ +[Desktop Entry] +Type=ServiceType +X-KDE-ServiceType=KABC/IMProtocol +X-KDE-KAddressBook-CEWVersion=1 +Name=KAddressbook Instant Messaging Protocol +Name[af]=KAddressbook kits boodskap protokol +Name[bg]=Протокол за мигновени съобщения за адресника +Name[bs]=KAddressbook protokol za instant poruke +Name[ca]=Protocol de missatgeria instantània KAddressbook +Name[cs]=KAddressbook instant messaging protokol +Name[da]=KAddressbook kvikbesked-protokol +Name[de]=Adressbuch Instant Messaging Protokoll +Name[el]=Πρωτόκολλο στιγμιαίου μηνύματος του KAddressbook +Name[eo]=KAddressbook Rapidmesaĝila Protokolo +Name[es]=Protocolo de mensajería instantánea de KAddressbook +Name[et]=KDE aadressiraamatu kiirsuhtlusprotokoll +Name[eu]=KAddressbook berehalako mezularitza protokoloa +Name[fa]=قرارداد پیامدهی فوری KAddressbook +Name[fi]=KAddresbookin pikaviestintäprotokolla +Name[fr]=Protocole de messagerie instantanée pour KAddressbook +Name[fy]=KAddressbook Instant Messaging-protokol +Name[gl]=Protocolo de Mensaxería Instantánea de KAddressbook +Name[he]=פרוטוקול מסרים מידיים של KAddressbook +Name[hu]=KAddressbook azonnali üzenetküldési protokoll +Name[is]=KAddressbook skilaboðaforritið +Name[it]=KAddressbook protocollo messaggistica istantanea +Name[ja]=KAddressbook インスタントメッセージプロトコル +Name[ka]=KDE ოქმი მყისიერი შეტყობინებებისათვისწიგნაკითვის +Name[kk]=KAddressbook лезде хабарласу протоколы +Name[km]=ពិធីការផ្ញើសារបន្ទាន់របស់ KAddressbook +Name[ko]=KAddressbook 인스턴트 메시징 프로토콜 +Name[lt]=KAddressbook momentinių žinučių protokolas +Name[ms]=Protokol Penghantaran Mesej Segera KAddressbook +Name[nb]=KAdressbook lynmeldingsprotokoll +Name[nds]=KAddressbook-Kortnarichten-Protokoll +Name[ne]=केडीई ठेगानापुस्तिका दृष्टान्त संदेशन प्रोटोकल +Name[nl]=KAddressbook Instant Messaging-protocol +Name[nn]=Lynmeldingsprotokoll for KDE-adresseboka +Name[pl]=Protokół komunikacji internetowej KAddressbook +Name[pt]=Protocolo de Mensagens Instantâneas do KAdressbook +Name[pt_BR]=Protocolo de Mensagens Instantâneas do KAddressbook +Name[ru]=Протокол обмена сообщениями адресной книги KDE +Name[se]=Šleađgadieđáhusprotokolla KDE-čujuhusgirjji várás +Name[sk]=Protokol pre KDE Adresár Instant Messaging +Name[sl]=Protokol takojšnega sporočanja za Adresar +Name[sr]=KAddressbook протокол тренутних адреса +Name[sr@Latn]=KAddressbook protokol trenutnih adresa +Name[sv]=Direktmeddelandeprotokoll för adressboken +Name[ta]=கேஅட்ரஸ்புக் உடனடி செய்தி பரிமாற்றம் +Name[tg]=Протоколи мубодилаи иттилооти китоби адресии KDE +Name[tr]=KAddressbook Hızlı Mesajlaşma Protokolü +Name[uk]=Протокол миттєвого зв'язку KAddressbook +Name[zh_CN]=KAddressbook 即时通讯协议 +Name[zh_TW]=KAddressbook 即時通訊協定 +[PropertyDef::X-KDE-InstantMessagingKABCField] +Type=QString + diff --git a/kaddressbook/editors/protocols/Makefile.am b/kaddressbook/editors/protocols/Makefile.am new file mode 100644 index 000000000..4ec5576b9 --- /dev/null +++ b/kaddressbook/editors/protocols/Makefile.am @@ -0,0 +1,6 @@ +servicedir = $(kde_servicesdir)/kaddressbook +service_DATA = icqprotocol.desktop aimprotocol.desktop ircprotocol.desktop \ + smsprotocol.desktop gaduprotocol.desktop \ + jabberprotocol.desktop yahooprotocol.desktop \ + msnprotocol.desktop groupwiseprotocol.desktop \ + meanwhileprotocol.desktop skypeprotocol.desktop diff --git a/kaddressbook/editors/protocols/aimprotocol.desktop b/kaddressbook/editors/protocols/aimprotocol.desktop new file mode 100644 index 000000000..e17be1f67 --- /dev/null +++ b/kaddressbook/editors/protocols/aimprotocol.desktop @@ -0,0 +1,63 @@ +[Desktop Entry] +Type=Service +Icon=aim_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/aim +Comment=AIM Protocol +Comment[ar]=ميفاق AIM +Comment[be]=Пратакол AIM +Comment[bg]=Протокол AIM +Comment[br]=Komenad AIM +Comment[bs]=AIM protokol +Comment[ca]=Protocol AIM +Comment[cs]=AIM protokol +Comment[da]=AIM Protokol +Comment[de]=AIM-Protokoll +Comment[el]=Πρωτόκολλο AIM +Comment[eo]=AIM-Protokolo +Comment[es]=Protocolo AIM +Comment[et]=AIM protokoll +Comment[eu]=AIM protokoloa +Comment[fa]=قرارداد AIM +Comment[fi]=AIM-protokolla +Comment[fr]=Protocole AIM +Comment[fy]=AIM-protokol +Comment[ga]=Prótacal AIM +Comment[gl]=Protocolo AIM +Comment[he]=פרוטוקול AIM +Comment[hu]=AIM protokoll +Comment[is]=AIM samskiptamátinn +Comment[it]=Protocollo AIM +Comment[ja]=AIM プロトコル +Comment[ka]=AIM ოქმი +Comment[kk]=AIM протоколы +Comment[km]=ពិធីការ AIM +Comment[ko]=AIM 프로토콜 +Comment[lt]=AIM protokolas +Comment[mk]=AIM-протокол +Comment[ms]=Protokol AIM +Comment[nb]=AIM-protokoll +Comment[nds]=AIM-Protokoll +Comment[ne]=एआईएम प्रोटोकल +Comment[nl]=AIM-protocol +Comment[nn]=AIM-protokoll +Comment[pa]=AIM ਪ੍ਰੋਟੋਕਾਲ +Comment[pl]=Protokół AIM +Comment[pt]=Protocolo AIM +Comment[pt_BR]=Protocolo AIM +Comment[ru]=Протокол AIM +Comment[se]=AIM-protokolla +Comment[sk]=Protokol AIM +Comment[sl]=Protokol AIM +Comment[sr]=AIM протокол +Comment[sr@Latn]=AIM protokol +Comment[sv]=AIM-protokoll +Comment[ta]=AIM நெறிமுறை +Comment[tg]=Протоколи AIM +Comment[tr]=AIM Protokolü +Comment[uk]=Протокол AIM +Comment[zh_CN]=AIM 协议 +Comment[zh_TW]=AIM 協定 +Name=AIM +Name[ne]=एआईएम + diff --git a/kaddressbook/editors/protocols/gaduprotocol.desktop b/kaddressbook/editors/protocols/gaduprotocol.desktop new file mode 100644 index 000000000..96ee6e9ee --- /dev/null +++ b/kaddressbook/editors/protocols/gaduprotocol.desktop @@ -0,0 +1,63 @@ +[Desktop Entry] +Type=Service +Icon=gadu_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/gadu +Comment=Gadu-Gadu Protocol +Comment[af]=Gadu-Gadu protokol +Comment[ar]=ميفاق Gadu-Gadu +Comment[be]=Пратакол Gadu-Gadu +Comment[bg]=Протокол Gadu-Gadu +Comment[br]=Komenad Gadu-Gadu +Comment[bs]=Gadu-Gadu protokol +Comment[ca]=Protocol Gadu-Gadu +Comment[cs]=Gadu-Gadu protokol +Comment[da]=Gadu-Gadu Protokol +Comment[de]=Gadu-Gadu-Protokoll +Comment[el]=Πρωτόκολλο Gadu-Gadu +Comment[eo]=Gadu-Gadu Protokolo +Comment[es]=Protocolo Gadu-Gadu +Comment[et]=Gadu-Gadu protokoll +Comment[eu]=Gadu-Gadu protokoloa +Comment[fa]=قرارداد Gadu-Gadu +Comment[fi]=Gadu-Gadu -protokolla +Comment[fr]=Protocole Gadu-Gadu +Comment[fy]=Gadu-Gadu-protokol +Comment[ga]=Prótacal Gadu-Gadu +Comment[gl]=Protocolo Gadu-Gadu +Comment[he]=פרוטוקול Gadu-Gadu +Comment[hu]=Gadu-Gadu protokoll +Comment[is]=Gadu-Gadu samskiptamátinn +Comment[it]=Protocollo Gadu-Gadu +Comment[ja]=Gadu-Gadu プロトコル +Comment[ka]=Gadu-Gadu ოქმი +Comment[kk]=Gadu-Gadu протоколы +Comment[km]=ពិធីការ Gadu-Gadu +Comment[lt]=Gadu-Gadu protokolas +Comment[mk]=Gadu-Gadu-протокол +Comment[ms]=Protokol Gadu-Gadu +Comment[nb]=Gadu-Gadu-protokoll +Comment[nds]=Gadu-Gadu-Protokoll +Comment[ne]=गाडु-गाडु प्रोटोकल +Comment[nl]=Gadu-Gadu-protocol +Comment[nn]=Gadu-Gadu-protokoll +Comment[pl]=Protokół Gadu-Gadu +Comment[pt]=Protocolo Gadu-Gadu +Comment[pt_BR]=Protocolo Gadu-Gadu +Comment[ru]=протокол Gadu-Gadu +Comment[se]=Gadu-Gadu-protokolla +Comment[sk]=Protokol Gadu-Gadu +Comment[sl]=Protokol Gadu-Gadu +Comment[sr]=Gadu-Gadu протокол +Comment[sr@Latn]=Gadu-Gadu protokol +Comment[sv]=Gadu-Gadu-protokoll +Comment[ta]=கடு-கடு நெறிமுறை +Comment[tg]=протоколи Gadu-Gadu +Comment[tr]=Gadu-Gadu Protokolü +Comment[uk]=Протокол Gadu-Gadu +Comment[zh_CN]=Gadu-Gadu 协议 +Comment[zh_TW]=Gadu-Gadu 協定 +Name=Gadu-Gadu +Name[ne]=गाडु-गाडु +Name[ta]=கடு-கடு + diff --git a/kaddressbook/editors/protocols/groupwiseprotocol.desktop b/kaddressbook/editors/protocols/groupwiseprotocol.desktop new file mode 100644 index 000000000..0ee40fd2e --- /dev/null +++ b/kaddressbook/editors/protocols/groupwiseprotocol.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Icon=groupwise_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/groupwise +Comment=Novell GroupWise Messenger +Comment[af]=Novell GroupWise boodskappe +Comment[bg]=Месинджър Novell GroupWise +Comment[cs]=Novell GroupWise komunikátor +Comment[el]=GroupWise Messenger της Novell +Comment[eo]=Novell GroupWise Mesaĝilo +Comment[es]=Servidor de mensajería de Novell GroupWise +Comment[et]=Novelli GroupWise Messenger +Comment[eu]=Novell GroupWise mezularia +Comment[fa]=مدیر Novell GroupWise +Comment[fr]=Messagerie GroupWise de Novell +Comment[fy]=Novell GroupWise-messenger +Comment[he]=מסנג'ר של Novell GroupWise +Comment[is]=Novell GroupWise Samskiptatólið +Comment[ja]=Novell GroupWise メッセンジャー +Comment[ka]= Novell GroupWise მყისიერი შეტყობინებების მაცნე +Comment[kk]=Novell GroupWise хабарласу +Comment[km]=កម្មវិធីផ្ញើសាររបស់ណូវែល - GroupWise +Comment[lt]=Novell GroupWise momentinių žinučių klientas +Comment[ms]=Pembawa mesej Novell GroupWise +Comment[nds]=Novell-GroupWise-Kortnarichtenmaker +Comment[ne]=नोभेल समूहगत म्यासेन्जर +Comment[nl]=Novell GroupWise-messenger +Comment[pl]=Komunikator Novell GroupWise +Comment[pt_BR]=Mensageiro GroupWise da Novell +Comment[ru]=Обмен сообщениями Novell GroupWise +Comment[sr]=Novell-ов GroupWise Messenger +Comment[sr@Latn]=Novell-ov GroupWise Messenger +Comment[sv]=Novell Groupwise Messenger +Comment[ta]=நோவல் குழுவாரியான செய்தியாளன் +Comment[tr]=Novell GroupWise Mesajlaşma Uygulaması +Comment[zh_CN]=Novell GroupWise 信使 +Name=GroupWise +Name[ne]=समूहगत +Name[sr]=Groupware +Name[sr@Latn]=Groupware +Name[sv]=Groupwise +Name[ta]=குழுவாரியாக + diff --git a/kaddressbook/editors/protocols/icqprotocol.desktop b/kaddressbook/editors/protocols/icqprotocol.desktop new file mode 100644 index 000000000..e071238ed --- /dev/null +++ b/kaddressbook/editors/protocols/icqprotocol.desktop @@ -0,0 +1,61 @@ +[Desktop Entry] +Type=Service +Icon=icq_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/icq +Comment=ICQ Protocol +Comment[af]=ICQ protokol +Comment[be]=Пратакол ICQ +Comment[bg]=Протокол ICQ +Comment[br]=Komenad ICQ +Comment[bs]=ICQ protokol +Comment[ca]=Protocol ICQ +Comment[cs]=ICQ protokol +Comment[da]=ICQ Protokol +Comment[de]=ICQ-Protokoll +Comment[el]=Πρωτόκολλο ICQ +Comment[eo]=ICQ Protokolo +Comment[es]=Protocolo ICQ +Comment[et]=ICQ protokoll +Comment[eu]=ICQ protokoloa +Comment[fa]=قرارداد ICQ +Comment[fi]=ICQ-protokolla +Comment[fr]=Protocole ICQ +Comment[fy]=ICQ-protokol +Comment[ga]=Prótacal ICQ +Comment[gl]=Protocolo ICQ +Comment[he]=פרוטוקול ICQ +Comment[hu]=ICQ protokoll +Comment[is]=ICQ samskiptamátinn +Comment[it]=Protocollo ICQ +Comment[ja]=ICQ プロトコル +Comment[ka]=ICQ ოქმი +Comment[kk]=ICQ протоколы +Comment[km]=ពិធីការ ICQ +Comment[lt]=ICQ protokolas +Comment[mk]=ICQ-протокол +Comment[ms]=Protokol ICQ +Comment[nb]=ICQ-protokoll +Comment[nds]=ICQ-Protokoll +Comment[ne]=आईसीक्यू प्रोटोकल +Comment[nl]=ICQ-protocol +Comment[nn]=ICQ-protokoll +Comment[pl]=Protokół ICQ +Comment[pt]=Protocolo ICQ +Comment[pt_BR]=Protocolo ICQ +Comment[ru]=Протокол ICQ +Comment[se]=ICQ-protokolla +Comment[sk]=Protokol ICQ +Comment[sl]=Protokol ICQ +Comment[sr]=ICQ протокол +Comment[sr@Latn]=ICQ protokol +Comment[sv]=ICQ-protokoll +Comment[ta]=ICQ நெறிமுறை +Comment[tg]=Протоколи ICQ +Comment[tr]=ICQ Protokolü +Comment[uk]=Протокол ICQ +Comment[zh_CN]=ICQ 协议 +Comment[zh_TW]=ICQ 協定 +Name=ICQ +Name[ne]=आईसीक्यू + diff --git a/kaddressbook/editors/protocols/ircprotocol.desktop b/kaddressbook/editors/protocols/ircprotocol.desktop new file mode 100644 index 000000000..78f19447b --- /dev/null +++ b/kaddressbook/editors/protocols/ircprotocol.desktop @@ -0,0 +1,31 @@ +[Desktop Entry] +Type=Service +Icon=irc_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/irc +Comment=Internet Relay Chat +Comment[bg]=Протокол IRC +Comment[fa]=گپ بازپخش اینترنت +Comment[hu]=IRC (Internet Relay Chat) +Comment[is]=Internet spjall +Comment[ja]=インターネットリレーチャット +Comment[ka]=IRC +Comment[kk]=Internet Relay Chat хабарласу +Comment[km]=ជជែកកំសាន្តតាមអ៊ីនធឺណិត +Comment[lt]=Estafetinis Interneto pokalbis +Comment[ne]=इन्टरनेटबाट प्रसारण कुराकानी +Comment[pl]=IRC (Internet Relay Chat) +Comment[pt_BR]=Protocolo de Bate-papo na Internet - IRC +Comment[ru]=IRC +Comment[sl]=Internet Relay Chat (»internetno prenešen klepet«) +Comment[sr]=Ћаскање преко интернета +Comment[sr@Latn]=Ćaskanje preko interneta +Comment[ta]=இணைய வழங்கும் அறட்டை +Comment[tg]=IRC (Internet Relay Chat) +Comment[tr]=İnternet Genel Sohbeti +Comment[uk]=IRChat +Comment[zh_CN]=Internet 聊天 +Comment[zh_TW]=IRC +Name=IRC +Name[ne]=आईआरसी + diff --git a/kaddressbook/editors/protocols/jabberprotocol.desktop b/kaddressbook/editors/protocols/jabberprotocol.desktop new file mode 100644 index 000000000..94b7271b7 --- /dev/null +++ b/kaddressbook/editors/protocols/jabberprotocol.desktop @@ -0,0 +1,63 @@ +[Desktop Entry] +Type=Service +Icon=jabber_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/xmpp +Comment=Jabber Protocol +Comment[af]=Jabber protokol +Comment[ar]=ميفاق Jabber +Comment[be]=Пратакол Jabber +Comment[bg]=Протокол Jabber +Comment[br]=Komenad Jabber +Comment[bs]=Jabber protokol +Comment[ca]=Protocol Jabber +Comment[cs]=Jabber protokol +Comment[da]=Jabber Protokol +Comment[de]=Jabber-Protokoll +Comment[el]=Πρωτόκολλο Jabber +Comment[eo]=Jabber Protokolo +Comment[es]=Protocolo Jabber +Comment[et]=Jabberi protokoll +Comment[eu]=Jabber protokoloa +Comment[fa]=قرارداد Jabber +Comment[fi]=Jabber-protokolla +Comment[fr]=Protocole Jabber +Comment[fy]=Jabber-protokol +Comment[ga]=Prótacal Jabber +Comment[gl]=Protocolo Jabber +Comment[he]=פרוטוקול Jabber +Comment[hu]=Jabber protokoll +Comment[is]=Jabber samskiptamátinn +Comment[it]=Protocollo Jabber +Comment[ja]=Jabber プロトコル +Comment[ka]=Jabber ოქმი +Comment[kk]=Jabber протоколы +Comment[km]=ពិធីការ Jabber +Comment[lt]=Jabber protokolas +Comment[mk]=Jabber-протокол +Comment[ms]=Protokol Jabber +Comment[nb]=Jabber-protokoll +Comment[nds]=Jabber-Protokoll +Comment[ne]=ज्याबर प्रोटोकल +Comment[nl]=Jabber-protocol +Comment[nn]=Jabber-protokoll +Comment[pl]=Protokół Jabber +Comment[pt]=Protocolo Jabber +Comment[pt_BR]=Protocolo Jabber +Comment[ru]=протокол Jabber +Comment[se]=Jabber-protokolla +Comment[sk]=Protokol Jabber +Comment[sl]=Protokol Jabber +Comment[sr]=Jabber протокол +Comment[sr@Latn]=Jabber protokol +Comment[sv]=Jabber-protokoll +Comment[ta]=ஜாபர் நெறிமுறை +Comment[tg]=протоколи Jabber +Comment[tr]=Jabber Protokolü +Comment[uk]=Протокол Jabber +Comment[zh_CN]=Jabber 协议 +Comment[zh_TW]=Jabber 協定 +Name=Jabber +Name[ne]=ज्याबर +Name[ta]=ஜாபர் + diff --git a/kaddressbook/editors/protocols/meanwhileprotocol.desktop b/kaddressbook/editors/protocols/meanwhileprotocol.desktop new file mode 100644 index 000000000..7442cd04d --- /dev/null +++ b/kaddressbook/editors/protocols/meanwhileprotocol.desktop @@ -0,0 +1,61 @@ +[Desktop Entry] +Type=Service +Icon=meanwhile_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/meanwhile +Comment=Meanwhile Protocol +Comment[af]=Meanwhile protokol +Comment[ar]=ميفاق Meanwhile +Comment[be]=Пратакол Meanwhile +Comment[bg]=Протокол Meanwhile +Comment[br]=Komenad Meanwhile +Comment[ca]=Protocol Meanwhile +Comment[cs]=Meanwhile protokol +Comment[da]=Meanwhile Protokol +Comment[de]=Meanwhile-Protokoll +Comment[el]=Πρωτόκολλο Meanwhile +Comment[eo]=Meanwhile Protokolo +Comment[es]=Protocolo Meanwhile +Comment[et]=Meanwhile'i protokoll +Comment[eu]=Meanwhile protokoloa +Comment[fa]=قرارداد در ضمن +Comment[fi]=Meanwhile-protokolla +Comment[fr]=Protocole Meanwhile +Comment[fy]=Meanwhile-protokol +Comment[ga]=Prótacal Meanwhile +Comment[gl]=Protocolo Meanwhile +Comment[he]=פרוטוקול Meanhwile +Comment[hu]=Meanwhile protokoll +Comment[is]=Meanwhile samskiptamátinn +Comment[it]=Protocollo Meanwhile +Comment[ja]=Meanwhile プロトコル +Comment[ka]=Meanwhile ოქმი +Comment[kk]=Meanwhile протоколы +Comment[km]=ពិធីការ Meanwhile +Comment[lt]=Meanwhile protokolas +Comment[mk]=Meanwhile-протокол +Comment[ms]=Protokol Meanwhile +Comment[nb]=Meanwhile-protokoll +Comment[nds]=Meanwhile-Protokoll +Comment[ne]=त्यसै समयको प्रोटोकल +Comment[nl]=Meanwhile-protocol +Comment[nn]=Meanwhile-protokollen +Comment[pl]=Protokół Meanwhile +Comment[pt]=Protocolo Meanwhile +Comment[pt_BR]=Protocolo Meanwhile +Comment[ru]=Протокол Meanwhile +Comment[se]=Meanwhile-protokolla +Comment[sk]=Meanwhile protokol +Comment[sl]=Protokol Meanwhile +Comment[sr]=Meanwhile протокол +Comment[sr@Latn]=Meanwhile protokol +Comment[sv]=Meanwhile-protokoll +Comment[ta]=நெறிமுறை +Comment[tr]=Meanwhile Protokolü +Comment[uk]=Протокол Meanwhile +Comment[zh_CN]=Meanwhile 协议 +Comment[zh_TW]=Meanwhile 協定 +Name=Meanwhile +Name[fa]=در ضمن +Name[ne]=त्यस समयको + diff --git a/kaddressbook/editors/protocols/msnprotocol.desktop b/kaddressbook/editors/protocols/msnprotocol.desktop new file mode 100644 index 000000000..58504fd71 --- /dev/null +++ b/kaddressbook/editors/protocols/msnprotocol.desktop @@ -0,0 +1,34 @@ +[Desktop Entry] +Type=Service +Icon=msn_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/msn +Comment=MSN Messenger +Comment[af]=MSN boodskapper +Comment[bg]=Протокол MSN +Comment[cy]=Negesydd MSN +Comment[eo]=MSN Mesaĝilo +Comment[fa]=پیامرسان MSN +Comment[fr]=Messagerie MSN +Comment[is]=MSN spjallforritið +Comment[ja]=MSN メッセンジャー +Comment[ka]=MSN შიკრიკი +Comment[km]=កម្មវិធីផ្ញើសារ MSN +Comment[nds]=MSN-Kortnarichtenmaker +Comment[ne]=एमएसएन म्यासेन्जर +Comment[pa]=MSN ਸੁਨੇਹਾਦਾਰ +Comment[ta]=MSN மெசஞ்சர் +Comment[tr]=MSN Mesajcısı +Name=MSN Messenger +Name[bg]=MSN +Name[cy]=Negesydd MSN +Name[eo]=MSN Mesaĝilo +Name[fa]=پیامرسان MSN +Name[ja]=MSN メッセンジャー +Name[ka]=MSN შიკრიკი +Name[km]=កម្មវិធីផ្ញើសារ MSN +Name[nds]=MSN-Kortnarichtenmaker +Name[ne]=एमएसएन म्यासेन्जर +Name[ta]=MSN மெசஞ்சர் +Name[tr]=MSN Mesajcısı + diff --git a/kaddressbook/editors/protocols/skypeprotocol.desktop b/kaddressbook/editors/protocols/skypeprotocol.desktop new file mode 100644 index 000000000..60ac34060 --- /dev/null +++ b/kaddressbook/editors/protocols/skypeprotocol.desktop @@ -0,0 +1,53 @@ +[Desktop Entry] +Type=Service +Icon=skype_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/skype +Comment=Skype Internet Telephony +Comment[af]=Skype Internet Telefoon +Comment[bg]=Интернет телефония чрез Skype +Comment[ca]=Telefonia per Internet Skype +Comment[cs]=Internetová telefonie Skype +Comment[da]=Skype internettelefoni +Comment[de]=Internet-Telefonie mit Skype +Comment[eo]=Skype Interreta Telefonado +Comment[es]=Telefonía por internet con Skype +Comment[et]=Internetitelefon Skype +Comment[eu]=Skype-en internet telefonia +Comment[fa]=ارتباط تلفنی اینترنت Skype +Comment[fi]=Skype Internet-puhelin +Comment[fr]=Téléphonie Internet Skype +Comment[fy]=Skype ynternettelefony +Comment[gl]=Telefonía por Internet con Skype +Comment[he]=טלפוניית רשת של Skype +Comment[hu]=Skype internetes telefon +Comment[is]=Skype Internet sími +Comment[it]=Telefonia internet Skype +Comment[ja]=Skype インターネット電話 +Comment[ka]=Skype ინტერნეტ ტელეფონი +Comment[kk]=Skype Интернет телефониясы +Comment[km]=ទូរស័ព្ទតាមអ៊ីនធឺណិតដោយប្រើ Skype +Comment[lt]=Skype Interneto telefonija +Comment[mk]=Интернет-телефонија со Skype +Comment[nb]=Skype IP-telefoni +Comment[nds]=Internet-Telefoneren mit Skype +Comment[ne]=स्काइप इन्टरनेट दूरभाषी +Comment[nl]=Skype internettelefonie +Comment[nn]=Skype Internett-telefoni +Comment[pl]=Skype - telefonia internetowa +Comment[pt]=Telefonia Internet Skype +Comment[pt_BR]=Telefonia via Internet Skype +Comment[ru]=Интернет-телефон Skype +Comment[se]=Skype Interneahtta-telefoniija +Comment[sk]=Skype Internet telefonovanie +Comment[sl]=Internetno telefoniranje Skype +Comment[sr]=Skype интернет телефонија +Comment[sr@Latn]=Skype internet telefonija +Comment[sv]=Skype Internettelefoni +Comment[tr]=Skype İnternet Telefonu +Comment[uk]=Інтернет-телефон Skype +Comment[zh_CN]=Skype Internet 电话 +Comment[zh_TW]=Skype 網路電話 +Name=Skype +Name[eo]=kype +Name[ne]=स्काइप diff --git a/kaddressbook/editors/protocols/smsprotocol.desktop b/kaddressbook/editors/protocols/smsprotocol.desktop new file mode 100644 index 000000000..30b50a1ea --- /dev/null +++ b/kaddressbook/editors/protocols/smsprotocol.desktop @@ -0,0 +1,64 @@ +[Desktop Entry] +Type=Service +Icon=sms_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/sms +Comment=SMS Protocol +Comment[af]=SMS protokol +Comment[be]=Пратакол SMS +Comment[bg]=Протокол SMS +Comment[br]=Komenad SMS +Comment[bs]=SMS poruke +Comment[ca]=Protocol SMS +Comment[cs]=SMS protokol +Comment[da]=SMS Protokol +Comment[de]=SMS-Protokoll +Comment[el]=Πρωτόκολλο SMS +Comment[eo]=SMS Protokolo +Comment[es]=Protocolo SMS +Comment[et]=SMS protokoll +Comment[eu]=SMS protokoloa +Comment[fa]=قرارداد پیام کوتاه +Comment[fi]=SMS-protokolla +Comment[fr]=Protocole SMS +Comment[fy]=SMS-protokol +Comment[ga]=Prótacal SMS +Comment[gl]=Protocolo SMS +Comment[he]=פרוטוקול SMS +Comment[hu]=SMS protokoll +Comment[is]=SMS samskiptamátinn +Comment[it]=Protocollo SMS +Comment[ja]=SMS プロトコル +Comment[ka]= SMS ოქმი +Comment[kk]=SMS протоколы +Comment[km]=ពិធីការសេវាសារខ្លីៗ +Comment[lt]=SMS protokolas +Comment[mk]=SMS-протокол +Comment[ms]=Protokol SMS +Comment[nb]=SMS Protokoll +Comment[nds]=SMS-Protokoll +Comment[ne]=एसएमएस प्रोटोकल +Comment[nl]=SMS-protocol +Comment[nn]=SMS-protokoll +Comment[pl]=Protokół SMS +Comment[pt]=Protocolo SMS +Comment[pt_BR]=Protocolo SMS +Comment[ru]=протокол SMS +Comment[se]=SMS-protokolla +Comment[sk]=Protokol SMS +Comment[sl]=Protokol SMS +Comment[sr]=SMS протокол +Comment[sr@Latn]=SMS protokol +Comment[sv]=SMS-protokoll +Comment[ta]=SMS நெறிமுறை +Comment[tg]=протоколи SMS +Comment[tr]=SMS Protokolü +Comment[uk]=Протокол SMS +Comment[zh_CN]=短信息协议 +Comment[zh_TW]=SMS 協定 +Name=SMS +Name[fa]=پیام کوتاه +Name[km]=សេវាសារខ្លីៗ +Name[ne]=एसएमएस +Name[zh_CN]=短信息 + diff --git a/kaddressbook/editors/protocols/yahooprotocol.desktop b/kaddressbook/editors/protocols/yahooprotocol.desktop new file mode 100644 index 000000000..c3055472e --- /dev/null +++ b/kaddressbook/editors/protocols/yahooprotocol.desktop @@ -0,0 +1,66 @@ +[Desktop Entry] +Type=Service +Icon=yahoo_protocol +ServiceTypes=KABC/IMProtocol,KPluginInfo +X-KDE-InstantMessagingKABCField=messaging/yahoo +Comment=Yahoo Protocol +Comment[af]=Yahoo protokol +Comment[ar]=ميفاق Yahoo +Comment[be]=Пратакол Yahoo +Comment[bg]=Протокол Yahoo +Comment[br]=Komenad Yahoo +Comment[bs]=Yahoo protokol +Comment[ca]=Protocol Yahoo +Comment[cs]=Yahoo protokol +Comment[da]=Yahoo Protokol +Comment[de]=Yahoo!-Protokoll +Comment[el]=Πρωτόκολλο Yahoo +Comment[eo]=Yahoo Protokolo +Comment[es]=Protocolo Yahoo +Comment[et]=Yahoo protokoll +Comment[eu]=Yahoo protokoloa +Comment[fa]=قرارداد یاهو +Comment[fi]=Yahoo-protokolla +Comment[fr]=Protocole Yahoo +Comment[fy]=Yahoo-protokol +Comment[ga]=Prótacal Yahoo +Comment[gl]=Protocolo Yahoo +Comment[he]=פרוטוקול Yahoo +Comment[hu]=Yahoo protokoll +Comment[is]=Yahoo samskiptamátinn +Comment[it]=Protocollo Yahoo +Comment[ja]=Yahoo プロトコル +Comment[ka]=Yahoo ოქმი +Comment[kk]=Yahoo протоколы +Comment[km]=ពិធីការយ៉ាហ៊ូ +Comment[lt]=Yahoo protokolas +Comment[mk]=Yahoo-протокол +Comment[ms]=Protokol Yahoo +Comment[nb]=Yahoo-protokoll +Comment[nds]=Yahoo-Protokoll +Comment[ne]=याहू प्रोटोकल +Comment[nl]=Yahoo-protocol +Comment[nn]=Yahoo-protokoll +Comment[pl]=Protokół Yahoo +Comment[pt]=Protocolo Yahoo +Comment[pt_BR]=Protocolo Yahoo +Comment[ru]=Протокол Yahoo +Comment[se]=Yahoo-protokolla +Comment[sk]=Protokol Yahoo +Comment[sl]=Protokol Yahoo +Comment[sr]=Yahoo протокол +Comment[sr@Latn]=Yahoo protokol +Comment[sv]=Yahoo-protokoll +Comment[ta]=Yahoo நெறிமுறை +Comment[tg]=Протоколи Yahoo +Comment[tr]=Yahoo Protokolü +Comment[uk]=Протокол Yahoo +Comment[zh_CN]=Yahoo 协议 +Comment[zh_TW]=Yahoo 協定 +Name=Yahoo +Name[de]=Yahoo! +Name[fa]=یاهو +Name[km]=យ៉ាហ៊ូ +Name[ne]=याहू +Name[pa]=ਯਾਹੂ + |