mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Option to change the max results of the Magic Search bar.
Keep display name while changing username/phone in assistant. Update SDK to 5.2.84
This commit is contained in:
parent
59ea9c69e5
commit
23297f07d4
23 changed files with 124 additions and 8 deletions
|
|
@ -3697,6 +3697,11 @@ Klikněte zde: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Klik her: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Klicken Sie hier: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3685,6 +3685,11 @@ Click here: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation>Display only usernames from SIP addresses</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation>Max results on search</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Haga clic aquí: <a href="%1">%1 </a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Cliquez ici : <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation>Lorsque des adresses SIP sont affichées, n'afficher que les noms d'utilisateurs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3647,6 +3647,11 @@ Kattintson ide: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Clicca: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3647,6 +3647,11 @@
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3673,6 +3673,11 @@ Spustelėkite čia: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Clique aqui: <a href="%1">%1 </a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3673,6 +3673,11 @@
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3660,6 +3660,11 @@ Klicka här: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3647,6 +3647,11 @@ Buraya tıklayın: <a href="%1">%1</a>
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3673,6 +3673,11 @@
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -3647,6 +3647,11 @@
|
|||
<extracomment>'Display only usernames from SIP addresses' : tooltip for addresses display mode where username is only shown.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>magicSearchMaxResultsLabel</source>
|
||||
<extracomment>'Max results on search' : Label for setting the max results returned by the Magic Search bar.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsVideo</name>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
#include "components/core/CoreManager.hpp"
|
||||
#include "components/history/HistoryModel.hpp"
|
||||
#include "components/settings/AccountSettingsModel.hpp"
|
||||
#include "components/settings/SettingsModel.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
|
||||
#include "SearchResultModel.hpp"
|
||||
|
|
@ -62,9 +63,10 @@ SearchSipAddressesModel::~SearchSipAddressesModel(){
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
void SearchSipAddressesModel::setFilter(const QString& filter){
|
||||
if(!filter.isEmpty())
|
||||
if(!filter.isEmpty()){
|
||||
mMagicSearch->setSearchLimit((int)CoreManager::getInstance()->getSettingsModel()->getMagicSearchMaxResults());
|
||||
mMagicSearch->getContactsListAsync(filter.toStdString(),"", (int)linphone::MagicSearchSource::All, linphone::MagicSearchAggregation::None);
|
||||
else{
|
||||
}else{
|
||||
beginResetModel();
|
||||
mList.clear();
|
||||
endResetModel();
|
||||
|
|
|
|||
|
|
@ -1703,6 +1703,17 @@ void SettingsModel::setSipDisplayMode(Utils::SipDisplayMode mode){
|
|||
}
|
||||
}
|
||||
|
||||
int SettingsModel::getMagicSearchMaxResults() const {
|
||||
return mConfig->getInt(UiSection, "magic_search_max_results", 30);
|
||||
}
|
||||
|
||||
void SettingsModel::setMagicSearchMaxResults(int maxResults) {
|
||||
if(getMagicSearchMaxResults() != maxResults){
|
||||
mConfig->setInt(UiSection, "magic_search_max_results", maxResults);
|
||||
emit magicSearchMaxResultsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Advanced.
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -223,6 +223,7 @@ class SettingsModel : public QObject {
|
|||
Q_PROPERTY(bool mipmapEnabled READ isMipmapEnabled WRITE setMipmapEnabled NOTIFY mipmapEnabledChanged)
|
||||
Q_PROPERTY(bool useMinimalTimelineFilter READ useMinimalTimelineFilter WRITE setUseMinimalTimelineFilter NOTIFY useMinimalTimelineFilterChanged)
|
||||
Q_PROPERTY(Utils::SipDisplayMode sipDisplayMode READ getSipDisplayMode WRITE setSipDisplayMode NOTIFY sipDisplayModeChanged)
|
||||
Q_PROPERTY(int magicSearchMaxResults READ getMagicSearchMaxResults WRITE setMagicSearchMaxResults NOTIFY magicSearchMaxResultsChanged)
|
||||
|
||||
// Advanced. -----------------------------------------------------------------
|
||||
|
||||
|
|
@ -618,6 +619,9 @@ public:
|
|||
Utils::SipDisplayMode getSipDisplayMode() const;
|
||||
void setSipDisplayMode(Utils::SipDisplayMode mode);
|
||||
|
||||
int getMagicSearchMaxResults() const;
|
||||
void setMagicSearchMaxResults(int maxResults);
|
||||
|
||||
// Advanced. ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
@ -843,6 +847,8 @@ signals:
|
|||
void versionCheckUrlChanged();
|
||||
void versionCheckTypeChanged();
|
||||
|
||||
void magicSearchMaxResultsChanged();
|
||||
|
||||
// Advanced. -----------------------------------------------------------------
|
||||
|
||||
void logsFolderChanged (const QString &folder);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,9 @@ AssistantAbstractView {
|
|||
anchors.left: loader.left
|
||||
|
||||
onClicked: {
|
||||
var displayNameBackup = assistantModel.displayName
|
||||
assistantModel.reset()
|
||||
assistantModel.displayName = displayNameBackup
|
||||
requestBlock.setText('')
|
||||
|
||||
if (!checked) {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ Form {
|
|||
label: qsTr('displayNameLabel')
|
||||
|
||||
TextField {
|
||||
onTextChanged: assistantModel.displayName = text
|
||||
text: assistantModel.displayName
|
||||
onTextChanged: if( assistantModel.displayName != text) assistantModel.displayName = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -50,8 +51,8 @@ Form {
|
|||
id: phoneNumber
|
||||
|
||||
inputMethodHints: Qt.ImhDialableCharactersOnly
|
||||
|
||||
onTextChanged: assistantModel.phoneNumber = text
|
||||
text: assistantModel.phoneNumber
|
||||
onTextChanged: if( assistantModel.phoneNumber != text) assistantModel.phoneNumber = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ Form {
|
|||
label: qsTr('displayNameLabel')
|
||||
|
||||
TextField {
|
||||
onTextChanged: assistantModel.displayName = text
|
||||
text: assistantModel.displayName
|
||||
onTextChanged: if( assistantModel.displayName != text) assistantModel.displayName = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -28,8 +29,8 @@ Form {
|
|||
|
||||
TextField {
|
||||
id: username
|
||||
|
||||
onTextChanged: assistantModel.username = text
|
||||
text: assistantModel.username
|
||||
onTextChanged: if( assistantModel.username != text) assistantModel.username = text
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,6 +302,19 @@ TabContainer {
|
|||
}
|
||||
}
|
||||
}
|
||||
FormGroup {
|
||||
//: 'Max results on search' : Label for setting the max results returned by the Magic Search bar.
|
||||
label: qsTr('magicSearchMaxResultsLabel')
|
||||
|
||||
NumericField {
|
||||
minValue: 0
|
||||
maxValue: 100000
|
||||
step: 5
|
||||
text: SettingsModel.magicSearchMaxResults
|
||||
|
||||
onEditingFinished: SettingsModel.magicSearchMaxResults = text
|
||||
}
|
||||
}
|
||||
}
|
||||
FormLine {
|
||||
maxItemWidth: parent.width
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue