mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-03 22:56:49 +00:00
Chat selection + proxy config => account (not all)
This commit is contained in:
parent
3a1c571c58
commit
441d333009
4 changed files with 33 additions and 6 deletions
|
|
@ -950,7 +950,7 @@ void App::openAppAfterInit (bool mustBeIconified) {
|
|||
#endif // ifndef __APPLE__
|
||||
|
||||
// Display Assistant if it does not exist proxy config.
|
||||
if (coreManager->getCore()->getProxyConfigList().empty())
|
||||
if (coreManager->getCore()->getAccountList().empty())
|
||||
QMetaObject::invokeMethod(mainWindow, "setView", Q_ARG(QVariant, AssistantViewName), Q_ARG(QVariant, QString("")));
|
||||
|
||||
#ifdef ENABLE_UPDATE_CHECK
|
||||
|
|
|
|||
|
|
@ -96,14 +96,21 @@ static void cliJoinConferenceAs (QHash<QString, QString> &args) {
|
|||
const QString fromSipAddress = args.take("guest-sip-address");
|
||||
const QString toSipAddress = args.take("sip-address");
|
||||
CoreManager *coreManager = CoreManager::getInstance();
|
||||
shared_ptr<linphone::ProxyConfig> proxyConfig = coreManager->getCore()->getDefaultProxyConfig();
|
||||
|
||||
/*shared_ptr<linphone::ProxyConfig> proxyConfig = coreManager->getCore()->getDefaultProxyConfig();
|
||||
if (!proxyConfig) {
|
||||
qWarning() << QStringLiteral("You have no proxy config.");
|
||||
return;
|
||||
}
|
||||
|
||||
const shared_ptr<const linphone::Address> currentSipAddress = proxyConfig->getIdentityAddress();
|
||||
*/
|
||||
shared_ptr<linphone::Account> account = coreManager->getCore()->getDefaultAccount();
|
||||
if (!account) {
|
||||
qWarning() << QStringLiteral("You have no account.");
|
||||
return;
|
||||
}
|
||||
|
||||
const shared_ptr<const linphone::Address> currentSipAddress = account->getParams()->getIdentityAddress();
|
||||
const shared_ptr<const linphone::Address> askedSipAddress = linphone::Factory::get()->createAddress(
|
||||
Utils::appStringToCoreString(fromSipAddress)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -413,13 +413,24 @@ void CoreManager::migrate () {
|
|||
.arg(rcVersion).arg(RcVersionCurrent);
|
||||
|
||||
// Add message_expires param on old proxy configs.
|
||||
/*
|
||||
for (const auto &proxyConfig : mCore->getProxyConfigList()) {
|
||||
if (proxyConfig->getDomain() == LinphoneDomain) {
|
||||
proxyConfig->setContactParameters(DefaultContactParameters);
|
||||
proxyConfig->setExpires(DefaultExpires);
|
||||
proxyConfig->done();
|
||||
}
|
||||
}*/
|
||||
for(const auto &account : mCore->getAccountList()){
|
||||
auto params = account->getParams();
|
||||
if( params->getDomain() == LinphoneDomain) {
|
||||
auto newParams = params->clone();
|
||||
newParams->setContactParameters(DefaultContactParameters);
|
||||
newParams->setExpires(DefaultExpires);
|
||||
account->setParams(newParams);
|
||||
}
|
||||
}
|
||||
|
||||
config->setInt(SettingsModel::UiSection, RcVersionName, RcVersionCurrent);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ Item {
|
|||
|
||||
TextEdit {
|
||||
id: message
|
||||
property string lastTextSelected : ''
|
||||
|
||||
anchors {
|
||||
left: container.left
|
||||
|
|
@ -101,19 +102,27 @@ Item {
|
|||
|
||||
onCursorRectangleChanged: Logic.ensureVisible(cursorRectangle)
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
onSelectedTextChanged:if(selectedText != '') lastTextSelected = selectedText
|
||||
onActiveFocusChanged: {
|
||||
if(activeFocus)
|
||||
lastTextSelected = ''
|
||||
deselect()
|
||||
}
|
||||
|
||||
onActiveFocusChanged: deselect()
|
||||
|
||||
Menu {
|
||||
id: messageMenu
|
||||
menuStyle : MenuStyle.aux
|
||||
MenuItem {
|
||||
text: qsTr('menuCopy')
|
||||
//: 'Copy all' : Text menu to copy all message text into clipboard
|
||||
text: (message.lastTextSelected == '' ? qsTr('menuCopyAll')
|
||||
//: 'Copy' : Text menu to copy selected text in message into clipboard
|
||||
: qsTr('menuCopy'))
|
||||
iconMenu: 'menu_copy_text'
|
||||
iconSizeMenu: 17
|
||||
iconLayoutDirection: Qt.RightToLeft
|
||||
menuItemStyle : MenuItemStyle.aux
|
||||
onTriggered: Clipboard.text = $chatEntry.content
|
||||
onTriggered: Clipboard.text = (message.lastTextSelected == '' ? $chatEntry.content : message.lastTextSelected)
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue