Say what file extension is expected from dump file
This commit is contained in:
parent
09cfdb522a
commit
5e360805e8
7 changed files with 35 additions and 0 deletions
|
@ -55,6 +55,13 @@ public:
|
|||
* Returns: Mode details flags
|
||||
*/
|
||||
virtual unsigned mode_details(const std::string& mode) throw() = 0;
|
||||
/**
|
||||
* Get mode extensions. Only called if mode details specifies that output is a single file.
|
||||
*
|
||||
* parameter mode: The submode.
|
||||
* Returns: Mode extension
|
||||
*/
|
||||
virtual std::string mode_extension(const std::string& mode) throw() = 0;
|
||||
/**
|
||||
* Get human-readable name for this dumper.
|
||||
*
|
||||
|
|
|
@ -118,6 +118,8 @@ void dumper_menu::on_select(wxCommandEvent& e)
|
|||
std::string prefix;
|
||||
if((d & adv_dumper::target_type_mask) == adv_dumper::target_type_file) {
|
||||
wxFileDialog* d = new wxFileDialog(pwin, wxT("Choose file"), wxT("."));
|
||||
std::string modext = t->mode_extension(mode);
|
||||
d->SetWildcard(towxstring(modext + " files|*." + modext));
|
||||
if(d->ShowModal() == wxID_OK)
|
||||
prefix = tostdstring(d->GetPath());
|
||||
d->Destroy();
|
||||
|
|
|
@ -426,6 +426,12 @@ again:
|
|||
return target_type_prefix;
|
||||
}
|
||||
|
||||
std::string mode_extension(const std::string& mode) throw()
|
||||
{
|
||||
return ""; //Not interesting
|
||||
}
|
||||
|
||||
|
||||
std::string name() throw(std::bad_alloc)
|
||||
{
|
||||
return "AVI (internal)";
|
||||
|
|
|
@ -342,6 +342,11 @@ namespace
|
|||
return (mode == "tcp") ? target_type_special : target_type_file;
|
||||
}
|
||||
|
||||
std::string mode_extension(const std::string& mode) throw()
|
||||
{
|
||||
return "jmd"; //Ignored if tcp mode.
|
||||
}
|
||||
|
||||
std::string name() throw(std::bad_alloc)
|
||||
{
|
||||
return "JMD";
|
||||
|
|
|
@ -243,6 +243,11 @@ namespace
|
|||
return target_type_file;
|
||||
}
|
||||
|
||||
std::string mode_extension(const std::string& mode) throw()
|
||||
{
|
||||
return "sox";
|
||||
}
|
||||
|
||||
std::string name() throw(std::bad_alloc)
|
||||
{
|
||||
return "PIPEDEC";
|
||||
|
|
|
@ -162,6 +162,11 @@ namespace
|
|||
return IS_TCP(strhash(mode)) ? target_type_special : target_type_prefix;
|
||||
}
|
||||
|
||||
std::string mode_extension(const std::string& mode) throw()
|
||||
{
|
||||
return ""; //Nothing interesting.
|
||||
}
|
||||
|
||||
std::string name() throw(std::bad_alloc)
|
||||
{
|
||||
return "RAW";
|
||||
|
|
|
@ -163,6 +163,11 @@ namespace
|
|||
return target_type_mask;
|
||||
}
|
||||
|
||||
std::string mode_extension(const std::string& mode) throw()
|
||||
{
|
||||
return "sdmp"; //Ignored anyway in non-ss mode.
|
||||
}
|
||||
|
||||
std::string name() throw(std::bad_alloc)
|
||||
{
|
||||
return "SDMP";
|
||||
|
|
Loading…
Add table
Reference in a new issue