[Kbabel] kdesdk/kbabel/catalogmanager
Marco Wegner
dubbleu@web.de
Sat, 11 Jan 2003 10:51:22 +0100 (CET)
CVS commit by mwegner:
CCMAIL: kbabel@kde.org
- the CVS Status column is now switched off when there's no valid CVS
repository
M +16 -1 catalogmanagerview.cpp 1.68
M +2 -0 catalogmanagerview.h 1.33
--- kdesdk/kbabel/catalogmanager/catalogmanagerview.cpp #1.67:1.68
@@ -106,5 +106,5 @@ CatalogManagerView::CatalogManagerView(Q
addColumn(i18n("Total"));
setColumnAlignment(3,AlignCenter);
- addColumn(i18n("CVS Status"));
+ addColumn(QString::null); // CVS column, header is set later
addColumn(i18n("Last Revision"));
addColumn(i18n("Last Translator"));
@@ -169,4 +169,6 @@ CatalogManagerView::CatalogManagerView(Q
connect( cvshandler, SIGNAL( signalFilesCommitted( const QStringList& ) ),
this, SLOT( updateFiles( const QStringList& ) ) );
+ connect( cvshandler, SIGNAL( signalIsPORepository( bool ) ),
+ this, SLOT( slotToggleCVSColumn( bool ) ) );
KConfig *config = KGlobal::config();
@@ -2653,4 +2655,17 @@ void CatalogManagerView::updateMarkerLis
_markerList = newMarkers;
+}
+
+void CatalogManagerView::slotToggleCVSColumn( bool show )
+{
+ if ( show ) {
+ setColumnWidthMode( COL_CVS, Maximum );
+ setColumnWidth( COL_CVS, -1 );
+ // ensure that the column heading is always fully visible
+ setColumnText( COL_CVS, i18n( "CVS Status" ) );
+ } else {
+ setColumnWidthMode( COL_CVS, Manual );
+ setColumnWidth( COL_CVS, 0 );
+ }
}
--- kdesdk/kbabel/catalogmanager/catalogmanagerview.h #1.32:1.33
@@ -325,4 +325,6 @@ private slots:
void columnClicked(QListViewItem * item, const QPoint & pnt, int c);
+ void slotToggleCVSColumn( bool );
+
private:
void readMarker(KConfig *config);