@ -157,7 +157,7 @@ void ViewContainer::setupTabWidget()
KPushButton * closeBtn = new KPushButton ( m_tabWidget ) ;
KPushButton * closeBtn = new KPushButton ( m_tabWidget ) ;
closeBtn - > setPixmap ( KGlobal : : iconLoader ( ) - > loadIcon ( " tab_remove " , KIcon : : Small ) ) ;
closeBtn - > setPixmap ( KGlobal : : iconLoader ( ) - > loadIcon ( " tab_remove " , KIcon : : Small ) ) ;
closeBtn - > resize ( 22 , 22 ) ;
closeBtn - > resize ( 22 , 22 ) ;
closeBtn - > tq setSizePolicy( TQSizePolicy : : Fixed , TQSizePolicy : : Fixed ) ;
closeBtn - > setSizePolicy( TQSizePolicy : : Fixed , TQSizePolicy : : Fixed ) ;
m_tabWidget - > setCornerWidget ( closeBtn ) ;
m_tabWidget - > setCornerWidget ( closeBtn ) ;
connect ( closeBtn , TQT_SIGNAL ( clicked ( ) ) , this , TQT_SLOT ( closeCurrentView ( ) ) ) ;
connect ( closeBtn , TQT_SIGNAL ( clicked ( ) ) , this , TQT_SLOT ( closeCurrentView ( ) ) ) ;
@ -220,7 +220,7 @@ void ViewContainer::setupViewTree()
{
{
ChatWindow * view = static_cast < ChatWindow * > ( m_tabWidget - > page ( i ) ) ;
ChatWindow * view = static_cast < ChatWindow * > ( m_tabWidget - > page ( i ) ) ;
if ( view - > getType ( ) = = ChatWindow : : tq Status)
if ( view - > getType ( ) = = ChatWindow : : Status)
{
{
if ( view = = m_frontView )
if ( view = = m_frontView )
m_viewTree - > addView ( view - > getName ( ) , view , m_tabWidget - > tabIconSet ( view ) , true ) ;
m_viewTree - > addView ( view - > getName ( ) , view , m_tabWidget - > tabIconSet ( view ) , true ) ;
@ -233,7 +233,7 @@ void ViewContainer::setupViewTree()
{
{
ChatWindow * view = static_cast < ChatWindow * > ( m_tabWidget - > page ( i ) ) ;
ChatWindow * view = static_cast < ChatWindow * > ( m_tabWidget - > page ( i ) ) ;
if ( ! view - > getType ( ) = = ChatWindow : : tq Status)
if ( ! view - > getType ( ) = = ChatWindow : : Status)
{
{
if ( view = = m_frontView )
if ( view = = m_frontView )
m_viewTree - > addView ( view - > getName ( ) , view , m_tabWidget - > tabIconSet ( view ) , true ) ;
m_viewTree - > addView ( view - > getName ( ) , view , m_tabWidget - > tabIconSet ( view ) , true ) ;
@ -426,7 +426,7 @@ void ViewContainer::updateViewActions(int index)
if ( action ) action - > setEnabled ( index < ( m_tabWidget - > count ( ) - 1 ) ) ;
if ( action ) action - > setEnabled ( index < ( m_tabWidget - > count ( ) - 1 ) ) ;
}
}
if ( server & & ( viewType = = ChatWindow : : tq Status | | server = = m_frontServer ) )
if ( server & & ( viewType = = ChatWindow : : Status | | server = = m_frontServer ) )
{
{
action = actionCollection ( ) - > action ( " reconnect_server " ) ;
action = actionCollection ( ) - > action ( " reconnect_server " ) ;
if ( action ) action - > setEnabled ( true ) ;
if ( action ) action - > setEnabled ( true ) ;
@ -457,7 +457,7 @@ void ViewContainer::updateViewActions(int index)
if ( notifyAction )
if ( notifyAction )
{
{
notifyAction - > setEnabled ( viewType = = ChatWindow : : Channel | | viewType = = ChatWindow : : Query | |
notifyAction - > setEnabled ( viewType = = ChatWindow : : Channel | | viewType = = ChatWindow : : Query | |
viewType = = ChatWindow : : tq Status | | viewType = = ChatWindow : : Konsole | |
viewType = = ChatWindow : : Status | | viewType = = ChatWindow : : Konsole | |
viewType = = ChatWindow : : DccTransferPanel | | viewType = = ChatWindow : : RawLog ) ;
viewType = = ChatWindow : : DccTransferPanel | | viewType = = ChatWindow : : RawLog ) ;
notifyAction - > setChecked ( view - > notificationsEnabled ( ) ) ;
notifyAction - > setChecked ( view - > notificationsEnabled ( ) ) ;
}
}
@ -702,7 +702,7 @@ void ViewContainer::updateFrontView()
{
{
case ChatWindow : : Channel :
case ChatWindow : : Channel :
case ChatWindow : : Query :
case ChatWindow : : Query :
case ChatWindow : : tq Status:
case ChatWindow : : Status:
case ChatWindow : : ChannelList :
case ChatWindow : : ChannelList :
case ChatWindow : : RawLog :
case ChatWindow : : RawLog :
emit setStatusBarLagLabelShown ( true ) ;
emit setStatusBarLagLabelShown ( true ) ;
@ -729,7 +729,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG
if ( serverGroup )
if ( serverGroup )
{
{
if ( view - > getType ( ) = = ChatWindow : : tq Status & & view - > getServer ( ) - > getServerGroup ( ) = = serverGroup )
if ( view - > getType ( ) = = ChatWindow : : Status & & view - > getServer ( ) - > getServerGroup ( ) = = serverGroup )
{
{
TQString label = view - > getServer ( ) - > getDisplayName ( ) ;
TQString label = view - > getServer ( ) - > getDisplayName ( ) ;
@ -762,7 +762,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG
if ( ! Preferences : : tabNotificationsText ( ) )
if ( ! Preferences : : tabNotificationsText ( ) )
m_viewTree - > setViewColor ( view , m_window - > tq colorGroup( ) . foreground ( ) ) ;
m_viewTree - > setViewColor ( view , m_window - > colorGroup( ) . foreground ( ) ) ;
}
}
else if ( m_tabWidget )
else if ( m_tabWidget )
{
{
@ -773,7 +773,7 @@ void ViewContainer::updateViews(const Konversation::ServerGroupSettings* serverG
m_tabWidget - > setTabIconSet ( view , images - > getCloseIcon ( ) ) ;
m_tabWidget - > setTabIconSet ( view , images - > getCloseIcon ( ) ) ;
if ( ! Preferences : : tabNotificationsText ( ) )
if ( ! Preferences : : tabNotificationsText ( ) )
m_tabWidget - > setTabColor ( view , m_window - > tq colorGroup( ) . foreground ( ) ) ;
m_tabWidget - > setTabColor ( view , m_window - > colorGroup( ) . foreground ( ) ) ;
}
}
if ( Preferences : : tabNotificationsLeds ( ) | | Preferences : : tabNotificationsText ( ) )
if ( Preferences : : tabNotificationsLeds ( ) | | Preferences : : tabNotificationsText ( ) )
@ -1040,7 +1040,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
m_viewTree - > setViewIcon ( view , images - > getPrivateLed ( false ) ) ;
m_viewTree - > setViewIcon ( view , images - > getPrivateLed ( false ) ) ;
break ;
break ;
case ChatWindow : : tq Status:
case ChatWindow : : Status:
m_viewTree - > setViewIcon ( view , images - > getServerLed ( false ) ) ;
m_viewTree - > setViewIcon ( view , images - > getServerLed ( false ) ) ;
break ;
break ;
@ -1051,7 +1051,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
}
}
TQColor textColor = ( Preferences : : inputFieldsBackgroundColor ( )
TQColor textColor = ( Preferences : : inputFieldsBackgroundColor ( )
? Preferences : : color ( Preferences : : ChannelMessage ) : m_window - > tq colorGroup( ) . foreground ( ) ) ;
? Preferences : : color ( Preferences : : ChannelMessage ) : m_window - > colorGroup( ) . foreground ( ) ) ;
if ( view - > getType ( ) = = ChatWindow : : Channel )
if ( view - > getType ( ) = = ChatWindow : : Channel )
{
{
@ -1083,7 +1083,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
m_tabWidget - > setTabIconSet ( view , images - > getPrivateLed ( false ) ) ;
m_tabWidget - > setTabIconSet ( view , images - > getPrivateLed ( false ) ) ;
break ;
break ;
case ChatWindow : : tq Status:
case ChatWindow : : Status:
m_tabWidget - > setTabIconSet ( view , images - > getServerLed ( false ) ) ;
m_tabWidget - > setTabIconSet ( view , images - > getServerLed ( false ) ) ;
break ;
break ;
@ -1093,7 +1093,7 @@ void ViewContainer::unsetViewNotification(ChatWindow* view)
}
}
}
}
TQColor textColor = m_window - > tq colorGroup( ) . foreground ( ) ;
TQColor textColor = m_window - > colorGroup( ) . foreground ( ) ;
if ( view - > getType ( ) = = ChatWindow : : Channel )
if ( view - > getType ( ) = = ChatWindow : : Channel )
{
{
@ -1196,7 +1196,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit
{
{
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
if ( tmp_ChatWindow - > getType ( ) = = ChatWindow : : tq Status & & tmp_ChatWindow - > getServer ( ) = = view - > getServer ( ) )
if ( tmp_ChatWindow - > getType ( ) = = ChatWindow : : Status & & tmp_ChatWindow - > getServer ( ) = = view - > getServer ( ) )
{
{
for ( int index = sindex + 1 ; index < m_tabWidget - > count ( ) ; index + + )
for ( int index = sindex + 1 ; index < m_tabWidget - > count ( ) ; index + + )
{
{
@ -1226,7 +1226,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit
{
{
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
if ( tmp_ChatWindow - > getType ( ) = = ChatWindow : : tq Status & & tmp_ChatWindow - > getServer ( ) = = view - > getServer ( ) )
if ( tmp_ChatWindow - > getType ( ) = = ChatWindow : : Status & & tmp_ChatWindow - > getServer ( ) = = view - > getServer ( ) )
{
{
placement = sindex + 1 ;
placement = sindex + 1 ;
break ;
break ;
@ -1245,7 +1245,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit
{
{
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
if ( tmp_ChatWindow - > getType ( ) = = ChatWindow : : tq Status & & tmp_ChatWindow - > getServer ( ) = = view - > getServer ( ) )
if ( tmp_ChatWindow - > getType ( ) = = ChatWindow : : Status & & tmp_ChatWindow - > getServer ( ) = = view - > getServer ( ) )
{
{
for ( int index = sindex + 1 ; index < m_tabWidget - > count ( ) ; index + + )
for ( int index = sindex + 1 ; index < m_tabWidget - > count ( ) ; index + + )
{
{
@ -1276,7 +1276,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
wtype = tmp_ChatWindow - > getType ( ) ;
wtype = tmp_ChatWindow - > getType ( ) ;
if ( wtype ! = ChatWindow : : tq Status & & wtype ! = ChatWindow : : Channel
if ( wtype ! = ChatWindow : : Status & & wtype ! = ChatWindow : : Channel
& & wtype ! = ChatWindow : : RawLog & & wtype ! = ChatWindow : : Query
& & wtype ! = ChatWindow : : RawLog & & wtype ! = ChatWindow : : Query
& & wtype ! = ChatWindow : : DccChat & & wtype ! = ChatWindow : : ChannelList )
& & wtype ! = ChatWindow : : DccChat & & wtype ! = ChatWindow : : ChannelList )
{
{
@ -1286,7 +1286,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit
}
}
break ;
break ;
case ChatWindow : : tq Status:
case ChatWindow : : Status:
if ( Preferences : : tabNotificationsLeds ( ) )
if ( Preferences : : tabNotificationsLeds ( ) )
iconSet = images - > getServerLed ( false ) ;
iconSet = images - > getServerLed ( false ) ;
else if ( Preferences : : closeButtons ( ) )
else if ( Preferences : : closeButtons ( ) )
@ -1299,7 +1299,7 @@ void ViewContainer::addView(ChatWindow* view, const TQString& label, bool weinit
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
tmp_ChatWindow = static_cast < ChatWindow * > ( m_tabWidget - > page ( sindex ) ) ;
if ( tmp_ChatWindow - > getType ( ) ! = ChatWindow : : Channel
if ( tmp_ChatWindow - > getType ( ) ! = ChatWindow : : Channel
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : tq Status
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : Status
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : RawLog
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : RawLog
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : Query
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : Query
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : DccChat )
& & tmp_ChatWindow - > getType ( ) ! = ChatWindow : : DccChat )
@ -1624,7 +1624,7 @@ void ViewContainer::updateViewEncoding(ChatWindow* view)
if ( codecAction )
if ( codecAction )
{
{
if ( viewType = = ChatWindow : : Channel | | viewType = = ChatWindow : : Query | | viewType = = ChatWindow : : tq Status)
if ( viewType = = ChatWindow : : Channel | | viewType = = ChatWindow : : Query | | viewType = = ChatWindow : : Status)
{
{
codecAction - > setEnabled ( view - > isChannelEncodingSupported ( ) ) ;
codecAction - > setEnabled ( view - > isChannelEncodingSupported ( ) ) ;
TQString encoding = view - > getChannelEncoding ( ) ;
TQString encoding = view - > getChannelEncoding ( ) ;
@ -1682,7 +1682,7 @@ void ViewContainer::showViewContextMenu(TQWidget* tab, const TQPoint& pos)
}
}
}
}
if ( viewType = = ChatWindow : : tq Status)
if ( viewType = = ChatWindow : : Status)
{
{
TQPtrList < KAction > serverActions ;
TQPtrList < KAction > serverActions ;
KAction * action = actionCollection ( ) - > action ( " disconnect_server " ) ;
KAction * action = actionCollection ( ) - > action ( " disconnect_server " ) ;
@ -1825,7 +1825,7 @@ void ViewContainer::appendToFrontmost(const TQString& type,const TQString& messa
}
}
// This might happen if canBeFrontView() is false for active ChatWindow
// This might happen if canBeFrontView() is false for active ChatWindow
// and the view does not belong to any server (e.g. DCC tq Status View).
// and the view does not belong to any server (e.g. DCC Status View).
// Discard message in this case.
// Discard message in this case.
if ( ! serverView ) return ;
if ( ! serverView ) return ;
@ -1957,7 +1957,7 @@ void ViewContainer::openLogFile()
ChatWindow * view = static_cast < ChatWindow * > ( m_frontView ) ;
ChatWindow * view = static_cast < ChatWindow * > ( m_frontView ) ;
ChatWindow : : WindowType viewType = view - > getType ( ) ;
ChatWindow : : WindowType viewType = view - > getType ( ) ;
if ( viewType = = ChatWindow : : Channel | | viewType = = ChatWindow : : Query | |
if ( viewType = = ChatWindow : : Channel | | viewType = = ChatWindow : : Query | |
viewType = = ChatWindow : : tq Status | | viewType = = ChatWindow : : DccChat )
viewType = = ChatWindow : : Status | | viewType = = ChatWindow : : DccChat )
{
{
openLogFile ( view - > getName ( ) , view - > logFileName ( ) ) ;
openLogFile ( view - > getName ( ) , view - > logFileName ( ) ) ;
}
}