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 actually 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'.
{
SetBusy ();
static std::vector<packagemeta *> 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__,