@ -9,6 +9,7 @@
# include <tqstyle.h>
# include <tqstyle.h>
# include <tqclipboard.h>
# include <tqclipboard.h>
# include <tqstringlist.h>
# include <tdeapplication.h>
# include <tdeapplication.h>
# include <ktabbar.h>
# include <ktabbar.h>
@ -16,12 +17,12 @@
# include <tdelocale.h>
# include <tdelocale.h>
# include <kiconloader.h>
# include <kiconloader.h>
using namespace KlamAV ;
using namespace KlamAV ;
TabWidget : : TabWidget ( TQWidget * parent , const char * name )
TabWidget : : TabWidget ( TQWidget * parent , const char * name , TQStringList fixed )
: KTabWidget ( parent , name ) , m_CurrentMaxLength ( 30 )
: KTabWidget ( parent , name ) , m_CurrentMaxLength ( 30 )
{
{
fixedTabs = TQStringList ( fixed ) ;
setTabReorderingEnabled ( true ) ;
setTabReorderingEnabled ( true ) ;
connect ( this , SIGNAL ( currentChanged ( TQWidget * ) ) , this ,
connect ( this , SIGNAL ( currentChanged ( TQWidget * ) ) , this ,
SLOT ( slotTabChanged ( TQWidget * ) ) ) ;
SLOT ( slotTabChanged ( TQWidget * ) ) ) ;
@ -162,6 +163,11 @@ void TabWidget::contextMenu(int i, const TQPoint &p)
if ( currentItemId = = count ( ) - 1 )
if ( currentItemId = = count ( ) - 1 )
popup . setItemEnabled ( moveTabRight , false ) ;
popup . setItemEnabled ( moveTabRight , false ) ;
for ( TQStringList : : Iterator it = fixedTabs . begin ( ) ; it ! = fixedTabs . end ( ) ; + + it ) {
if ( TQString ( * it ) = = label ( currentItemId ) . replace ( ' & ' , TQString : : null ) )
popup . setItemEnabled ( closeTab , false ) ;
}
popup . exec ( p ) ;
popup . exec ( p ) ;
}
}