API change of AIFilePicker.

Call AIFilePicker::create() instead of new AIFilePicker.
Renamed deleteMe() to kill() and bs_deleted to bs_killed.
Only default to auto destruct when created with create(true),
otherwise kill() has to be called explicitely.
This commit is contained in:
Aleric Inglewood
2011-05-18 03:52:15 +02:00
parent 4eb87268bd
commit e1fb1fa6b7
23 changed files with 63 additions and 57 deletions

View File

@@ -60,7 +60,7 @@ char const* AIFilePicker::state_str_impl(state_type run_state) const
return "UNKNOWN STATE";
}
AIFilePicker::AIFilePicker(void) : mPluginManager(NULL), mCanceled(false)
AIFilePicker::AIFilePicker(void) : mPluginManager(NULL), mAutoKill(false), mCanceled(false)
{
}
@@ -400,9 +400,12 @@ void AIFilePicker::finish_impl(void)
mPluginManager = NULL;
}
mFilter.clear(); // Check that open is called before calling run (again).
// The default behavior is to delete the plugin. This can be overridden in
// the callback by calling run() again.
deleteMe();
if (mAutoKill)
{
// The default behavior is to delete the plugin. This can be overridden in
// the callback by calling run() again.
kill();
}
}
// This function is called when a new message is received from the plugin.