mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-20 21:28:07 +00:00
- Add Vendor and copyright ranges
- Color customization on tray event count - Allow the use of a custom URL for remote provisioning(first stage dev) - Fix assistant to come back to home if no more items - Update icon generation to inkscape 1.1
This commit is contained in:
parent
aae6dd02af
commit
809abc653b
15 changed files with 180 additions and 118 deletions
|
|
@ -55,6 +55,12 @@ list(APPEND CMAKE_MODULE_PATH "${LINPHONE_OUTPUT_DIR}/cmake")
|
|||
set(APP_LIBRARY app-library)
|
||||
set(APP_PLUGIN app-plugin)
|
||||
include(application_info.cmake)
|
||||
string(TIMESTAMP CURRENT_YEAR "%Y")
|
||||
if( "${CURRENT_YEAR}" STREQUAL "${APPLICATION_START_LICENCE}")
|
||||
set(COPYRIGHT_RANGE_DATE "${APPLICATION_START_LICENCE}")
|
||||
else()
|
||||
set(COPYRIGHT_RANGE_DATE "${APPLICATION_START_LICENCE}-${CURRENT_YEAR}")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(EXECUTABLE_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
|
@ -467,8 +473,6 @@ list(APPEND SOURCES ${TS_FILES})
|
|||
|
||||
# set application details
|
||||
if(WIN32)
|
||||
string(TIMESTAMP CURRENT_YEAR "%Y")
|
||||
set(COPYRIGTH_RANGE_DATE "2010-${CURRENT_YEAR}")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_builder/linphone_package/windows/appDetailsWindows.rc.in" "${CMAKE_CURRENT_BINARY_DIR}/appDetailsWindows.rc")
|
||||
set(RC_FILE ${CMAKE_CURRENT_BINARY_DIR}/appDetailsWindows.rc)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -3,5 +3,7 @@ set(APPLICATION_ID "com.belledonnecommunications.linphone")
|
|||
set(APPLICATION_NAME Linphone)
|
||||
set(APPLICATION_URL "https://www.linphone.org")
|
||||
set(APPLICATION_VENDOR "Belledonne Communications")
|
||||
set(APPLICATION_LICENCE "GNU General Public License V3")
|
||||
set(APPLICATION_START_LICENCE "2010")
|
||||
|
||||
set(EXECUTABLE_NAME linphone)
|
||||
|
|
|
|||
27
linphone-app/assets/icons/genicons_1.1.sh
Executable file
27
linphone-app/assets/icons/genicons_1.1.sh
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
##
|
||||
## Copyright (c) 2010-2020 Belledonne Communications SARL.
|
||||
##
|
||||
## This file is part of linphone-desktop
|
||||
## (see https://www.linphone.org).
|
||||
##
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
##
|
||||
|
||||
for i in 16 22 24 32 64 128 256
|
||||
do
|
||||
mkdir -p hicolor/${i}x${i}/apps
|
||||
inkscape -z --export-type=png --export-filename=hicolor/${i}x${i}/apps/icon.png -w $i -h $i ../images/linphone_logo.svg
|
||||
done
|
||||
convert hicolor/16x16/apps/icon.png hicolor/22x22/apps/icon.png hicolor/24x24/apps/icon.png hicolor/32x32/apps/icon.png hicolor/64x64/apps/icon.png hicolor/128x128/apps/icon.png hicolor/256x256/apps/icon.png -colors 256 ../icon.ico
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<key>CFBundleExecutable</key>
|
||||
<string>@EXECUTABLE_NAME@</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>@PACKAGE_VERSION@, (C) 2011-2020 @APPLICATION_NAME@ @APPLICATION_URL@</string>
|
||||
<string>@PACKAGE_VERSION@, (C) @COPYRIGHT_RANGE_DATE@ @APPLICATION_NAME@ @APPLICATION_URL@</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>@EXECUTABLE_NAME@.icns</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<key>CFBundleVersion</key>
|
||||
<string>@PACKAGE_VERSION@</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright 2011-2020 @APPLICATION_VENDOR@</string>
|
||||
<string>Copyright @COPYRIGHT_RANGE_DATE@ @APPLICATION_VENDOR@</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>@CMAKE_OSX_DEPLOYMENT_TARGET@</string>
|
||||
<key>NSAppSleepDisabled</key>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ VS_VERSION_INFO VERSIONINFO
|
|||
VALUE "FileDescription", "${APPLICATION_NAME} - ${APPLICATION_DESCRIPTION}\0"
|
||||
VALUE "FileVersion", "${FULL_VERSION}"
|
||||
VALUE "ProductVersion", "${version_major}.${version_minor}.${version_patch}\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) ${COPYRIGTH_RANGE_DATE} ${APPLICATION_VENDOR} ${APPLICATION_URL}\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) ${COPYRIGHT_RANGE_DATE} ${APPLICATION_VENDOR} ${APPLICATION_URL}\0"
|
||||
VALUE "OriginalFilename", "${EXECUTABLE_NAME}.exe\0"
|
||||
VALUE "ProductName", "${APPLICATION_NAME}\0"
|
||||
END
|
||||
|
|
|
|||
|
|
@ -373,6 +373,13 @@ void App::initContentApp () {
|
|||
mEngine->addImageProvider(ThumbnailProvider::ProviderId, new ThumbnailProvider());
|
||||
|
||||
mEngine->rootContext()->setContextProperty("applicationUrl", APPLICATION_URL);
|
||||
mEngine->rootContext()->setContextProperty("applicationVendor", APPLICATION_VENDOR);
|
||||
#ifdef APPLICATION_LICENCE
|
||||
mEngine->rootContext()->setContextProperty("applicationLicence", APPLICATION_LICENCE);
|
||||
#else
|
||||
mEngine->rootContext()->setContextProperty("applicationLicence", "");
|
||||
#endif
|
||||
mEngine->rootContext()->setContextProperty("copyrightRangeDate", COPYRIGHT_RANGE_DATE);
|
||||
mEngine->rootContext()->setContextProperty("Colors", mColorListModel->getQmlData());
|
||||
mEngine->rootContext()->setContextProperty("Images", mImageListModel->getQmlData());
|
||||
|
||||
|
|
@ -736,8 +743,6 @@ void App::setTrayIcon () {
|
|||
menu->addSeparator();
|
||||
menu->addAction(quitAction);
|
||||
|
||||
|
||||
|
||||
systemTrayIcon->setContextMenu(menu);
|
||||
systemTrayIcon->setIcon(QIcon(Constants::WindowIconPath));
|
||||
systemTrayIcon->setToolTip(APPLICATION_NAME);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#include "app/App.hpp"
|
||||
#include "utils/Utils.hpp"
|
||||
#include "utils/Constants.hpp"
|
||||
#include "components/other/colors/ColorListModel.hpp"
|
||||
|
||||
#include "EventCountNotifierSystemTrayIcon.hpp"
|
||||
|
||||
|
|
@ -37,10 +38,8 @@ namespace {
|
|||
constexpr int IconWidth = 256;
|
||||
constexpr int IconHeight = 256;
|
||||
|
||||
constexpr char IconCounterBackgroundColor[] = "#FF3C31";
|
||||
constexpr int IconCounterBackgroundRadius = 100;
|
||||
constexpr int IconCounterBlinkInterval = 1000;
|
||||
constexpr char IconCounterTextColor[] = "#FFFBFA";
|
||||
constexpr int IconCounterTextPixelSize = 144;
|
||||
}
|
||||
|
||||
|
|
@ -92,7 +91,7 @@ void EventCountNotifier::notifyEventCount (int n) {
|
|||
|
||||
// Draw background.
|
||||
{
|
||||
p.setBrush(QColor(IconCounterBackgroundColor));
|
||||
p.setBrush(App::getInstance()->getColorListModel()->addImageColor("Logo_tray_blink_bg", Constants::WindowIconPath,"b")->getColor());
|
||||
p.drawEllipse(QPointF(width / 2, height / 2), IconCounterBackgroundRadius, IconCounterBackgroundRadius);
|
||||
}
|
||||
|
||||
|
|
@ -102,7 +101,7 @@ void EventCountNotifier::notifyEventCount (int n) {
|
|||
font.setPixelSize(IconCounterTextPixelSize);
|
||||
|
||||
p.setFont(font);
|
||||
p.setPen(QPen(QColor(IconCounterTextColor), 1));
|
||||
p.setPen(QPen(App::getInstance()->getColorListModel()->addImageColor("Logo_tray_blink_fg", Constants::WindowIconPath,"ai")->getColor(), 1));
|
||||
p.drawText(QRect(0, 0, width, height), Qt::AlignCenter, QString::number(n));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -322,7 +322,22 @@ void ColorListModel::handleUiColorChanged(const QString& id, const QColor& color
|
|||
}
|
||||
//--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
/* Snippet for having 2 custom colors
|
||||
QPixmap ColorListModel::getLogoIcon(){
|
||||
// Icon colors
|
||||
QPixmap foregroundPixmap = QPixmap(Constants::WindowIconPath);
|
||||
QPixmap backgroundPixmap = QPixmap(Constants::WindowIconPath);
|
||||
QBitmap inMask = backgroundPixmap.createMaskFromColor(QColor("black"), Qt::MaskInColor);
|
||||
QBitmap outMask = backgroundPixmap.createMaskFromColor(QColor("black"), Qt::MaskOutColor);
|
||||
backgroundPixmap.fill(App::getInstance()->getColorListModel()->addImageColor("Logo_bg", Constants::WindowIconPath, "i")->getColor());
|
||||
backgroundPixmap.setMask(inMask);
|
||||
foregroundPixmap.fill(App::getInstance()->getColorListModel()->addImageColor("Logo_fg", Constants::WindowIconPath, "ai")->getColor());
|
||||
foregroundPixmap.setMask(outMask);
|
||||
QPainter painter(&backgroundPixmap);
|
||||
painter.drawPixmap(0,backgroundPixmap.height()-foregroundPixmap.height(),foregroundPixmap);
|
||||
|
||||
return backgroundPixmap;
|
||||
}*/
|
||||
|
||||
/*
|
||||
std::shared_ptr<ColorModel> ColorListModel::getImdnState(const std::shared_ptr<const linphone::Color> & state){
|
||||
|
|
|
|||
|
|
@ -1238,10 +1238,15 @@ QString SettingsModel::getRemoteProvisioning () const {
|
|||
}
|
||||
|
||||
void SettingsModel::setRemoteProvisioning (const QString &remoteProvisioning) {
|
||||
if (!CoreManager::getInstance()->getCore()->setProvisioningUri(Utils::appStringToCoreString(remoteProvisioning)))
|
||||
emit remoteProvisioningChanged(remoteProvisioning);
|
||||
QString urlRemoteProvisioning = remoteProvisioning;
|
||||
QUrl url(urlRemoteProvisioning);
|
||||
if( !url.isValid()) {
|
||||
urlRemoteProvisioning = QString(Constants::RemoteProvisioningURL) +"/"+ remoteProvisioning;
|
||||
}
|
||||
if (!CoreManager::getInstance()->getCore()->setProvisioningUri(Utils::appStringToCoreString(urlRemoteProvisioning)))
|
||||
emit remoteProvisioningChanged(urlRemoteProvisioning);
|
||||
else
|
||||
emit remoteProvisioningNotChanged(remoteProvisioning);
|
||||
emit remoteProvisioningNotChanged(urlRemoteProvisioning);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -28,3 +28,5 @@
|
|||
#cmakedefine ENABLE_UPDATE_CHECK 1
|
||||
#cmakedefine EXECUTABLE_NAME "${EXECUTABLE_NAME}"
|
||||
#cmakedefine MSPLUGINS_DIR "${MSPLUGINS_DIR}"
|
||||
#cmakedefine APPLICATION_LICENCE "${APPLICATION_LICENCE}"
|
||||
#cmakedefine COPYRIGHT_RANGE_DATE "${COPYRIGHT_RANGE_DATE}"
|
||||
|
|
@ -62,7 +62,7 @@ constexpr qint64 Constants::FileSizeLimit;
|
|||
constexpr char Constants::DefaultXmlrpcUri[];
|
||||
constexpr char Constants::DefaultConferenceURI[];
|
||||
constexpr char Constants::DefaultLimeServerURL[];
|
||||
|
||||
constexpr char Constants::RemoteProvisioningURL[];
|
||||
|
||||
#if defined(Q_OS_LINUX) || defined(Q_OS_WIN)
|
||||
constexpr char Constants::H264Description[];
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public:
|
|||
static constexpr char WindowIconPath[] = ":/assets/images/linphone_logo.svg";
|
||||
static constexpr char DefaultLocale[] = "en";
|
||||
|
||||
static constexpr char ApplicationMinimalQtVersion[] = "5.9.0";
|
||||
static constexpr char ApplicationMinimalQtVersion[] = "5.10.0";
|
||||
static constexpr char DefaultFont[] = "Noto Sans";
|
||||
|
||||
static constexpr size_t MaxLogsCollectionSize = 10485760; // 10MB.
|
||||
|
|
@ -56,7 +56,6 @@ public:
|
|||
static constexpr int DefaultExpires = 3600;
|
||||
static constexpr char DownloadUrl[] = "https://www.linphone.org/technical-corner/linphone";
|
||||
static constexpr char PasswordRecoveryUrl[] = "https://subscribe.linphone.org/login";
|
||||
Q_PROPERTY(QString PasswordRecoveryUrl MEMBER PasswordRecoveryUrl CONSTANT)
|
||||
|
||||
static constexpr char LinphoneBZip2_exe[] = "http://www.linphone.org/releases/windows/tools/bzip2/bzip2.exe";
|
||||
static constexpr char LinphoneBZip2_dll[] = "http://www.linphone.org/releases/windows/tools/bzip2/bzip2.dll";
|
||||
|
|
@ -64,7 +63,9 @@ public:
|
|||
static constexpr char DefaultLogsEmail[] = "linphone-desktop@belledonne-communications.com";
|
||||
static constexpr char DefaultConferenceURI[] = "sip:conference-factory@sip.linphone.org";
|
||||
static constexpr char DefaultLimeServerURL[] = "https://lime.linphone.org/lime-server/lime-server.php";
|
||||
|
||||
static constexpr char RemoteProvisioningURL[] = "https://subscribe.linphone.org/flexiapi/provisioning";
|
||||
|
||||
Q_PROPERTY(QString PasswordRecoveryUrl MEMBER PasswordRecoveryUrl CONSTANT)
|
||||
|
||||
// Max image size in bytes. (100Kb)
|
||||
static constexpr qint64 MaxImageSize = 102400;// In Bytes.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,11 @@ Item {
|
|||
}
|
||||
|
||||
function popView () {
|
||||
stack.pop()
|
||||
if( nViews <= 1 ) {
|
||||
stack.pop()
|
||||
window.setView('Home')
|
||||
}else
|
||||
stack.pop()
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ function handleUrlChanged () {
|
|||
// -----------------------------------------------------------------------------
|
||||
|
||||
function buildAddressFields () {
|
||||
/*
|
||||
|
||||
var address = contactEdit._vcard.address
|
||||
|
||||
return [{
|
||||
|
|
@ -189,8 +189,7 @@ function buildAddressFields () {
|
|||
placeholder: qsTr('country'),
|
||||
text: address.country
|
||||
}]
|
||||
*/
|
||||
return null
|
||||
|
||||
}
|
||||
|
||||
function handleAddressChanged (index, value) {
|
||||
|
|
|
|||
|
|
@ -9,99 +9,98 @@ import App.Styles 1.0
|
|||
// =============================================================================
|
||||
|
||||
DialogPlus {
|
||||
buttons: [
|
||||
TextButtonB {
|
||||
text: qsTr('ok')
|
||||
|
||||
onClicked: exit(0)
|
||||
}
|
||||
]
|
||||
|
||||
buttonsAlignment: Qt.AlignCenter
|
||||
objectName: '__about'
|
||||
|
||||
height: AboutStyle.height + 30
|
||||
width: AboutStyle.width
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
spacing: AboutStyle.spacing
|
||||
|
||||
RowLayout {
|
||||
id:versionsLayout
|
||||
spacing: AboutStyle.versionsBlock.spacing
|
||||
|
||||
height: AboutStyle.versionsBlock.iconSize
|
||||
width: parent.width
|
||||
|
||||
Icon {
|
||||
icon: 'linphone_logo'
|
||||
iconSize: parent.height
|
||||
}
|
||||
|
||||
Column {
|
||||
id:versionsArea
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
spacing: 0
|
||||
|
||||
TextEdit {
|
||||
id: appVersion
|
||||
color: AboutStyle.versionsBlock.appVersion.color
|
||||
selectByMouse: true
|
||||
font.pointSize: AboutStyle.versionsBlock.appVersion.pointSize
|
||||
text: 'Desktop ' + Qt.application.version + ' - Qt' + App.qtVersion +'\nCore ' + CoreManager.version
|
||||
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
onActiveFocusChanged: deselect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
spacing: AboutStyle.copyrightBlock.spacing
|
||||
width: parent.width
|
||||
|
||||
Text {
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: AboutStyle.copyrightBlock.url.pointSize
|
||||
linkColor: AboutStyle.copyrightBlock.url.color
|
||||
text: '<a href="'+applicationUrl+'">'+applicationUrl+'</a>'
|
||||
|
||||
width: parent.width
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink
|
||||
? Qt.PointingHandCursor
|
||||
: Qt.IBeamCursor
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
color: AboutStyle.copyrightBlock.license.color
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: AboutStyle.copyrightBlock.license.pointSize
|
||||
|
||||
text: 'GNU General Public License V3\n\u00A9 2010-' +
|
||||
(new Date().toLocaleDateString(Qt.locale(), 'yyyy')) +
|
||||
' Belledonne Communications'
|
||||
|
||||
width: parent.width
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buttons: [
|
||||
TextButtonB {
|
||||
text: qsTr('ok')
|
||||
|
||||
onClicked: exit(0)
|
||||
}
|
||||
]
|
||||
|
||||
buttonsAlignment: Qt.AlignCenter
|
||||
objectName: '__about'
|
||||
|
||||
height: AboutStyle.height + 30
|
||||
width: AboutStyle.width
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
spacing: AboutStyle.spacing
|
||||
|
||||
RowLayout {
|
||||
id:versionsLayout
|
||||
spacing: AboutStyle.versionsBlock.spacing
|
||||
|
||||
height: AboutStyle.versionsBlock.iconSize
|
||||
width: parent.width
|
||||
|
||||
Icon {
|
||||
icon: 'linphone_logo'
|
||||
iconSize: parent.height
|
||||
}
|
||||
|
||||
Column {
|
||||
id:versionsArea
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
spacing: 0
|
||||
|
||||
TextEdit {
|
||||
id: appVersion
|
||||
color: AboutStyle.versionsBlock.appVersion.color
|
||||
selectByMouse: true
|
||||
font.pointSize: AboutStyle.versionsBlock.appVersion.pointSize
|
||||
text: 'Desktop ' + Qt.application.version + ' - Qt' + App.qtVersion +'\nCore ' + CoreManager.version
|
||||
|
||||
height: parent.height
|
||||
width: parent.width
|
||||
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
||||
onActiveFocusChanged: deselect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
spacing: AboutStyle.copyrightBlock.spacing
|
||||
width: parent.width
|
||||
|
||||
Text {
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: AboutStyle.copyrightBlock.url.pointSize
|
||||
linkColor: AboutStyle.copyrightBlock.url.color
|
||||
text: '<a href="'+applicationUrl+'">'+applicationUrl+'</a>'
|
||||
|
||||
width: parent.width
|
||||
visible: applicationUrl != ''
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
|
||||
onLinkActivated: Qt.openUrlExternally(link)
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton
|
||||
cursorShape: parent.hoveredLink
|
||||
? Qt.PointingHandCursor
|
||||
: Qt.IBeamCursor
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
color: AboutStyle.copyrightBlock.license.color
|
||||
elide: Text.ElideRight
|
||||
font.pointSize: AboutStyle.copyrightBlock.license.pointSize
|
||||
visible: applicationVendor != ''
|
||||
text: (applicationLicence? applicationLicence+'\n':'') +'\u00A9 '+ copyrightRangeDate +
|
||||
' ' + applicationVendor
|
||||
|
||||
width: parent.width
|
||||
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue