QAction* showOwnerInfo = collection->action("show_owner_info");
QAction* showGroupInfo = collection->action("show_group_info");
QAction* showMimeInfo = collection->action("show_mime_info");
+ QAction* showPathOrUrlInfo = collection->action("show_path_or_url_info");
showSizeInfo->setChecked(false);
showDateInfo->setChecked(false);
showOwnerInfo->setChecked(false);
showGroupInfo->setChecked(false);
showMimeInfo->setChecked(false);
+ showPathOrUrlInfo->setChecked(false);
showSizeInfo->setEnabled(enable);
showDateInfo->setEnabled(enable);
showOwnerInfo->setEnabled(enable);
showGroupInfo->setEnabled(enable);
showMimeInfo->setEnabled(enable);
+ showPathOrUrlInfo->setEnabled(enable);
foreach (KFileItemDelegate::Information info, m_viewAccessor.itemDelegate()->showInformation()) {
switch (info) {
case KFileItemDelegate::FriendlyMimeType:
showMimeInfo->setChecked(true);
break;
+ case KFileItemDelegate::LocalPathOrUrl:
+ showPathOrUrlInfo->setChecked(true);
+ break;
default:
break;
}
showMimeInfo->setData(KFileItemDelegate::FriendlyMimeType);
showMimeInfo->setActionGroup(additionalInfoGroup);
+ KToggleAction* showPathOrUrlInfo = m_actionCollection->add<KToggleAction>("show_path_or_url_info");
+ showPathOrUrlInfo->setText(i18nc("@action:inmenu Additional information", "Path"));
+ showPathOrUrlInfo->setData(KFileItemDelegate::LocalPathOrUrl);
+ showPathOrUrlInfo->setActionGroup(additionalInfoGroup);
+
return additionalInfoGroup;
}
case KFileItemDelegate::FriendlyMimeType:
info = info | TypeInfo;
break;
+ case KFileItemDelegate::LocalPathOrUrl:
+ info = info | PathOrUrlInfo;
+ break;
default:
break;
}
if (info & TypeInfo) {
list.append(KFileItemDelegate::FriendlyMimeType);
}
+ if (info & PathOrUrlInfo) {
+ list.append(KFileItemDelegate::LocalPathOrUrl);
+ }
return list;
}
* the value is dependent from another property (in this case the view-mode).
*/
void setAdditionalInfo(KFileItemDelegate::InformationList info);
-
+
/**
* Returns the additional information for the current set view-mode.
* Note that the additional-info property is the only property where
PermissionsInfo = 4,
OwnerInfo = 8,
GroupInfo = 16,
- TypeInfo = 32
+ TypeInfo = 32,
+ PathOrUrlInfo = 64
};
bool m_changedProps;