mirror of
https://github.com/KDE/konsole.git
synced 2026-02-05 12:51:44 -05:00
Rename "fallback" profile to Built-in
* Rename everything related to built-in profile both in code and UI. * Unified style for [Read-only] and [Default] badges in profile manager's list model. * Change --fallback-profile option to --builtin-profile. * Backward compatibility: yes. If a user happened to name their profile "Built-in", it would continue to work as normal, and even load with `--profile "Built-in"` command line flag. It will let them modify any property including Name; but changing the name back to "Built-in" shows a warning and reverts the change as usual. * Remove "This option is a shortcut for" sentence. While it is still technically possible to pass built-in profile's magic path, this option is not a shortcut, nor implemented as such. * Delete extra naming conditions in ProfileManager::changeProfile, because they could never be triggered anyway, due to pre-flight checks in EditProfileDialog::isProfileNameValid. Automatic unique profile names generation has been done even earlier in either SessionController or ProfileSettings. Just as before, users will continue experiencing a generic "A profile with the name \"%1\" already exists." message. Tests: * Improve test for uncreatable file name of built-in profile. * Add backward compatibility test for loading existing profile named "Built-in" which also references real built-in as its parent. BUG: 438309
This commit is contained in:
committed by
Tomaz Canabrava
parent
a67edd3f25
commit
fca0f4f9d7
@@ -916,7 +916,7 @@ void SessionController::switchProfile(const Profile::Ptr &profile)
|
||||
void SessionController::setEditProfileActionText(const Profile::Ptr &profile)
|
||||
{
|
||||
QAction *action = actionCollection()->action(QStringLiteral("edit-current-profile"));
|
||||
if (profile->isFallback()) {
|
||||
if (profile->isBuiltin()) {
|
||||
action->setText(i18n("Create New Profile..."));
|
||||
} else {
|
||||
action->setText(i18n("Edit Current Profile..."));
|
||||
@@ -951,8 +951,8 @@ void SessionController::editCurrentProfile()
|
||||
|
||||
auto profile = SessionManager::instance()->sessionProfile(session());
|
||||
auto state = EditProfileDialog::ExistingProfile;
|
||||
// Don't edit the Fallback profile, instead create a new one
|
||||
if (profile->isFallback()) {
|
||||
// Don't edit the built-in profile, instead create a new one
|
||||
if (profile->isBuiltin()) {
|
||||
auto newProfile = Profile::Ptr(new Profile(profile));
|
||||
newProfile->clone(profile, true);
|
||||
const QString uniqueName = ProfileManager::instance()->generateUniqueName();
|
||||
|
||||
Reference in New Issue
Block a user