From 1a0cf0a86088b4aae7d5a18953f7c214b07d8a03 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 6 Mar 2018 16:17:30 +0000 Subject: [PATCH setup] Always give the fake root category the name 'All' After we rearranged things in 0c539f7f, it's now too early to tell if we have any packages or not. The only thing about this category that is ever used is it's name, so we don't acually need to use the real 'All' category here. Saying 'No packages found' was never particularly helpful here, so just use a fake category with the fixed name 'All'. --- choose.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/choose.cc b/choose.cc index 9cf3a50..5a4d3ad 100644 --- a/choose.cc +++ b/choose.cc @@ -137,11 +137,8 @@ ChooserPage::createListview () { SetBusy (); static std::vector empty_cat; - static Category dummy_cat (std::string ("No packages found."), empty_cat); - packagedb db; - packagedb::categoriesType::iterator it = db.categories.find("All"); - Category &cat = (it == db.categories.end ()) ? dummy_cat : *it; - chooser = new PickView (cat); + static Category dummy_cat (std::string ("All"), empty_cat); + chooser = new PickView (dummy_cat); RECT r = getDefaultListViewSize(); if (!chooser->Create(this, WS_CHILD | WS_HSCROLL | WS_VSCROLL | WS_VISIBLE,&r)) throw new Exception (TOSTRING(__LINE__) " " __FILE__, -- 2.16.2