mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-17 11:28:07 +00:00
- Update Settings navigation, add placeholders to fields, auto-update server address with the selected protocol
- Set to TLS if transport cannot be defined - Add Title to MenuBar and console info if SystemTray is unavailable - Fix setting icon in qrc for future using - Add old CPACK in CMake
This commit is contained in:
parent
e6d1b4cad5
commit
6bda98b8f2
8 changed files with 56 additions and 38 deletions
|
|
@ -342,7 +342,7 @@ else()
|
|||
)
|
||||
endif ()
|
||||
|
||||
set(QRC_RESOURCES resources.qrc)
|
||||
set(QRC_RESOURCES resources.qrc)
|
||||
|
||||
set(LANGUAGES_DIRECTORY "${ASSETS_DIR}/languages")
|
||||
set(I18N_FILENAME i18n.qrc)
|
||||
|
|
@ -371,17 +371,17 @@ else()
|
|||
set(QML_SOURCES)
|
||||
file(STRINGS ${QRC_RESOURCES} QRC_RESOURCES_CONTENT)
|
||||
foreach (line ${QRC_RESOURCES_CONTENT})
|
||||
set(result)
|
||||
string(REGEX REPLACE
|
||||
"^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$"
|
||||
"\\1"
|
||||
result
|
||||
"${line}"
|
||||
)
|
||||
string(REGEX MATCH "\\.[a-z]+$" is_ui ${result})
|
||||
if (NOT ${is_ui} STREQUAL "")
|
||||
list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}")
|
||||
endif ()
|
||||
set(result)
|
||||
string(REGEX REPLACE
|
||||
"^[ \t]*<[ \t]*file[ \t]*>[ \t]*(.+\\.[a-z]+)[ \t]*<[ \t]*/[ \t]*file[ \t]*>[ \t]*$"
|
||||
"\\1"
|
||||
result
|
||||
"${line}"
|
||||
)
|
||||
string(REGEX MATCH "\\.[a-z]+$" is_ui ${result})
|
||||
if (NOT ${is_ui} STREQUAL "")
|
||||
list(APPEND QML_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${result}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ mkdir -p build-desktop
|
|||
cd build-desktop
|
||||
#cmake .. -DLINPHONESDK_PLATFORM=Desktop -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_VPX=YES -DENABLE_GPL_THIRD_PARTIES=YES -DENABLE_NON_FREE_CODECS=YES -DENABLE_AMRNB=YES -DENABLE_AMRWB=YES -DENABLE_G729=YES -DENABLE_GSM=YES -DENABLE_ILBC=YES -DENABLE_ISAC=YES -DENABLE_SILK=YES -DENABLE_SPEEX=YES -DENABLE_H263=YES -DENABLE_H263P=YES -DENABLE_MPEG4=YES -DENABLE_OPENH264=YES -DENABLE_FFMPEG=YES -DENABLE_VIDEO=YES -DENABLE_GL=YES -DENABLE_OPUS=NO
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
cmake --build . --target all --config RelWithDebInfo --parallel 10
|
||||
cmake --build . --target sdk --config RelWithDebInfo --parallel 10
|
||||
|
||||
#MiniZip Building
|
||||
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||
|
|
|
|||
|
|
@ -309,27 +309,27 @@ endif ()
|
|||
#endif ()
|
||||
|
||||
# ==============================================================================
|
||||
# CPack.
|
||||
# CPack.
|
||||
# ==============================================================================
|
||||
|
||||
#set(CPACK_PACKAGE_NAME "${APPLICATION_NAME}")
|
||||
#set(CPACK_PACKAGE_VENDOR "${APPLICATION_VENDOR}")
|
||||
#set(CPACK_PACKAGE_VERSION_MAJOR ${LINPHONE_MAJOR_VERSION})
|
||||
#set(CPACK_PACKAGE_VERSION_MINOR ${LINPHONE_MINOR_VERSION})
|
||||
#if (LINPHONE_MICRO_VERSION)
|
||||
# set(CPACK_PACKAGE_VERSION_PATCH ${LINPHONE_MICRO_VERSION})
|
||||
#endif ()
|
||||
#set(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};${APPLICATION_NAME}")
|
||||
#set(CPACK_PACKAGE_INSTALL_DIRECTORY "${APPLICATION_NAME}")
|
||||
#set(CPACK_RESOURCE_FILE_LICENSE "${LINPHONE_DESKTOP_DIR}/LICENSE.txt")
|
||||
set(CPACK_PACKAGE_NAME "${APPLICATION_NAME}")
|
||||
set(CPACK_PACKAGE_VENDOR "${APPLICATION_VENDOR}")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${LINPHONE_MAJOR_VERSION})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${LINPHONE_MINOR_VERSION})
|
||||
if (LINPHONE_MICRO_VERSION)
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${LINPHONE_MICRO_VERSION})
|
||||
endif ()
|
||||
set(CPACK_PACKAGE_EXECUTABLES "${EXECUTABLE_NAME};${APPLICATION_NAME}")
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${APPLICATION_NAME}")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${LINPHONE_DESKTOP_DIR}/LICENSE.txt")
|
||||
|
||||
#if (APPLE)
|
||||
# set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${LINPHONE_GIT_REVISION}-mac")
|
||||
# set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/macos/background_dmg.jpg")
|
||||
if (APPLE)
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${LINPHONE_GIT_REVISION}-mac")
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_CURRENT_SOURCE_DIR}/macos/background_dmg.jpg")
|
||||
|
||||
# configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone_dmg.scpt.in" "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt" @ONLY)
|
||||
# set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt")
|
||||
#endif ()
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/macos/linphone_dmg.scpt.in" "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt" @ONLY)
|
||||
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/linphone_dmg.scpt")
|
||||
endif ()
|
||||
|
||||
if (WIN32)
|
||||
set(CPACK_GENERATOR "NSIS")
|
||||
|
|
|
|||
|
|
@ -480,5 +480,6 @@
|
|||
<file>ui/views/App/Main/MainWindowTopMenuBar.qml</file>
|
||||
<file>ui/dev-modules/Colors/Colors.qml</file>
|
||||
<file>ui/dev-modules/Units/Units.qml</file>
|
||||
<file>assets/icon.ico</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
|||
|
|
@ -558,6 +558,8 @@ void App::registerSharedToolTypes () {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
void App::setTrayIcon () {
|
||||
if(!QSystemTrayIcon::isSystemTrayAvailable())
|
||||
qInfo() << "System tray is not available";
|
||||
QQuickWindow *root = getMainWindow();
|
||||
QSystemTrayIcon *systemTrayIcon = new QSystemTrayIcon(mEngine);
|
||||
|
||||
|
|
@ -596,7 +598,7 @@ void App::setTrayIcon () {
|
|||
root->hide();
|
||||
}
|
||||
});
|
||||
|
||||
menu->setTitle(APPLICATION_NAME);
|
||||
// Build trayIcon menu.
|
||||
menu->addAction(settingsAction);
|
||||
menu->addAction(aboutAction);
|
||||
|
|
@ -605,11 +607,12 @@ void App::setTrayIcon () {
|
|||
menu->addSeparator();
|
||||
menu->addAction(quitAction);
|
||||
|
||||
|
||||
|
||||
systemTrayIcon->setContextMenu(menu);
|
||||
systemTrayIcon->setIcon(QIcon(LinphoneUtils::WindowIconPath));
|
||||
systemTrayIcon->setToolTip(APPLICATION_NAME);
|
||||
systemTrayIcon->show();
|
||||
|
||||
mSystemTrayIcon = systemTrayIcon;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,11 @@ QVariantMap AccountSettingsModel::getProxyConfigDescription (const shared_ptr<li
|
|||
}
|
||||
map["serverAddress"] = Utils::coreStringToAppString(proxyConfig->getServerAddr());
|
||||
map["registrationDuration"] = proxyConfig->getPublishExpires();
|
||||
map["transport"] = Utils::coreStringToAppString(proxyConfig->getTransport());
|
||||
QString transport = QString::fromStdString(proxyConfig->getTransport());
|
||||
if(transport == "")
|
||||
map["transport"] = "tls";// Set to TLS by default
|
||||
else
|
||||
map["transport"] = transport;
|
||||
if( proxyConfig->getRoutes().size() > 0)
|
||||
map["route"] = Utils::coreStringToAppString(proxyConfig->getRoutes().front());
|
||||
else
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress
|
|||
);
|
||||
|
||||
if (!address)
|
||||
return QString("");
|
||||
return QString("TLS"); // Return TLS by default
|
||||
|
||||
switch (address->getTransport()) {
|
||||
case linphone::TransportType::Udp:
|
||||
|
|
@ -162,7 +162,7 @@ QString SipAddressesModel::getTransportFromSipAddress (const QString &sipAddress
|
|||
return QStringLiteral("DTLS");
|
||||
}
|
||||
|
||||
return QString("");
|
||||
return QString("TLS");
|
||||
}
|
||||
|
||||
QString SipAddressesModel::addTransportToSipAddress (const QString &sipAddress, const QString &transport) {
|
||||
|
|
|
|||
|
|
@ -58,10 +58,12 @@ DialogPlus {
|
|||
|
||||
TextField {
|
||||
id: sipAddress
|
||||
placeholderText: 'sip:name@sip.linphone.org'
|
||||
|
||||
error: dialog._sipAddressOk ? '' : qsTr('invalidSipAddress')
|
||||
|
||||
onTextChanged: Logic.handleSipAddressChanged(text)
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -72,10 +74,11 @@ DialogPlus {
|
|||
|
||||
TextField {
|
||||
id: serverAddress
|
||||
|
||||
error: dialog._serverAddressOk ? '' : qsTr('invalidServerAddress')
|
||||
|
||||
placeholderText: 'sip:sip.linphone.org'
|
||||
error: dialog._serverAddressOk ? '' : qsTr('invalidServerAddress')
|
||||
onActiveFocusChanged: if(!activeFocus && dialog._serverAddressOk) Logic.handleTransportChanged(transport.model[transport.currentIndex])
|
||||
onTextChanged: Logic.handleServerAddressChanged(text)
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -86,6 +89,7 @@ DialogPlus {
|
|||
|
||||
NumericField {
|
||||
id: registrationDuration
|
||||
Keys.onReturnPressed: route.forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -115,6 +119,7 @@ DialogPlus {
|
|||
error: dialog._routeOk ? '' : qsTr('invalidRoute')
|
||||
|
||||
onTextChanged: Logic.handleRouteChanged(text)
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -125,6 +130,7 @@ DialogPlus {
|
|||
|
||||
TextField {
|
||||
id: contactParams
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -138,6 +144,7 @@ DialogPlus {
|
|||
|
||||
maxValue: 5
|
||||
minValue: 1
|
||||
Keys.onReturnPressed: focus=false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -203,8 +210,10 @@ DialogPlus {
|
|||
|
||||
TextField {
|
||||
id: stunServer
|
||||
placeholderText: 'stun.linphone.org'
|
||||
|
||||
readOnly: !iceEnabled.checked
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -229,6 +238,7 @@ DialogPlus {
|
|||
id: turnUser
|
||||
|
||||
readOnly: !turnEnabled.checked || !turnEnabled.enabled
|
||||
Keys.onReturnPressed: nextItemInFocusChain().forceActiveFocus()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue