Compare commits
3 Commits
6.0_alpha4
...
6.0_alpha5
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fd7e99274 | |||
| bf567146d8 | |||
| 3bade98d2f |
+1
-1
@@ -55,7 +55,7 @@ else()
|
||||
set(KMESS_DISABLE_LIKEBACK 0)
|
||||
endif()
|
||||
|
||||
set(KMESS_VERSION "6.0_alpha4")
|
||||
set(KMESS_VERSION "6.0_alpha5")
|
||||
set(KMESS_ENABLE_DEBUG_OUTPUT 0)
|
||||
set(KMESS_BUILT_DEBUGFULL FALSE)
|
||||
set(HAVE_LIBISFQT 1)
|
||||
|
||||
+15
-14
@@ -192,10 +192,6 @@ ChatWindow::ChatWindow( QWidget *parent )
|
||||
connect( inkPenSize_, SIGNAL( valueChanged(int) ),
|
||||
inkCanvas_, SLOT ( setPenSize(int) ) );
|
||||
|
||||
// Connect the message edit so that if its displayed color changes,
|
||||
// it's checked to match the user's chosen color.
|
||||
connect( messageEdit_, SIGNAL( currentColorChanged(const QColor&) ),
|
||||
this, SLOT ( editorColorChanged(const QColor&) ) );
|
||||
// Connect the docks signals
|
||||
connect( standardEmoticonsDock_, SIGNAL( visibilityChanged(bool) ),
|
||||
this, SLOT ( slotEmoticonDocksToggled() ) );
|
||||
@@ -501,13 +497,6 @@ void ChatWindow::createMenus()
|
||||
nextTabAction_->setText ( i18n("Ne&xt Tab") );
|
||||
nextTabAction_->setIconText( i18n("Ne&xt Tab") );
|
||||
|
||||
// Enable some default action shortcuts (preserve the original ones where needed)
|
||||
nudgeAction_->setShortcut( QKeySequence( "Alt+Z" ) );
|
||||
closeAction->setShortcuts( QList<QKeySequence>() << QKeySequence( "Ctrl+W" ) << closeAction->shortcut() );
|
||||
closeAllAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( "Ctrl+Q" ) << closeAllAction_->shortcut() );
|
||||
prevTabAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( QKeySequence::PreviousChild ) << prevTabAction_->shortcut() );
|
||||
nextTabAction_->setShortcuts( QList<QKeySequence>() << QKeySequence( QKeySequence::NextChild ) << nextTabAction_->shortcut() );
|
||||
|
||||
// Set up the dock actions
|
||||
contactsDockAction = contactsDock_ ->toggleViewAction();
|
||||
standardEmoticonsDockAction = standardEmoticonsDock_->toggleViewAction();
|
||||
@@ -517,19 +506,16 @@ void ChatWindow::createMenus()
|
||||
contactsDockAction->setToolTip( i18n("Enable or disable the contacts panel") );
|
||||
contactsDockAction->setText( i18nc("Toolbar button","Contacts") );
|
||||
contactsDockAction->setIconText( i18nc("Toolbar button","Contacts") );
|
||||
contactsDockAction->setShortcut( QKeySequence( "Ctrl+D" ) );
|
||||
|
||||
standardEmoticonsDockAction->setIcon( QIcon::fromTheme( "face-smile" ) );
|
||||
standardEmoticonsDockAction->setToolTip( i18n("Enable or disable the standard emoticons panel") );
|
||||
standardEmoticonsDockAction->setText( i18nc("Toolbar button","Emoticons") );
|
||||
standardEmoticonsDockAction->setIconText( i18nc("Toolbar button","Emoticons") );
|
||||
standardEmoticonsDockAction->setShortcut( QKeySequence( "Ctrl+E" ) );
|
||||
|
||||
customEmoticonsDockAction->setIcon( QIcon::fromTheme( "face-smile-gearhead-female" ) );
|
||||
customEmoticonsDockAction->setToolTip( i18n("Enable or disable the custom emoticons panel") );
|
||||
customEmoticonsDockAction->setText( i18nc("Toolbar button","My Emoticons") );
|
||||
customEmoticonsDockAction->setIconText( i18nc("Toolbar button","My Emoticons") );
|
||||
customEmoticonsDockAction->setShortcut( QKeySequence( "Ctrl+Y" ) );
|
||||
|
||||
// Add the dock toggling actions to the Panels menu
|
||||
panelsMenuAction_->addAction( contactsDockAction );
|
||||
@@ -601,6 +587,16 @@ void ChatWindow::createMenus()
|
||||
|
||||
// Add actions to actionCollection for "Settings" menu
|
||||
actionCollection_->addAction( "spellCheck", spellCheckAction_ );
|
||||
|
||||
// Enable some default action shortcuts (preserve the original ones where needed)
|
||||
actionCollection_->setDefaultShortcut( nudgeAction_, QKeySequence( "Alt+Z" ) );
|
||||
actionCollection_->setDefaultShortcuts( closeAction, QList<QKeySequence>() << QKeySequence( "Ctrl+W" ) << closeAction->shortcut() );
|
||||
actionCollection_->setDefaultShortcuts( closeAllAction_, QList<QKeySequence>() << QKeySequence( "Ctrl+Q" ) << closeAllAction_->shortcut() );
|
||||
actionCollection_->setDefaultShortcuts( prevTabAction_, QList<QKeySequence>() << QKeySequence( QKeySequence::PreviousChild ) << prevTabAction_->shortcut() );
|
||||
actionCollection_->setDefaultShortcuts( nextTabAction_, QList<QKeySequence>() << QKeySequence( QKeySequence::NextChild ) << nextTabAction_->shortcut() );
|
||||
actionCollection_->setDefaultShortcut( contactsDockAction, QKeySequence( "Ctrl+D" ) );
|
||||
actionCollection_->setDefaultShortcut( standardEmoticonsDockAction, QKeySequence( "Ctrl+E" ) );
|
||||
actionCollection_->setDefaultShortcut( customEmoticonsDockAction, QKeySequence( "Ctrl+Y" ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1660,6 +1656,7 @@ void ChatWindow::sendMessage()
|
||||
// Don't send empty messages
|
||||
if( text.trimmed().isEmpty() )
|
||||
{
|
||||
doSendTypingMessages_ = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1682,6 +1679,8 @@ void ChatWindow::sendMessage()
|
||||
// Handle command. If 'false' is returned, send it anyway.
|
||||
if ( handleCommand( command ) )
|
||||
{
|
||||
doSendTypingMessages_ = true;
|
||||
slotMessageChanged();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1747,6 +1746,8 @@ void ChatWindow::sendMessage()
|
||||
quickRetypeList.append( message.getBody() );
|
||||
lastSentence_ = QString();
|
||||
|
||||
slotMessageChanged();
|
||||
|
||||
// Reset the last sentence counter.
|
||||
// showMessage() updates chatMessages_
|
||||
indexSentences_ = quickRetypeList.size();
|
||||
|
||||
@@ -421,7 +421,7 @@ ContactFrame* ContactsWidget::createContactFrame()
|
||||
this, SIGNAL( contactBlocked( QString, bool ) ) );
|
||||
|
||||
// Add it to the viewBox so it appears in the widget
|
||||
layout_->insertWidget( children().count() - 2, contactFrame );
|
||||
layout_->insertWidget( layout_->count(), contactFrame );
|
||||
|
||||
// put it in the list of frames so we can find it again.
|
||||
contactFrames_.append( contactFrame );
|
||||
|
||||
@@ -2752,7 +2752,7 @@ void MsnNotificationConnection::removeContact(QString handle, bool block)
|
||||
|
||||
// Remove the contact from AB
|
||||
AddressBookService *addressBook = createAddressBookService();;
|
||||
addressBook->deleteContact( contactId );
|
||||
addressBook->deleteContact( contactId, handle );
|
||||
|
||||
// if not blocking, make sure we re-add to the Allow list.
|
||||
// ABContactDelete removes them from the Allow list for some reason. This was what
|
||||
|
||||
@@ -1733,7 +1733,7 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
|
||||
bool capable = true;
|
||||
ContactBase *contact;
|
||||
|
||||
int inkCapabilityFlag;
|
||||
ContactBase::MsnClientCapabilities inkCapabilityFlag;
|
||||
switch( format )
|
||||
{
|
||||
case FORMAT_ISF:
|
||||
@@ -1742,6 +1742,9 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
|
||||
case FORMAT_GIF:
|
||||
inkCapabilityFlag = ContactBase::MSN_CAP_INK_GIF;
|
||||
break;
|
||||
default:
|
||||
kmWarning() << "Refusing to send unsupported ink format:" << format;
|
||||
return;
|
||||
}
|
||||
|
||||
// Verify whether all contacts are capable to view this Ink message or not
|
||||
@@ -1750,14 +1753,14 @@ void MsnSwitchboardConnection::sendInk( InkFormat format, const QByteArray& ink
|
||||
{
|
||||
contact = currentAccount_->getContactByHandle( handle );
|
||||
if( ! contact->hasCapability( ContactBase::MSN_CAP_MULTI_PACKET )
|
||||
|| ! contact->hasCapability( (ContactBase::MsnClientCapabilities)inkCapabilityFlag ) )
|
||||
|| ! contact->hasCapability( inkCapabilityFlag ) )
|
||||
{
|
||||
unsupportingContact = contact;
|
||||
capable = false;
|
||||
#ifdef KMESSDEBUG_SWITCHBOARD_GENERAL
|
||||
kmDebug() << "Contact" << handle << "does not support our wink. "
|
||||
<< "Has multipacket?" << contact->hasCapability( ContactBase::MSN_CAP_MULTI_PACKET )
|
||||
<< "Has this ink type support?" << contact->hasCapability( (ContactBase::MsnClientCapabilities)inkCapabilityFlag );
|
||||
<< "Has this ink type support?" << contact->hasCapability( inkCapabilityFlag );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void AddressBookService::addContactToGroup( const QString &contactId, const QStr
|
||||
|
||||
MessageData data;
|
||||
data.type = "ContactAddToGroup";
|
||||
data.value = groupId;
|
||||
data.value = QStringList() << contactId << groupId;
|
||||
|
||||
sendSecureRequest( new SoapMessage( SERVICE_URL_ADDRESSBOOK,
|
||||
"http://www.msn.com/webservices/AddressBook/ABGroupContactAdd",
|
||||
@@ -299,7 +299,7 @@ void AddressBookService::contactUpdate( ContactProperty property, const QString
|
||||
|
||||
|
||||
|
||||
void AddressBookService::deleteContact( const QString &contactId )
|
||||
void AddressBookService::deleteContact( const QString &contactId, const QString &handle )
|
||||
{
|
||||
QString body( "<ABContactDelete xmlns=\"http://www.msn.com/webservices/AddressBook\">\n"
|
||||
" <abId>00000000-0000-0000-0000-000000000000</abId>\n"
|
||||
@@ -312,7 +312,7 @@ void AddressBookService::deleteContact( const QString &contactId )
|
||||
|
||||
MessageData data;
|
||||
data.type = "ContactDelete";
|
||||
data.value = contactId;
|
||||
data.value = QStringList() << contactId << handle;
|
||||
|
||||
sendSecureRequest( new SoapMessage( SERVICE_URL_ADDRESSBOOK,
|
||||
"http://www.msn.com/webservices/AddressBook/ABContactDelete",
|
||||
@@ -950,12 +950,18 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
emit contactAdded( handle, contactId, groupsId );
|
||||
emit addressBookChanged( handle, ContactAdded );
|
||||
}
|
||||
else if( ! handle.isEmpty() )
|
||||
{
|
||||
kmWarning() << "Contact add response did not include a contact id; refreshing address book.";
|
||||
retrieveAddressBook();
|
||||
}
|
||||
}
|
||||
else if( data.type == "ContactDelete" )
|
||||
{
|
||||
// A contact was deleted from the AB
|
||||
const QString contactId( data.value.toString() );
|
||||
const QString handle (data.value.toString() );
|
||||
const QStringList info ( data.value.toStringList() );
|
||||
const QString contactId( info.value( 0 ) );
|
||||
const QString handle ( info.value( 1 ) );
|
||||
|
||||
if( ! contactId.isEmpty() )
|
||||
{
|
||||
@@ -986,8 +992,14 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
{
|
||||
// A contact was added to a group
|
||||
|
||||
const QString groupId ( data.value.toString() );
|
||||
const QString contactId( body.elementsByTagName( "guid" ).item(0).toElement().text() );
|
||||
const QStringList info( data.value.toStringList() );
|
||||
QString contactId( body.elementsByTagName( "guid" ).item(0).toElement().text() );
|
||||
const QString groupId( info.value( 1 ) );
|
||||
|
||||
if( contactId.isEmpty() )
|
||||
{
|
||||
contactId = info.value( 0 );
|
||||
}
|
||||
|
||||
if( ! contactId.isEmpty() && ! groupId.isEmpty() )
|
||||
{
|
||||
@@ -1020,6 +1032,11 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
emit groupAdded( groupId, name );
|
||||
emit addressBookChanged( groupId, GroupAdded );
|
||||
}
|
||||
else if( ! name.isEmpty() )
|
||||
{
|
||||
kmWarning() << "Group add response did not include a group id; refreshing address book.";
|
||||
retrieveAddressBook();
|
||||
}
|
||||
}
|
||||
else if( data.type == "GroupDelete" )
|
||||
{
|
||||
@@ -1030,7 +1047,7 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
if( ! groupId.isEmpty() )
|
||||
{
|
||||
emit groupDeleted( groupId, name );
|
||||
emit addressBookChanged( name, GroupDeleted );
|
||||
emit addressBookChanged( groupId, GroupDeleted );
|
||||
}
|
||||
}
|
||||
else if( data.type == "GroupRename" )
|
||||
@@ -1043,7 +1060,7 @@ void AddressBookService::parseSecureResult( SoapMessage *message )
|
||||
if( ! groupId.isEmpty() && ! name.isEmpty() )
|
||||
{
|
||||
emit groupRenamed( groupId, name );
|
||||
emit addressBookChanged( name, GroupRenamed );
|
||||
emit addressBookChanged( groupId, GroupRenamed );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -73,7 +73,7 @@ class AddressBookService : public PassportLoginService
|
||||
// Put the Soap action to update the information about contact
|
||||
void contactUpdate( ContactProperty property, const QString &newValue );
|
||||
// Delete contact
|
||||
void deleteContact( const QString &contactId );
|
||||
void deleteContact( const QString &contactId, const QString &handle );
|
||||
// Delete contact from group
|
||||
void deleteContactFromGroup( const QString &contactId, const QString &groupId );
|
||||
// Delete group
|
||||
|
||||
Reference in New Issue
Block a user