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

List:       kde-commits
Subject:    KDE/kdenetwork/kopete/kopete/chatwindow
From:       Matt Rogers <mattr () kde ! org>
Date:       2009-09-12 3:52:13
Message-ID: 1252727533.395974.7476.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1022574 by mattr:

Add the ability to put tabs on the left or right in the chatwindow

Patch by Joseph Razavi. Thanks!

FEATURE: 179988

 M  +14 -6     kopetechatwindow.cpp  


--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.cpp #1022573:1022574
@@ -1128,19 +1128,27 @@
 
 	action = placementMenu->addAction( i18n("Bottom") );
 	action->setData( 1 );
+
+	action = placementMenu->addAction( i18n("Left") );
+	action->setData( 2 );
+
+	action = placementMenu->addAction( i18n("Right") );
+	action->setData( 3 );
 }
 
 void KopeteChatWindow::slotPlaceTabs( QAction *action )
 {
 	int placement = action->data().toInt();
+
 	if( m_tabBar )
 	{
-
-		if( placement == 0 )
-			m_tabBar->setTabPosition( QTabWidget::North );
-		else
-			m_tabBar->setTabPosition( QTabWidget::South );
-
+		switch( placement )
+		{
+		case 1 : m_tabBar->setTabPosition( QTabWidget::South ); break;
+		case 2 : m_tabBar->setTabPosition( QTabWidget::West  ); break;
+		case 3 : m_tabBar->setTabPosition( QTabWidget::East  ); break;
+		default: m_tabBar->setTabPosition( QTabWidget::North );
+		}
 		saveOptions();
 	}
 }
[prev in list] [next in list] [prev in thread] [next in thread] 

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