# # # patch "guitone/src/model/InventoryProxyModel.cpp" # from [e87bd50fd656e93a576f1d6786188ae5ab3da20d] # to [67421f1ac2d16881480b71eddbd17d720475d792] # # patch "guitone/src/view/InventoryView.cpp" # from [8f0ceb0921280a462369fb87a7d07326b05cf30d] # to [db0489f039bc8df019e4870e8832889806746773] # ============================================================ --- guitone/src/model/InventoryProxyModel.cpp e87bd50fd656e93a576f1d6786188ae5ab3da20d +++ guitone/src/model/InventoryProxyModel.cpp 67421f1ac2d16881480b71eddbd17d720475d792 @@ -50,7 +50,8 @@ bool InventoryProxyModel::lessThan(const bool InventoryProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const { - //TODO: Need some tweaking for correct sorting when clicked on different headers + // TODO: Needs some tweaking for correct sorting when clicked on different headers + // f.e. status strings are sorted differently based on their translation InventoryItem *itemLeft = static_cast(left.internalPointer()); InventoryItem *itemRight = static_cast(right.internalPointer()); ============================================================ --- guitone/src/view/InventoryView.cpp 8f0ceb0921280a462369fb87a7d07326b05cf30d +++ guitone/src/view/InventoryView.cpp db0489f039bc8df019e4870e8832889806746773 @@ -21,7 +21,7 @@ #include "InventoryView.h" #include "../util/Settings.h" #include "../model/InventoryItem.h" -#include "dialogs/FileDiff.h" +// #include "dialogs/FileDiff.h" #include #include @@ -42,14 +42,12 @@ InventoryView::InventoryView(QWidget* pa } setSelectionMode(QAbstractItemView::ExtendedSelection); - //setSelectionMode(QAbstractItemView::SingleSelection); setDragEnabled(true); setDropIndicatorShown(true); - //setAcceptDrops(true); - + setSortingEnabled(true); + header()->setClickable(true); - header()->setSortIndicatorShown(true); - + createAndConnectContextActions(); } @@ -98,8 +96,6 @@ void InventoryView::contextMenuEvent(QCo menu.addAction(actUnignore); } - // TODO: we need some marker on directories to express that contents - // in this directory have been changed and act accordingly if (item->isDirectory() || ( item->hasNotStatus(InventoryItem::Unchanged) && item->hasNotStatus(InventoryItem::Ignored) && @@ -124,6 +120,9 @@ void InventoryView::contextMenuEvent(QCo menu.addAction(actDiff); } + // TODO: special items for directories to add/remove/commit/revert + // items in subdirectories via getStatusRecursive and friends + menu.exec(mapToGlobal(ev->pos())); } else