wxwidgets: Hide dumper called "NULL"
This is not working dumper (it is meant for PGO using lsnes-dumpavi), so don't show it.
This commit is contained in:
parent
ff1004d7fa
commit
791684edc3
5 changed files with 11 additions and 0 deletions
|
@ -105,6 +105,10 @@ public:
|
|||
*/
|
||||
virtual dumper_base* start(master_dumper& _mdumper, const std::string& mode, const std::string& targetname)
|
||||
throw(std::bad_alloc, std::runtime_error) = 0;
|
||||
/**
|
||||
* Is hidden?
|
||||
*/
|
||||
virtual bool hidden() const { return false; }
|
||||
/**
|
||||
* Add dumper update notifier object.
|
||||
*/
|
||||
|
|
|
@ -49,6 +49,8 @@ struct dumper_information_1
|
|||
std::string name;
|
||||
//Is this dumper active?
|
||||
bool active;
|
||||
//Hidden?
|
||||
bool hidden;
|
||||
//Modes available (first is internal name, second is human-readable one).
|
||||
std::map<std::string, std::string> modes;
|
||||
};
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace
|
|||
for(auto i : mset)
|
||||
inf.modes[i] = d->modename(i);
|
||||
inf.active = inst.mdumper->busy(d);
|
||||
inf.hidden = d->hidden();
|
||||
new_dumpers[d->id()] = inf;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -164,6 +164,9 @@ void dumper_menu::update()
|
|||
first = true;
|
||||
menustructure.clear();
|
||||
for(auto i : dinfo.dumpers) {
|
||||
//Skip dumper called "NULL" unless actually active, since it doesn't really work.
|
||||
if(i.second.hidden && !i.second.active)
|
||||
continue;
|
||||
if(!first)
|
||||
menustructure[last_processed].sep = AppendSeparator();
|
||||
last_processed = i.first;
|
||||
|
|
|
@ -103,6 +103,7 @@ namespace
|
|||
{
|
||||
return new null_dump_obj(_mdumper, *this, mode, prefix);
|
||||
}
|
||||
bool hidden() const { return true; }
|
||||
} adv;
|
||||
|
||||
adv_null_dumper::~adv_null_dumper() throw()
|
||||
|
|
Loading…
Add table
Reference in a new issue