diff options
| author | Peter Penz <[email protected]> | 2010-05-13 22:06:10 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-05-13 22:06:10 +0000 |
| commit | cb9669d71cf10e73305c6a60fe0d832f4eb0ac7a (patch) | |
| tree | a1dbc83e15fa3dc9c36a41e03f1b999cc04a5e02 /src/panels/folders/paneltreeview.cpp | |
| parent | d64bbc333c5014fad116efc98b77cf3268fc07e0 (diff) | |
If an information entry will be added to KFileItemDelegate (like done recently), adjusting the corresponding code in Dolphin is a real pain, as the new information will be shown in Dolphin the following way:
- As additional columns in the details view
- As additional lines in the icons view
- As menu entries in the "Sort By" and "Additional Information" groups
- As popup menu entries in the details view header popup
- As checkable entries in the View Properties dialog
To prevent similar painful transitions in future, the class AdditionalInfoManager has been introduced. All parts in Dolphin that access/show/store additional information, use the AdditionalInfoManager now. If a new information entry will be added in KFileItemDelegate in future, only a small adjustment in AdditionalInfoManager will be required.
Still open currently:
- AdditionalInfoDialog does not use AdditionalInfoManager yet
- DolphinView::Sorting should be replaced by KFileItemDelegate::Information, so that the sorting can also be done in a generic way.
- The data for KFileItemDelegate::PathOrUrl is not determined
The open issues will get fixed during the next days.
Kudos to the brave warriors Sebastian and Frank, that tried to add a new information ;-)
CCMAIL: [email protected]
CCMAIL: [email protected]
svn path=/trunk/KDE/kdebase/apps/; revision=1126410
Diffstat (limited to 'src/panels/folders/paneltreeview.cpp')
| -rw-r--r-- | src/panels/folders/paneltreeview.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/panels/folders/paneltreeview.cpp b/src/panels/folders/paneltreeview.cpp index 646115037..58866d6c3 100644 --- a/src/panels/folders/paneltreeview.cpp +++ b/src/panels/folders/paneltreeview.cpp @@ -69,15 +69,10 @@ bool PanelTreeView::event(QEvent* event) { switch (event->type()) { case QEvent::Polish: - // hide all columns except of the 'Name' column - hideColumn(DolphinModel::Size); - hideColumn(DolphinModel::ModifiedTime); - hideColumn(DolphinModel::Permissions); - hideColumn(DolphinModel::Owner); - hideColumn(DolphinModel::Group); - hideColumn(DolphinModel::Type); - hideColumn(DolphinModel::Version); - hideColumn(DolphinModel::LinkDestination); + // Hide all columns except of the 'Name' column + for (int i = DolphinModel::Name + 1; i < DolphinModel::ExtraColumnCount; ++i) { + hideColumn(i); + } header()->hide(); break; |
