From daf4ae44faee3e641a743cc9f4e0c56f016faad4 Mon Sep 17 00:00:00 2001 From: Tannin Date: Sun, 1 Dec 2013 23:50:24 +0100 Subject: - added second context menu for changing categories that applies only changes to the selected mods instead of replacing the existing set of categories (thanks to Ross!) - bugfix: category filtering didn't work correctly when grouping was also active --- src/mainwindow.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'src/mainwindow.h') diff --git a/src/mainwindow.h b/src/mainwindow.h index dfd2e571..27a56812 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -230,9 +230,23 @@ private: void refreshFilters(); - void saveCategoriesFromMenu(QMenu *menu, int modRow); + /** + * Sets category selections from menu; for multiple mods, this will only apply + * the changes made in the menu (which is the delta between the current menu selection and the reference mod) + * @param menu the menu after editing by the user + * @param modRow index of the mod to edit + */ + void addRemoveCategoriesFromMenu(QMenu *menu, int modRow); + + /** + * Sets category selections from menu; for multiple mods, this will completely + * replace the current set of categories on each selected with those selected in the menu + * @param menu the menu after editing by the user + * @param modRow index of the mod to edit + */ + void replaceCategoriesFromMenu(QMenu *menu, int modRow); - bool addCategories(QMenu *menu, int targetID); + bool populateMenuCategories(QMenu *menu, int targetID); void updateDownloadListDelegate(); @@ -431,7 +445,9 @@ private slots: void originModified(int originID); - void saveCategories(); + void addRemoveCategories_MenuHandler(); + void replaceCategories_MenuHandler(); + void savePrimaryCategory(); void addPrimaryCategoryCandidates(); -- cgit v1.3.1