mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Unified notification of source creation with Source info
New virtual function source::info used for notification after adding source
This commit is contained in:
13
Mixer.cpp
13
Mixer.cpp
@@ -258,10 +258,6 @@ Source * Mixer::createSourceFile(const std::string &path)
|
||||
ms->setPath(path);
|
||||
s = ms;
|
||||
}
|
||||
|
||||
// remember in recent media
|
||||
Settings::application.recentImport.push(path);
|
||||
|
||||
// propose a new name based on uri
|
||||
s->setName(SystemToolkit::base_filename(path));
|
||||
|
||||
@@ -427,6 +423,12 @@ void Mixer::insertSource(Source *s, View::Mode m)
|
||||
// new state in history manager
|
||||
Action::manager().store(s->name() + std::string(": source inserted"));
|
||||
|
||||
// notify creation of source
|
||||
Log::Notify("Added source '%s' with %s", s->name().c_str(), s->info().c_str());
|
||||
MediaSource *ms = dynamic_cast<MediaSource *>(s);
|
||||
if (ms)
|
||||
Settings::application.recentImport.push(ms->path());
|
||||
|
||||
// if requested to show the source in a given view
|
||||
// (known to work for View::MIXING et TRANSITION: other views untested)
|
||||
if (m != View::INVALID) {
|
||||
@@ -703,9 +705,10 @@ void Mixer::groupSelection()
|
||||
info << sessiongroup->name() << " inserted: " << sessiongroup->session()->numSource() << " sources flatten.";
|
||||
Action::manager().store(info.str());
|
||||
|
||||
Log::Notify("Added source '%s' with %s", sessiongroup->name().c_str(), sessiongroup->info().c_str());
|
||||
|
||||
// give the hand to the user
|
||||
Mixer::manager().setCurrentSource(sessiongroup);
|
||||
Log::Notify(info.str().c_str());
|
||||
}
|
||||
|
||||
void Mixer::renameSource(Source *s, const std::string &newname)
|
||||
|
||||
Reference in New Issue
Block a user