diff options
Diffstat (limited to 'kopete/kopete/chatwindow/chatview.cpp')
-rw-r--r-- | kopete/kopete/chatwindow/chatview.cpp | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/kopete/kopete/chatwindow/chatview.cpp b/kopete/kopete/chatwindow/chatview.cpp index f2b80969..4f356690 100644 --- a/kopete/kopete/chatwindow/chatview.cpp +++ b/kopete/kopete/chatwindow/chatview.cpp @@ -81,7 +81,7 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch m_mainWindow = 0L; membersDock = 0L; - memberstqStatus = Smart; + membersStatus = Smart; m_tabState = Normal; @@ -89,8 +89,8 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch hide(); //Create the view dock widget (KHTML Part), and set it to no docking (lock it in place) - viewDock = createDockWidget(TQString::tqfromLatin1( "viewDock" ), TQPixmap(), - 0L,TQString::tqfromLatin1("viewDock"), TQString::tqfromLatin1(" ")); + viewDock = createDockWidget(TQString::fromLatin1( "viewDock" ), TQPixmap(), + 0L,TQString::fromLatin1("viewDock"), TQString::fromLatin1(" ")); m_messagePart = new ChatMessagePart( mgr, viewDock, "m_messagePart" ); viewDock->setWidget(messagePart()->widget()); @@ -98,8 +98,8 @@ ChatView::ChatView( Kopete::ChatSession *mgr, ChatWindowPlugin *parent, const ch viewDock->setEnableDocking(KDockWidget::DockNone); //Create the bottom dock widget, with the edit area, statusbar and send button - editDock = createDockWidget( TQString::tqfromLatin1( "editDock" ), TQPixmap(), - 0L, TQString::tqfromLatin1("editDock"), TQString::tqfromLatin1(" ") ); + editDock = createDockWidget( TQString::fromLatin1( "editDock" ), TQPixmap(), + 0L, TQString::fromLatin1("editDock"), TQString::fromLatin1(" ") ); m_editPart = new ChatTextEditPart( mgr, editDock, "kopeterichtexteditpart" ); // FIXME: is this used these days? it seems totally unnecessary @@ -310,14 +310,14 @@ void ChatView::makeVisible() { m_mainWindow = KopeteChatWindow::window( m_manager ); // if ( root ) -// root->tqrepaint( true ); +// root->repaint( true ); emit windowCreated(); } if ( !m_mainWindow->isVisible() ) { m_mainWindow->show(); - // scroll down post show and tqlayout, otherwise the tqgeometry is wrong to scroll to the bottom. + // scroll down post show and layout, otherwise the geometry is wrong to scroll to the bottom. m_messagePart->keepScrolledDown(); } @@ -353,22 +353,22 @@ bool ChatView::closeView( bool force ) shortCaption = KStringHandler::rsqueeze( shortCaption ); response = KMessageBox::warningContinueCancel( this, i18n("<qt>You are about to leave the group chat session <b>%1</b>.<br>" - "You will not receive future messages from this conversation.</qt>").tqarg( shortCaption ), i18n( "Closing Group Chat" ), - i18n( "Cl&ose Chat" ), TQString::tqfromLatin1( "AskCloseGroupChat" ) ); + "You will not receive future messages from this conversation.</qt>").arg( shortCaption ), i18n( "Closing Group Chat" ), + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseGroupChat" ) ); } if ( !unreadMessageFrom.isNull() && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n("<qt>You have received a message from <b>%1</b> in the last " - "second. Are you sure you want to close this chat?</qt>").tqarg( unreadMessageFrom ), i18n( "Unread Message" ), - i18n( "Cl&ose Chat" ), TQString::tqfromLatin1("AskCloseChatRecentMessage" ) ); + "second. Are you sure you want to close this chat?</qt>").arg( unreadMessageFrom ), i18n( "Unread Message" ), + i18n( "Cl&ose Chat" ), TQString::fromLatin1("AskCloseChatRecentMessage" ) ); } if ( d->sendInProgress && ( response == KMessageBox::Continue ) ) { response = KMessageBox::warningContinueCancel( this, i18n( "You have a message send in progress, which will be " "aborted if this chat is closed. Are you sure you want to close this chat?" ), i18n( "Message in Transit" ), - i18n( "Cl&ose Chat" ), TQString::tqfromLatin1( "AskCloseChatMessageInProgress" ) ); + i18n( "Cl&ose Chat" ), TQString::fromLatin1( "AskCloseChatMessageInProgress" ) ); } } @@ -418,8 +418,8 @@ void ChatView::createMembersList() if ( !membersDock ) { //Create the chat members list - membersDock = createDockWidget( TQString::tqfromLatin1( "membersDock" ), TQPixmap(), 0L, - TQString::tqfromLatin1( "membersDock" ), TQString::tqfromLatin1( " " ) ); + membersDock = createDockWidget( TQString::fromLatin1( "membersDock" ), TQPixmap(), 0L, + TQString::fromLatin1( "membersDock" ), TQString::fromLatin1( " " ) ); m_membersList = new ChatMembersListWidget( m_manager, this, "m_membersList" ); membersDock->setWidget( m_membersList ); @@ -428,21 +428,21 @@ void ChatView::createMembersList() if ( members.first() && members.first()->metaContact() != 0 ) { - memberstqStatus = static_cast<MembersListPolicy> + membersStatus = static_cast<MembersListPolicy> ( members.first()->metaContact()->pluginData - ( m_manager->protocol(), TQString::tqfromLatin1( "MembersListPolicy" ) ).toInt() + ( m_manager->protocol(), TQString::fromLatin1( "MembersListPolicy" ) ).toInt() ); } else { - memberstqStatus = Smart; + membersStatus = Smart; } - if( memberstqStatus == Smart ) + if( membersStatus == Smart ) d->visibleMembers = ( m_manager->members().count() > 1 ); else - d->visibleMembers = ( memberstqStatus == Visible ); + d->visibleMembers = ( membersStatus == Visible ); placeMembersList( membersDockPosition ); } @@ -453,13 +453,13 @@ void ChatView::toggleMembersVisibility() if( membersDock ) { d->visibleMembers = !d->visibleMembers; - memberstqStatus = d->visibleMembers ? Visible : Hidden; + membersStatus = d->visibleMembers ? Visible : Hidden; placeMembersList( membersDockPosition ); Kopete::ContactPtrList members = m_manager->members(); if ( members.first()->metaContact() ) { members.first()->metaContact()->setPluginData( m_manager->protocol(), - TQString::tqfromLatin1( "MembersListPolicy" ), TQString::number(memberstqStatus) ); + TQString::fromLatin1( "MembersListPolicy" ), TQString::number(membersStatus) ); } //refreshView(); } @@ -467,7 +467,7 @@ void ChatView::toggleMembersVisibility() void ChatView::placeMembersList( KDockWidget::DockPosition dp ) { -// kdDebug(14000) << k_funcinfo << "Members list policy " << memberstqStatus << +// kdDebug(14000) << k_funcinfo << "Members list policy " << membersStatus << // ", visible " << d->visibleMembers << endl; if ( d->visibleMembers ) @@ -476,17 +476,17 @@ void ChatView::placeMembersList( KDockWidget::DockPosition dp ) // look up the dock width int dockWidth; - KGlobal::config()->setGroup( TQString::tqfromLatin1( "ChatViewDock" ) ); + KGlobal::config()->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); if( membersDockPosition == KDockWidget::DockLeft ) { dockWidth = KGlobal::config()->readNumEntry( - TQString::tqfromLatin1( "membersDock,viewDock:sepPos" ), 30); + TQString::fromLatin1( "membersDock,viewDock:sepPos" ), 30); } else { dockWidth = KGlobal::config()->readNumEntry( - TQString::tqfromLatin1( "viewDock,membersDock:sepPos" ), 70); + TQString::fromLatin1( "viewDock,membersDock:sepPos" ), 70); } // Make sure it is shown then place it wherever @@ -547,11 +547,11 @@ void ChatView::remoteTyping( const Kopete::Contact *contact, bool isTyping ) if( !typingList.isEmpty() ) { if ( typingList.count() == 1 ) - setStatusText( i18n( "%1 is typing a message" ).tqarg( typingList.first() ) ); + setStatusText( i18n( "%1 is typing a message" ).arg( typingList.first() ) ); else { - TQString statusTyping = typingList.join( TQString::tqfromLatin1( ", " ) ); - setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).tqarg( statusTyping ) ); + TQString statusTyping = typingList.join( TQString::fromLatin1( ", " ) ); + setStatusText( i18n( "%1 is a list of names", "%1 are typing a message" ).arg( statusTyping ) ); } updateChatState( Typing ); } @@ -565,7 +565,7 @@ void ChatView::setStatusText( const TQString &status ) { d->statusText = status; if ( d->isActive ) - m_mainWindow->settqStatus( status ); + m_mainWindow->setStatus( status ); } const TQString& ChatView::statusText() @@ -631,9 +631,9 @@ void ChatView::slotContactAdded(const Kopete::Contact *contact, bool suppress) } if( !suppress && m_manager->members().count() > 1 ) - sendInternalMessage( i18n("%1 has joined the chat.").tqarg(contactName) ); + sendInternalMessage( i18n("%1 has joined the chat.").arg(contactName) ); - if( memberstqStatus == Smart && membersDock ) + if( membersStatus == Smart && membersDock ) { bool shouldShowMembers = ( m_manager->members().count() > 1); if( shouldShowMembers != d->visibleMembers ) @@ -682,9 +682,9 @@ void ChatView::slotContactRemoved( const Kopete::Contact *contact, const TQStrin if ( !suppressNotification ) { if ( reason.isEmpty() ) - sendInternalMessage( i18n( "%1 has left the chat." ).tqarg( contactName ), format ) ; + sendInternalMessage( i18n( "%1 has left the chat." ).arg( contactName ), format ) ; else - sendInternalMessage( i18n( "%1 has left the chat (%2)." ).tqarg( contactName, reason ), format); + sendInternalMessage( i18n( "%1 has left the chat (%2)." ).arg( contactName, reason ), format); } } @@ -711,7 +711,7 @@ void ChatView::setCaption( const TQString &text, bool modified ) //Call the original set caption KDockMainWindow::setCaption( newCaption, false ); - emit updateChatTooltip( this, TQString::tqfromLatin1("<qt>%1</qt>").tqarg( d->captionText ) ); + emit updateChatTooltip( this, TQString::fromLatin1("<qt>%1</qt>").arg( d->captionText ) ); emit updateChatLabel( this, newCaption ); //Blink icon if modified and not active if( !d->isActive && modified ) @@ -773,18 +773,18 @@ void ChatView::slotToggleRtfToolbar( bool enabled ) emit rtfEnabled( this, enabled ); } -void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newtqStatus, const Kopete::OnlineStatus &oldtqStatus ) +void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete::OnlineStatus &newStatus, const Kopete::OnlineStatus &oldStatus ) { kdDebug(14000) << k_funcinfo << contact << endl; - bool inhibitNotification = ( newtqStatus.status() == Kopete::OnlineStatus::Unknown || - oldtqStatus.status() == Kopete::OnlineStatus::Unknown ); + bool inhibitNotification = ( newStatus.status() == Kopete::OnlineStatus::Unknown || + oldStatus.status() == Kopete::OnlineStatus::Unknown ); if ( contact && KopetePrefs::prefs()->showEvents() && !inhibitNotification ) { if ( contact->account() && contact == contact->account()->myself() ) { // Separate notification for the 'self' contact - if ( newtqStatus.status() != Kopete::OnlineStatus::Connecting ) - sendInternalMessage( i18n( "You are now marked as %1." ).tqarg( newtqStatus.description() ) ); + if ( newStatus.status() != Kopete::OnlineStatus::Connecting ) + sendInternalMessage( i18n( "You are now marked as %1." ).arg( newStatus.description() ) ); } else if ( !contact->account() || !contact->account()->suppressStatusNotification() ) { @@ -792,13 +792,13 @@ void ChatView::slotContactStatusChanged( Kopete::Contact *contact, const Kopete: if ( contact->metaContact() && contact->metaContact() != Kopete::ContactList::self()->myself() ) { sendInternalMessage( i18n( "%2 is now %1." ) - .tqarg( newtqStatus.description(), contact->metaContact()->displayName() ) ); + .arg( newStatus.description(), contact->metaContact()->displayName() ) ); } else { TQString nick=contact->nickName(); sendInternalMessage( i18n( "%2 is now %1." ) - .tqarg( newtqStatus.description(), nick ) ); + .arg( newStatus.description(), nick ) ); } } } @@ -835,9 +835,9 @@ void ChatView::saveOptions() { KConfig *config = KGlobal::config(); - writeDockConfig ( config, TQString::tqfromLatin1( "ChatViewDock" ) ); - config->setGroup( TQString::tqfromLatin1( "ChatViewDock" ) ); - config->writeEntry( TQString::tqfromLatin1( "membersDockPosition" ), membersDockPosition ); + writeDockConfig ( config, TQString::fromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); + config->writeEntry( TQString::fromLatin1( "membersDockPosition" ), membersDockPosition ); saveChatSettings(); config->sync(); } @@ -859,7 +859,7 @@ void ChatView::saveChatSettings() KConfig* config = KGlobal::config(); - TQString contactListGroup = TQString::tqfromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + mc->metaContactId(); config->setGroup( contactListGroup ); @@ -875,7 +875,7 @@ void ChatView::loadChatSettings() return; //can't load with more than one other person in the chat //read settings for metacontact - TQString contactListGroup = TQString::tqfromLatin1("chatwindow_") + + TQString contactListGroup = TQString::fromLatin1("chatwindow_") + contacts.first()->metaContact()->metaContactId(); KConfig* config = KGlobal::config(); config->setGroup( contactListGroup ); @@ -891,24 +891,24 @@ void ChatView::readOptions() KConfig *config = KGlobal::config(); /** THIS IS BROKEN !!! */ - //dockManager->readConfig ( config, TQString::tqfromLatin1("ChatViewDock") ); + //dockManager->readConfig ( config, TQString::fromLatin1("ChatViewDock") ); //Work-around to restore dock widget positions - config->setGroup( TQString::tqfromLatin1( "ChatViewDock" ) ); + config->setGroup( TQString::fromLatin1( "ChatViewDock" ) ); membersDockPosition = static_cast<KDockWidget::DockPosition>( - config->readNumEntry( TQString::tqfromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); + config->readNumEntry( TQString::fromLatin1( "membersDockPosition" ), KDockWidget::DockRight ) ); - TQString dockKey = TQString::tqfromLatin1( "viewDock" ); + TQString dockKey = TQString::fromLatin1( "viewDock" ); if ( d->visibleMembers ) { if( membersDockPosition == KDockWidget::DockLeft ) - dockKey.prepend( TQString::tqfromLatin1( "membersDock," ) ); + dockKey.prepend( TQString::fromLatin1( "membersDock," ) ); else if( membersDockPosition == KDockWidget::DockRight ) - dockKey.append( TQString::tqfromLatin1( ",membersDock" ) ); + dockKey.append( TQString::fromLatin1( ",membersDock" ) ); } - dockKey.append( TQString::tqfromLatin1( ",editDock:sepPos" ) ); + dockKey.append( TQString::fromLatin1( ",editDock:sepPos" ) ); //kdDebug(14000) << k_funcinfo << "reading splitterpos from key: " << dockKey << endl; int splitterPos = config->readNumEntry( dockKey, 70 ); editDock->manualDock( viewDock, KDockWidget::DockBottom, splitterPos ); @@ -937,7 +937,7 @@ void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->tqencodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { TQString contact=lst[2]; @@ -959,7 +959,7 @@ void ChatView::dragEnterEvent ( TQDragEnterEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - TQString metacontactID=TQString::fromUtf8(event->tqencodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if( m && m_manager->mayInvite()) @@ -993,7 +993,7 @@ void ChatView::dropEvent ( TQDropEvent * event ) { if( event->provides( "kopete/x-contact" ) ) { - TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->tqencodedData ( "kopete/x-contact" )) ); + TQStringList lst=TQStringList::split( TQChar( 0xE000 ) , TQString::fromUtf8(event->encodedData ( "kopete/x-contact" )) ); if(m_manager->mayInvite() && m_manager->protocol()->pluginId() == lst[0] && m_manager->account()->accountId() == lst[1]) { TQString contact=lst[2]; @@ -1014,7 +1014,7 @@ void ChatView::dropEvent ( TQDropEvent * event ) } else if( event->provides( "kopete/x-metacontact" ) ) { - TQString metacontactID=TQString::fromUtf8(event->tqencodedData ( "kopete/x-metacontact" )); + TQString metacontactID=TQString::fromUtf8(event->encodedData ( "kopete/x-metacontact" )); Kopete::MetaContact *m=Kopete::ContactList::self()->metaContact(metacontactID); if(m && m_manager->mayInvite()) { |