From 633ed4c48ec2b085686947229f0c5068463c6800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Sat, 10 Aug 2013 16:35:39 +0200 Subject: [PATCH] HaikuDepot: Make categories also accessible as List in Model --- src/apps/haiku-depot/Model.cpp | 7 +++++++ src/apps/haiku-depot/Model.h | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/src/apps/haiku-depot/Model.cpp b/src/apps/haiku-depot/Model.cpp index 74c536571cf..195e8dcb0d0 100644 --- a/src/apps/haiku-depot/Model.cpp +++ b/src/apps/haiku-depot/Model.cpp @@ -38,6 +38,13 @@ Model::Model() BitmapRef(), B_TRANSLATE("Command line"), "command-line"), true) { + // Don't forget to add new categories to this list: + fCategories.Add(fCategoryAudio); + fCategories.Add(fCategoryVideo); + fCategories.Add(fCategoryGraphics); + fCategories.Add(fCategoryProductivity); + fCategories.Add(fCategoryDevelopment); + fCategories.Add(fCategoryCommandLine); } diff --git a/src/apps/haiku-depot/Model.h b/src/apps/haiku-depot/Model.h index d748edc4784..dc311799df8 100644 --- a/src/apps/haiku-depot/Model.h +++ b/src/apps/haiku-depot/Model.h @@ -32,6 +32,9 @@ class Model { const CategoryRef& CategoryCommandLine() const { return fCategoryCommandLine; } + const CategoryList& Categories() const + { return fCategories; } + private: BString fSearchTerms; @@ -44,6 +47,8 @@ class Model { CategoryRef fCategoryDevelopment; CategoryRef fCategoryCommandLine; // TODO: More categories + + CategoryList fCategories; };