[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete
From: Lamarque Souza <lamarque () gmail ! com>
Date: 2011-07-03 1:24:38
Message-ID: 20110703012438.6326FAC775 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1239129 by lvsouza:
Allows to hide the contact name and close button in chat window.
Just go to menu -> Configurations -> Configure -> Chat window -> Tabs.
CCBUG: 168682
M +12 -4 kopete/chatwindow/kopetechatwindow.cpp
M +2 -0 kopete/chatwindow/kopetechatwindow.h
M +2 -1 kopete/config/chatwindow/CMakeLists.txt
M +7 -0 kopete/config/chatwindow/chatwindowconfig.cpp
M +3 -0 kopete/config/chatwindow/chatwindowconfig.h
M +8 -0 libkopete/kopetebehaviorsettings.kcfg
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.cpp \
#1239128:1239129 @@ -653,12 +653,13 @@
m_tabBar = new KTabWidget( mainArea );
m_tabBar->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, \
QSizePolicy::Expanding ) );
- m_tabBar->setTabsClosable(cg.readEntry( QLatin1String("HoverClose"), false ));
+ m_tabBar->setTabsClosable(cg.readEntry( QLatin1String("HoverClose"), true ));
m_tabBar->setMovable(true);
m_tabBar->setAutomaticResizeTabs(true);
- m_tabBar->setTabsClosable(true);
connect( m_tabBar, SIGNAL( closeRequest( QWidget* )), this, SLOT( slotCloseChat( \
QWidget* ) ) );
+ m_UpdateChatLabel = cg.readEntry( QLatin1String("ShowContactName"), true );
+
QToolButton* m_rightWidget = new QToolButton( m_tabBar );
connect( m_rightWidget, SIGNAL( clicked() ), this, SLOT( slotChatClosed() ) );
m_rightWidget->setIcon( SmallIcon( "tab-close" ) );
@@ -713,13 +714,17 @@
view->move( QPoint() );
//view->show();
- m_tabBar->addTab( view, pluginIcon, view->caption() );
+ m_tabBar->addTab( view, pluginIcon, "");
view->setVisible(view == m_activeView);
+ connect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( \
slotUpdateCaptionIcons( ChatView* ) ) ); +
+ if (m_UpdateChatLabel) {
connect( view, SIGNAL( captionChanged( bool ) ), this, SLOT( updateChatLabel() ) );
- connect( view, SIGNAL( updateStatusIcon( ChatView* ) ), this, SLOT( \
slotUpdateCaptionIcons( ChatView* ) ) ); view->setCaption( view->caption(), false );
}
+}
+
void KopeteChatWindow::setPrimaryChatView( ChatView *view )
{
//TODO figure out what else we have to save here besides the font
@@ -770,7 +775,10 @@
connect( newView, SIGNAL(captionChanged( bool)), this, SLOT(slotSetCaption(bool)) \
); connect( newView, SIGNAL(messageSuccess( ChatView* )), this, \
SLOT(slotStopAnimation( ChatView* )) ); connect( newView, SIGNAL(updateStatusIcon( \
ChatView* ) ), this, SLOT(slotUpdateCaptionIcons( ChatView* ) ) ); +
+ if (m_UpdateChatLabel) {
connect( newView, SIGNAL(updateChatState( ChatView*, int ) ), this, SLOT( \
updateChatState( ChatView*, int ) ) ); + }
updateActions();
checkDetachEnable();
--- trunk/KDE/kdenetwork/kopete/kopete/chatwindow/kopetechatwindow.h #1239128:1239129
@@ -176,6 +176,8 @@
QString statusMsg;
Kopete::ChatSession::Form initialForm;
+ bool m_UpdateChatLabel;
+
signals:
void closing( KopeteChatWindow* );
void chatSessionChanged( Kopete::ChatSession *newSession);
--- trunk/KDE/kdenetwork/kopete/kopete/config/chatwindow/CMakeLists.txt \
#1239128:1239129 @@ -16,7 +16,8 @@
kde4_add_ui_files(kcm_kopete_chatwindowconfig_PART_SRCS
chatwindowconfig_style.ui
chatwindowconfig_emoticons.ui
- chatwindowconfig_colors.ui )
+ chatwindowconfig_colors.ui
+ chatwindowconfig_tab.ui )
kde4_add_plugin(kcm_kopete_chatwindowconfig \
${kcm_kopete_chatwindowconfig_PART_SRCS})
--- trunk/KDE/kdenetwork/kopete/kopete/config/chatwindow/chatwindowconfig.cpp \
#1239128:1239129 @@ -20,6 +20,7 @@
#include "chatwindowconfig.h"
#include "emoticonthemedelegate.h"
#include "emoticonthemeitem.h"
+#include "kopetebehaviorsettings.h"
#include <QCheckBox>
#include <QDir>
@@ -220,6 +221,12 @@
m_tab->addTab(colorsWidget, i18n("Colors && Fonts"));
addConfig( Kopete::AppearanceSettings::self(), colorsWidget );
+//--------- tab tab --------------------------
+ QWidget *tabWidget = new QWidget(m_tab);
+ m_tabUi.setupUi(tabWidget);
+ m_tab->addTab(tabWidget, i18n("&Tabs"));
+ addConfig( Kopete::BehaviorSettings::self(), tabWidget );
+
load();
}
--- trunk/KDE/kdenetwork/kopete/kopete/config/chatwindow/chatwindowconfig.h \
#1239128:1239129 @@ -28,6 +28,7 @@
#include "ui_chatwindowconfig_style.h"
#include "ui_chatwindowconfig_emoticons.h"
#include "ui_chatwindowconfig_colors.h"
+#include "ui_chatwindowconfig_tab.h"
#include <kopetechatwindowstyle.h>
class FakeProtocol;
@@ -97,5 +98,7 @@
//----- Colors TAB ------------------------
Ui::ChatWindowConfig_Colors m_colorsUi;
+ //----- Tab TAB ---------------------
+ Ui::ChatWindowConfig_Tab m_tabUi;
};
#endif
--- trunk/KDE/kdenetwork/kopete/libkopete/kopetebehaviorsettings.kcfg \
#1239128:1239129 @@ -186,5 +186,13 @@
<label>Always show tabs.</label>
<default>false</default>
</entry>
+ <entry key="ShowContactName" type="Bool">
+ <label>Show contact name for each tab.</label>
+ <default>true</default>
+ </entry>
+ <entry key="HoverClose" type="Bool">
+ <label>Show close button for each tab.</label>
+ <default>true</default>
+ </entry>
</group>
</kcfg>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic