Fix settings and disable problematic features

- Add dialPlan type support to ComboSetting (international prefix now shows correctly)
- Replace logo.svg with new phone icon design
- Disable automatic update check on startup (default to false)
- Disable account devices feature to prevent API errors
- Remove devices section from account settings
- Add ringtone fallback to default when custom file not found

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Eduard Wisch 2026-02-08 08:16:03 +01:00
parent 6ad684c4b8
commit 6a0ab85191
5 changed files with 43 additions and 65 deletions

View file

@ -109,11 +109,8 @@ SettingsCore::SettingsCore(QObject *parent) : QObject(parent) {
mStorePlainTextPassword = settingsModel->getStorePlainTextPassword(); mStorePlainTextPassword = settingsModel->getStorePlainTextPassword();
mDefaultDomain = settingsModel->getDefaultDomain(); mDefaultDomain = settingsModel->getDefaultDomain();
auto currentAccount = CoreModel::getInstance()->getCore()->getDefaultAccount(); // Disable account devices feature to prevent API errors
if (currentAccount) { mShowAccountDevices = false;
auto accountDomain = Utils::coreStringToAppString(currentAccount->getParams()->getDomain());
mShowAccountDevices = (accountDomain == mDefaultDomain);
}
// Chat // Chat
mEmojiFont = settingsModel->getEmojiFont(); mEmojiFont = settingsModel->getEmojiFont();
@ -1252,9 +1249,8 @@ bool SettingsCore::getStorePlainTextPassword() const {
void SettingsCore::setStorePlainTextPassword(bool enabled) { void SettingsCore::setStorePlainTextPassword(bool enabled) {
if (mStorePlainTextPassword != enabled) { if (mStorePlainTextPassword != enabled) {
mStorePlainTextPassword = enabled; mStorePlainTextPassword = enabled;
mSettingsModelConnection->invokeToModel([enabled]() { mSettingsModelConnection->invokeToModel(
SettingsModel::getInstance()->setStorePlainTextPassword(enabled); [enabled]() { SettingsModel::getInstance()->setStorePlainTextPassword(enabled); });
});
emit storePlainTextPasswordChanged(enabled); emit storePlainTextPasswordChanged(enabled);
} }
} }

69
Linphone/data/image/logo.svg Normal file → Executable file
View file

@ -1,49 +1,22 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<svg <defs>
width="512" <linearGradient id="bgGradient" x1="0%" y1="0%" x2="100%" y2="100%">
height="512" <stop offset="0%" style="stop-color:#FF6B35"/>
viewBox="0 0 512 512" <stop offset="100%" style="stop-color:#E54D12"/>
fill="none" </linearGradient>
version="1.1" </defs>
id="svg8"
sodipodi:docname="linphone_logo.svg" <!-- Background rounded square -->
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)" <rect x="32" y="32" width="448" height="448" rx="80" ry="80" fill="url(#bgGradient)"/>
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" <!-- Phone handset - classic design, scaled and centered -->
xmlns="http://www.w3.org/2000/svg" <g transform="translate(128, 128) scale(1.0)">
xmlns:svg="http://www.w3.org/2000/svg"> <path d="M231.88,175.08A56.26,56.26,0,0,1,176,224C96.6,224,32,159.4,32,80A56.26,56.26,0,0,1,80.92,24.12a16,16,0,0,1,16.62,9.52l21.12,47.15,0,.12A16,16,0,0,1,117.39,96c-.18.27-.37.52-.57.77L96,121.45c7.49,15.22,23.41,31,38.83,38.51l24.34-20.71a8.12,8.12,0,0,1,.75-.56,16,16,0,0,1,15.17-1.4l.13.06,47.11,21.11A16,16,0,0,1,231.88,175.08Z" fill="white"/>
<defs </g>
id="defs12" />
<sodipodi:namedview <!-- Connection wave lines -->
id="namedview10" <g stroke="white" stroke-width="14" fill="none" stroke-linecap="round" opacity="0.85">
pagecolor="#ffffff" <path d="M340,180 Q400,256 340,332" />
bordercolor="#666666" <path d="M380,140 Q460,256 380,372" />
borderopacity="1.0" </g>
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
showgrid="false"
inkscape:zoom="1.6269531"
inkscape:cx="256"
inkscape:cy="255.69268"
inkscape:window-width="1920"
inkscape:window-height="1163"
inkscape:window-x="1920"
inkscape:window-y="500"
inkscape:window-maximized="1"
inkscape:current-layer="svg8" />
<rect
width="512"
height="512"
rx="50"
fill="#FF5E00"
id="rect2" />
<path
d="M136.974 166.579C136.974 166.579 107.974 206.579 112.474 224.58C112.319 223.882 131.474 203.579 131.474 203.579C132.474 209.079 178.974 222.58 178.974 222.58C185.148 226.515 187.276 229.341 188.474 235.58V259.58C204.537 269.574 219.292 272.89 254.974 275.08C292.887 273.464 308.546 270.106 322.474 259.58C322.474 259.58 320.974 241.079 322.474 234.579C323.974 228.079 327.303 224.362 332.474 222.58C351.767 218.166 361.29 213.337 379.474 204.079L399.474 224.58C396.435 202.04 391.212 189.564 375.474 167.58C362.98 153.302 354.969 145.814 338.474 133.58C320.542 122.984 310.592 118.939 292.974 114.08C262.394 107.818 245.536 107.837 215.974 114.08C197.861 119.541 188.833 123.661 175.474 133.58C175.474 133.58 124.974 104.579 118.474 109.579C111.974 114.579 136.974 166.579 136.974 166.579Z"
fill="white"
id="path4" />
<path
d="M171.5 321.5C148.272 311.332 135.686 303.651 114 286.5C119.214 308.087 124.076 319.453 136 338.5C148.706 355.695 156.513 363.368 171.5 374C187.708 385.124 197.428 389.987 216 396C232.684 400.01 241.987 401.288 258.5 401.5C275.337 400.657 284.074 398.822 298.5 395.5C314.412 389.159 322.518 385.161 336 377.5C358.355 390.12 386 404.5 390 398.5C394 392.5 372 344 372 344C386.673 322.985 392.675 308.833 398.5 285C378.414 300.757 365.365 309.951 340.5 321.5C309.742 333.632 291.828 337.528 258.5 338.5C219.673 337.823 200.725 333.981 171.5 321.5Z"
fill="white"
id="path6" />
</svg> </svg>

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

12
Linphone/model/setting/SettingsModel.cpp Normal file → Executable file
View file

@ -472,6 +472,15 @@ void SettingsModel::setRingtone(QString ringtonePath) {
mustBeInLinphoneThread(log().arg(Q_FUNC_INFO)); mustBeInLinphoneThread(log().arg(Q_FUNC_INFO));
QFileInfo ringtone(ringtonePath); QFileInfo ringtone(ringtonePath);
if (ringtonePath.isEmpty() || !ringtone.exists()) { if (ringtonePath.isEmpty() || !ringtone.exists()) {
// Fallback to default ringtone if file not found
auto factory = linphone::Factory::get();
auto defaultRing = factory->getRingResourcesDir() + "/rings/oldphone-mono.wav";
QFileInfo defaultRingtone(QString::fromStdString(defaultRing));
if (defaultRingtone.exists()) {
lInfo() << "Custom ringtone not found, using default: " << defaultRing;
CoreModel::getInstance()->getCore()->setRing(defaultRing);
emit ringtoneChanged(QString::fromStdString(defaultRing));
}
} else { } else {
CoreModel::getInstance()->getCore()->setRing(Utils::appStringToCoreString(ringtonePath)); CoreModel::getInstance()->getCore()->setRing(Utils::appStringToCoreString(ringtonePath));
emit ringtoneChanged(ringtonePath); emit ringtoneChanged(ringtonePath);
@ -954,7 +963,8 @@ bool SettingsModel::isCheckForUpdateAvailable() const {
} }
bool SettingsModel::isCheckForUpdateEnabled() const { bool SettingsModel::isCheckForUpdateEnabled() const {
return !!mConfig->getInt(UiSection, "check_for_update_enabled", isCheckForUpdateAvailable()); // Default to false to disable automatic update checks
return !!mConfig->getInt(UiSection, "check_for_update_enabled", 0);
} }
void SettingsModel::setCheckForUpdateEnabled(bool enable) { void SettingsModel::setCheckForUpdateEnabled(bool enable) {

7
Linphone/view/Control/Button/Settings/ComboSetting.qml Normal file → Executable file
View file

@ -64,6 +64,9 @@ RowLayout {
} else if (entry.value !== undefined) { } else if (entry.value !== undefined) {
// Simple entries (language, color): compare by value // Simple entries (language, color): compare by value
return entry.value === currentVal return entry.value === currentVal
} else if (entry.flag !== undefined && entry.text !== undefined) {
// DialPlan entries: compare by text (stored as full object)
return currentVal && entry.text === currentVal.text
} }
return false return false
}) })
@ -84,6 +87,9 @@ RowLayout {
} else if (entry.value !== undefined) { } else if (entry.value !== undefined) {
// Simple entries: compare by value // Simple entries: compare by value
binding.when = entry.value !== storedVal binding.when = entry.value !== storedVal
} else if (entry.flag !== undefined && entry.text !== undefined) {
// DialPlan entries: compare by text
binding.when = !storedVal || entry.text !== storedVal.text
} }
} }
Binding { Binding {
@ -98,6 +104,7 @@ RowLayout {
if (typeof entry === 'string') return entry // QStringList if (typeof entry === 'string') return entry // QStringList
if (entry.id !== undefined) return entry // Audio devices if (entry.id !== undefined) return entry // Audio devices
if (entry.value !== undefined) return entry.value // Simple entries if (entry.value !== undefined) return entry.value // Simple entries
if (entry.flag !== undefined) return entry // DialPlan (return full object)
return entry return entry
} }
when: false when: false

View file

@ -21,14 +21,6 @@ AbstractSettingsLayout {
//: Éditer les informations de votre compte. //: Éditer les informations de votre compte.
subTitle: qsTr("manage_account_details_subtitle"), subTitle: qsTr("manage_account_details_subtitle"),
contentComponent: accountParametersComponent contentComponent: accountParametersComponent
},
{
visible: SettingsCpp.showAccountDevices,
//: "Vos appareils"
title: qsTr("manage_account_devices_title"),
//: "La liste des appareils connectés à votre compte. Vous pouvez retirer les appareils que vous nutilisez plus."
subTitle: qsTr("manage_account_devices_subtitle"),
contentComponent: accountDevicesComponent
} }
] ]