Commit 2356fdcc authored by Simon Depiets's avatar Simon Depiets
Browse files

Add files list to the catalog view

Adding the files list to the catalog view to make it filterable by file
Also removing translation status from Options/Searchable columns as it is not a searchable column
BUG:405133
parent 7e94f769
......@@ -243,7 +243,7 @@ void CatalogView::fillFilterOptionsMenu()
}
if (!extStates)
m_filterOptionsMenu->addSeparator();
for (int i = -1; i < CatalogTreeModel::DisplayedColumnCount; ++i) {
for (int i = -1; i < CatalogTreeModel::DisplayedColumnCount-1; ++i) {
qCWarning(LOKALIZE_LOG) << i;
txt = columnsMenu->addAction((i == -1) ? i18nc("@item:inmenu all columns", "All") :
m_model->headerData(i, Qt::Horizontal, Qt::DisplayRole).toString());
......
......@@ -127,6 +127,8 @@ QVariant CatalogTreeModel::headerData(int section, Qt::Orientation /*orientation
return i18nc("@title:column", "Notes");
case CatalogModelColumns::Context:
return i18nc("@title:column", "Context");
case CatalogModelColumns::Files:
return i18nc("@title:column", "Files");
case CatalogModelColumns::TranslationStatus:
return i18nc("@title:column", "Translation Status");
default:
......@@ -233,6 +235,8 @@ QVariant CatalogTreeModel::data(const QModelIndex& index, int role) const
}
case CatalogModelColumns::Context:
return m_catalog->context(index.row());
case CatalogModelColumns::Files:
return m_catalog->sourceFiles(index.row()).join('|');
default:
return {};
}
......
......@@ -50,6 +50,7 @@ public:
Target,
Notes,
Context,
Files,
TranslationStatus,
IsEmpty,
State,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment