提交 a903ae31 编写于 作者: J jp9000

UI: Fix logging for profiles/scene collections

This makes it so that the log message for altering scene collections
and/or profiles is now below, and then the separator below that.  This
makes it a bit more apparent that any loading/clearing/etc that happens
before the log message are associated with the log message.
上级 5e178c12
......@@ -233,9 +233,9 @@ bool OBSBasic::AddProfile(bool create_new, const char *title, const char *text,
if (create_new)
ResetProfileData();
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Created profile '%s' (%s, %s)", newName.c_str(),
create_new ? "clean" : "duplicate", newDir.c_str());
blog(LOG_INFO, "------------------------------------------------");
config_save(App()->GlobalConfig());
UpdateTitleBar();
......@@ -290,6 +290,7 @@ void OBSBasic::DeleteProfile(const char *profileName, const char *profileDir)
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Removed profile '%s' (%s)",
profileName, profileDir);
blog(LOG_INFO, "------------------------------------------------");
}
void OBSBasic::RefreshProfiles()
......@@ -425,9 +426,9 @@ void OBSBasic::on_actionRemoveProfile_triggered()
RefreshProfiles();
config_save(App()->GlobalConfig());
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Switched to profile '%s' (%s)",
newName.c_str(), newDir);
blog(LOG_INFO, "------------------------------------------------");
UpdateTitleBar();
}
......@@ -470,14 +471,14 @@ void OBSBasic::ChangeProfile()
config_set_string(App()->GlobalConfig(), "Basic", "ProfileDir",
newDir);
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Switched to profile '%s' (%s)",
newName, newDir);
config.Swap(basicConfig);
InitBasicConfigDefaults();
ResetProfileData();
RefreshProfiles();
config_save(App()->GlobalConfig());
UpdateTitleBar();
blog(LOG_INFO, "Switched to profile '%s' (%s)",
newName, newDir);
blog(LOG_INFO, "------------------------------------------------");
}
......@@ -173,10 +173,10 @@ void OBSBasic::AddSceneCollection(bool create_new)
SaveProject();
RefreshSceneCollections();
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Added scene collection '%s' (%s, %s.json)",
name.c_str(), create_new ? "clean" : "duplicate",
file.c_str());
blog(LOG_INFO, "------------------------------------------------");
UpdateTitleBar();
}
......@@ -262,6 +262,7 @@ void OBSBasic::on_actionRenameSceneCollection_triggered()
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Renamed scene collection to '%s' (%s.json)",
name.c_str(), file.c_str());
blog(LOG_INFO, "------------------------------------------------");
UpdateTitleBar();
RefreshSceneCollections();
......@@ -319,11 +320,11 @@ void OBSBasic::on_actionRemoveSceneCollection_triggered()
const char *newFile = config_get_string(App()->GlobalConfig(),
"Basic", "SceneCollectionFile");
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Removed scene collection '%s' (%s.json), "
"switched to '%s' (%s.json)",
oldName.c_str(), oldFile.c_str(),
newName.c_str(), newFile);
blog(LOG_INFO, "------------------------------------------------");
UpdateTitleBar();
}
......@@ -357,9 +358,9 @@ void OBSBasic::ChangeSceneCollection()
const char *newFile = config_get_string(App()->GlobalConfig(),
"Basic", "SceneCollectionFile");
blog(LOG_INFO, "------------------------------------------------");
blog(LOG_INFO, "Switched to scene collection '%s' (%s.json)",
newName, newFile);
blog(LOG_INFO, "------------------------------------------------");
UpdateTitleBar();
}
......@@ -2114,6 +2114,9 @@ void OBSBasic::ClearSceneData()
sourceSceneRefs.clear();
disableSaving--;
blog(LOG_INFO, "All scene data cleared");
blog(LOG_INFO, "------------------------------------------------");
}
void OBSBasic::closeEvent(QCloseEvent *event)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册