[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenonbeta/kopete/libkopete/ui
From:       Richard Smith <kde () metafoo ! co ! uk>
Date:       2003-03-22 14:01:53
[Download RAW message or body]

CVS commit by lilachaze: 

Partially fixed a subtle bug with the message bubble


  M +11 -8     kopetechatwindow.cpp   1.207


--- kdenonbeta/kopete/libkopete/ui/kopetechatwindow.cpp  #1.206:1.207
@@ -431,7 +431,4 @@ KopeteView *KopeteChatWindow::addChatVie
         ChatView *newView = new ChatView ( manager, this, pluginIcon, mainArea );
 
-        if( chatViewList.isEmpty() )
-                attachChatView(newView);
-
         return newView;
 }
@@ -507,13 +504,19 @@ void KopeteChatWindow::deleteTabBar()
 void KopeteChatWindow::attachChatView( ChatView* newView )
 {
-        if( !chatViewList.isEmpty() )
+        chatViewList.append( newView );
+
+        switch( chatViewList.count() )
         {
+        case 1:
+                setPrimaryChatView( newView );
+                break;
+        case 2:
                 createTabBar();
+                break;
+        default:
                 addTab( newView );
+                break;
         }
-        else
-                setPrimaryChatView( newView );
 
-        chatViewList.append( newView );
         newView->setMainWindow( this );
 
@@ -652,5 +655,5 @@ void KopeteChatWindow::setActiveView( QW
                 return;
 
-        if( chatViewList.count() > 0 && !view->docked() )
+        if( !chatViewList.contains( view ) )
                 attachChatView( view );
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic