diff options
| author | Peter Penz <[email protected]> | 2009-07-12 14:00:45 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-07-12 14:00:45 +0000 |
| commit | fa4680cb38028aceb68d41e1937d27c71d1f121b (patch) | |
| tree | da709625c38a42bf448077d985c75b0365a58252 /src/dolphindetailsview.cpp | |
| parent | 2df2d4ea7ee63a43a327b4ffb1c5cddd176aff91 (diff) | |
Enable Dolphin to show the revision states of files that are under revision control systems like SVN, Git, CVS, ... The current code is an early draft and it is planned that all plugins (SVN, Git, CVS, ...) are maintained outside Dolphin. If the API is stable enough, a discussion will be done at [email protected] regarding the location of the plugins (the current implementation of SubversionPlugin is only temporary located in Dolphin for testing purposes).
RevisionControlObserver is implemented in a way that no recognizable slowdown is given for directories that are not under revision control.
CCBUG: 192158
svn path=/trunk/KDE/kdebase/apps/; revision=995351
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index aa65ff6bc..4a9b9038d 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -173,9 +173,6 @@ bool DolphinDetailsView::event(QEvent* event) headerView->setMovable(false); updateColumnVisibility(); - - hideColumn(DolphinModel::Rating); - hideColumn(DolphinModel::Tags); } return QTreeView::event(event); @@ -566,7 +563,7 @@ void DolphinDetailsView::configureSettings(const QPoint& pos) // add checkbox items for each column QHeaderView* headerView = header(); - for (int i = DolphinModel::Size; i <= DolphinModel::Type; ++i) { + for (int i = DolphinModel::Size; i <= DolphinModel::Revision; ++i) { const int logicalIndex = headerView->logicalIndex(i); const QString text = model()->headerData(i, Qt::Horizontal).toString(); QAction* action = popup.addAction(text); @@ -601,7 +598,7 @@ void DolphinDetailsView::configureSettings(const QPoint& pos) void DolphinDetailsView::updateColumnVisibility() { const KFileItemDelegate::InformationList list = m_controller->dolphinView()->additionalInfo(); - for (int i = DolphinModel::Size; i <= DolphinModel::Type; ++i) { + for (int i = DolphinModel::Size; i <= DolphinModel::Revision; ++i) { const KFileItemDelegate::Information info = infoForColumn(i); const bool hide = !list.contains(info); if (isColumnHidden(i) != hide) { @@ -902,13 +899,14 @@ void DolphinDetailsView::resizeColumns() QHeaderView* headerView = header(); QFontMetrics fontMetrics(viewport()->font()); - int columnWidth[KDirModel::ColumnCount]; - columnWidth[KDirModel::Size] = fontMetrics.width("00000 Items"); - columnWidth[KDirModel::ModifiedTime] = fontMetrics.width("0000-00-00 00:00"); - columnWidth[KDirModel::Permissions] = fontMetrics.width("xxxxxxxxxx"); - columnWidth[KDirModel::Owner] = fontMetrics.width("xxxxxxxxxx"); - columnWidth[KDirModel::Group] = fontMetrics.width("xxxxxxxxxx"); - columnWidth[KDirModel::Type] = fontMetrics.width("XXXX Xxxxxxx"); + int columnWidth[DolphinModel::Revision + 1]; + columnWidth[DolphinModel::Size] = fontMetrics.width("00000 Items"); + columnWidth[DolphinModel::ModifiedTime] = fontMetrics.width("0000-00-00 00:00"); + columnWidth[DolphinModel::Permissions] = fontMetrics.width("xxxxxxxxxx"); + columnWidth[DolphinModel::Owner] = fontMetrics.width("xxxxxxxxxx"); + columnWidth[DolphinModel::Group] = fontMetrics.width("xxxxxxxxxx"); + columnWidth[DolphinModel::Type] = fontMetrics.width("XXXX Xxxxxxx"); + columnWidth[DolphinModel::Revision] = fontMetrics.width("xxxxxxxx"); int requiredWidth = 0; for (int i = KDirModel::Size; i <= KDirModel::Type; ++i) { |
