|
|
|
@ -290,43 +290,43 @@ void TokenProvider::init()
|
|
|
|
|
|
|
|
|
|
category.tokens.clear();
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_NAME, i18n("Name") ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_GIVEN_NAME, KABC::Addressee::givenNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_FAMILY_NAME, KABC::Addressee::familyNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_EMAIL, KABC::Addressee::emailLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_GIVEN_NAME, TDEABC::Addressee::givenNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_FAMILY_NAME, TDEABC::Addressee::familyNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_EMAIL, TDEABC::Addressee::emailLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_FULL_EMAIL, i18n("Full E-Mail") ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_PREF, KABC::PhoneNumber::label( KABC::PhoneNumber::Pref ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_HOME, KABC::PhoneNumber::label( KABC::PhoneNumber::Home ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_WORK, KABC::PhoneNumber::label( KABC::PhoneNumber::Work ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_MSG, KABC::PhoneNumber::label( KABC::PhoneNumber::Msg ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_VOICE, KABC::PhoneNumber::label( KABC::PhoneNumber::Voice ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_FAX, KABC::PhoneNumber::label( KABC::PhoneNumber::Fax ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_CELL, KABC::PhoneNumber::label( KABC::PhoneNumber::Cell ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_VIDEO, KABC::PhoneNumber::label( KABC::PhoneNumber::Video ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_BBS, KABC::PhoneNumber::label( KABC::PhoneNumber::Bbs ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_MODEM, KABC::PhoneNumber::label( KABC::PhoneNumber::Modem ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_CAR, KABC::PhoneNumber::label( KABC::PhoneNumber::Car ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_ISDN, KABC::PhoneNumber::label( KABC::PhoneNumber::Isdn ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_PCS, KABC::PhoneNumber::label( KABC::PhoneNumber::Pcs ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_PAGER, KABC::PhoneNumber::label( KABC::PhoneNumber::Pager ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_POB, KABC::Address::postOfficeBoxLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_EXTENDED, KABC::Address::extendedLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_STREET, KABC::Address::streetLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_LOCALITY, KABC::Address::localityLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_REGION, KABC::Address::regionLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_POSTALCODE, KABC::Address::postalCodeLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_COUNTRY, KABC::Address::countryLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_LABEL, KABC::Address::labelLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_PREF, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Pref ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_HOME, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Home ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_WORK, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Work ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_MSG, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Msg ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_VOICE, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Voice ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_FAX, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Fax ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_CELL, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Cell ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_VIDEO, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Video ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_BBS, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Bbs ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_MODEM, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Modem ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_CAR, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Car ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_ISDN, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Isdn ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_PCS, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Pcs ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PHONE_PAGER, TDEABC::PhoneNumber::label( TDEABC::PhoneNumber::Pager ) ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_POB, TDEABC::Address::postOfficeBoxLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_EXTENDED, TDEABC::Address::extendedLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_STREET, TDEABC::Address::streetLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_LOCALITY, TDEABC::Address::localityLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_REGION, TDEABC::Address::regionLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_POSTALCODE, TDEABC::Address::postalCodeLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_COUNTRY, TDEABC::Address::countryLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDRESS_LABEL, TDEABC::Address::labelLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS, i18n("Formatted Address") ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_URL, KABC::Addressee::urlLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_NICK, KABC::Addressee::nickNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDITIONAL_NAME, KABC::Addressee::additionalNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PREFIX, KABC::Addressee::prefixLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_SUFFIX, KABC::Addressee::suffixLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_BIRTHDAY, KABC::Addressee::birthdayLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_TITLE, KABC::Addressee::titleLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ROLE, KABC::Addressee::roleLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_NOTE, KABC::Addressee::noteLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ORGANIZATION, KABC::Addressee::organizationLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_URL, TDEABC::Addressee::urlLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_NICK, TDEABC::Addressee::nickNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ADDITIONAL_NAME, TDEABC::Addressee::additionalNameLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_PREFIX, TDEABC::Addressee::prefixLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_SUFFIX, TDEABC::Addressee::suffixLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_BIRTHDAY, TDEABC::Addressee::birthdayLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_TITLE, TDEABC::Addressee::titleLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ROLE, TDEABC::Addressee::roleLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_NOTE, TDEABC::Addressee::noteLabel() ) );
|
|
|
|
|
category.tokens.append( tToken( TOK_ADDRESS_ORGANIZATION, TDEABC::Addressee::organizationLabel() ) );
|
|
|
|
|
category.category = CAT_ADDRESS;
|
|
|
|
|
s_categories.append( category );
|
|
|
|
|
}
|
|
|
|
@ -600,10 +600,10 @@ TQString TokenProvider::processAddresses( const TQString & t )
|
|
|
|
|
if( !m_address || !t.startsWith( "address" ) )
|
|
|
|
|
return ret;
|
|
|
|
|
|
|
|
|
|
KABC::Address addr = m_address->address( KABC::Address::Pref );
|
|
|
|
|
TDEABC::Address addr = m_address->address( TDEABC::Address::Pref );
|
|
|
|
|
if( addr.isEmpty() )
|
|
|
|
|
{
|
|
|
|
|
KABC::Address::List list = m_address->addresses();
|
|
|
|
|
TDEABC::Address::List list = m_address->addresses();
|
|
|
|
|
for( int i=0;i<list.count();i++ )
|
|
|
|
|
if( !list[i].isEmpty() )
|
|
|
|
|
{
|
|
|
|
@ -639,72 +639,72 @@ TQString TokenProvider::processAddresses( const TQString & t )
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_PREF )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Pref ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Pref ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_HOME )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Home ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Home ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_WORK )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Work ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Work ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_MSG )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Msg ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Msg ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_VOICE )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Voice ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Voice ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_FAX )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Fax ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Fax ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_CELL )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Cell ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Cell ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_VIDEO )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Video ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Video ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_BBS )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Bbs ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Bbs ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_MODEM )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Modem ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Modem ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_CAR )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Car ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Car ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_ISDN )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Isdn ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Isdn ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_PCS )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Pcs ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Pcs ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_PHONE_PAGER )
|
|
|
|
|
{
|
|
|
|
|
ret = m_address->phoneNumber( KABC::PhoneNumber::Pager ).number();
|
|
|
|
|
ret = m_address->phoneNumber( TDEABC::PhoneNumber::Pager ).number();
|
|
|
|
|
found = true;
|
|
|
|
|
}
|
|
|
|
|
else if( t == TOK_ADDRESS_ADDRESS_POB )
|
|
|
|
|