Fix volume gauge in multimedia parameters while being in call.

Add customization UI when deactivating video/conference/update checker.
This commit is contained in:
Julien Wadel 2022-12-22 16:23:30 +01:00
parent bf6b0f565a
commit a622900e8b
14 changed files with 44 additions and 18 deletions

View file

@ -4,13 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 5.1.0 - undefined
### Added
- VFS Encryption
- File viewer in chats (Image/Animated Image/Video/Texts) with the option to export the file.
## 5.0.3 - 2022-12-19
## 5.0.4 - undefined
### Fixed
- Volume gauge in multimedia parameters while being in call.
## 5.0.3 - 2022-12-21
### Fixed
- Missing SetThreadDescription entry point on Windows 7/8 (SDK update)

View file

@ -780,10 +780,13 @@ void App::setTrayIcon () {
App::smartShowWindow(getSettingsWindow());
});
QAction *updateCheckAction = new QAction(tr("checkForUpdates"), root);
root->connect(updateCheckAction, &QAction::triggered, root, [this] {
checkForUpdates(true);
});
QAction *updateCheckAction = nullptr;
if(SettingsModel::isCheckForUpdateAvailable()){
updateCheckAction = new QAction(tr("checkForUpdates"), root);
root->connect(updateCheckAction, &QAction::triggered, root, [this] {
checkForUpdates(true);
});
}
QAction *aboutAction = new QAction(tr("about"), root);
root->connect(aboutAction, &QAction::triggered, root, [root] {
@ -817,7 +820,8 @@ void App::setTrayIcon () {
menu->setTitle(APPLICATION_NAME);
// Build trayIcon menu.
menu->addAction(settingsAction);
menu->addAction(updateCheckAction);
if(updateCheckAction)
menu->addAction(updateCheckAction);
menu->addAction(aboutAction);
menu->addSeparator();
menu->addAction(restoreAction);

View file

@ -937,9 +937,10 @@ void ChatRoomModel::initEntries(){
// Get calls.
bool secureChatEnabled = CoreManager::getInstance()->getSettingsModel()->getSecureChatEnabled();
bool standardChatEnabled = CoreManager::getInstance()->getSettingsModel()->getStandardChatEnabled();
bool noChat = !secureChatEnabled && !standardChatEnabled;
if( isOneToOne() && (secureChatEnabled && !standardChatEnabled && isSecure()
|| standardChatEnabled && !isSecure()) ) {
if(noChat || (isOneToOne() && (secureChatEnabled && !standardChatEnabled && isSecure()
|| standardChatEnabled && !isSecure())) ) {
auto callHistory = CallsListModel::getCallHistory(getParticipantAddress(), Utils::coreStringToAppString(mChatRoom->getLocalAddress()->asStringUriOnly()));
// callhistory is sorted from newest to oldest
int count = 0;
@ -1006,9 +1007,10 @@ int ChatRoomModel::loadMoreEntries(){
// Calls
bool secureChatEnabled = CoreManager::getInstance()->getSettingsModel()->getSecureChatEnabled();
bool standardChatEnabled = CoreManager::getInstance()->getSettingsModel()->getStandardChatEnabled();
bool noChat = !secureChatEnabled && !standardChatEnabled;
if( isOneToOne() && (secureChatEnabled && !standardChatEnabled && isSecure()
|| standardChatEnabled && !isSecure()) ) {
if( noChat || (isOneToOne() && (secureChatEnabled && !standardChatEnabled && isSecure()
|| standardChatEnabled && !isSecure())) ) {
auto callHistory = CallsListModel::getCallHistory(getParticipantAddress(), Utils::coreStringToAppString(mChatRoom->getLocalAddress()->asStringUriOnly()));
int count = 0;
auto itCallHistory = callHistory.begin();

View file

@ -1556,8 +1556,15 @@ void SettingsModel::setExitOnClose (bool value) {
emit exitOnCloseChanged(value);
}
bool SettingsModel::isCheckForUpdateAvailable(){
#ifdef ENABLE_UPDATE_CHECK
return true;
#else
return false;
#endif
}
bool SettingsModel::isCheckForUpdateEnabled() const{
return !!mConfig->getInt(UiSection, "check_for_update_enabled", 1);
return !!mConfig->getInt(UiSection, "check_for_update_enabled", isCheckForUpdateAvailable());
}
void SettingsModel::setCheckForUpdateEnabled(bool enable){

View file

@ -576,6 +576,7 @@ public:
bool getExitOnClose () const;
void setExitOnClose (bool value);
Q_INVOKABLE static bool isCheckForUpdateAvailable();
bool isCheckForUpdateEnabled() const;
void setCheckForUpdateEnabled(bool enable);

View file

@ -109,9 +109,10 @@ bool TimelineProxyModel::filterAcceptsRow (int sourceRow, const QModelIndex &sou
if(!timeline || !timeline->getChatRoomModel() || timeline->getChatRoomModel()->getState() == (int)linphone::ChatRoom::State::Deleted)
return false;
bool haveEncryption = timeline->getChatRoomModel()->haveEncryption();
if(!CoreManager::getInstance()->getSettingsModel()->getStandardChatEnabled() && !haveEncryption)
bool noChat = !CoreManager::getInstance()->getSettingsModel()->getStandardChatEnabled() && !CoreManager::getInstance()->getSettingsModel()->getSecureChatEnabled();
if(!noChat && !CoreManager::getInstance()->getSettingsModel()->getStandardChatEnabled() && !haveEncryption)
return false;
if(!CoreManager::getInstance()->getSettingsModel()->getSecureChatEnabled() && haveEncryption)
if(!noChat && !CoreManager::getInstance()->getSettingsModel()->getSecureChatEnabled() && haveEncryption)
return false;
bool show = (mFilterFlags==0);// Show all at 0 (no hide all)
bool isGroup = timeline->getChatRoomModel()->isGroupEnabled();

View file

@ -198,6 +198,7 @@ DialogPlus {
RowLayout {
spacing: MultimediaParametersDialogStyle.column.entry.spacing
width: parent.width
visible: SettingsModel.videoSupported
Icon {
icon: MultimediaParametersDialogStyle.column.entry.camera.icon

View file

@ -203,7 +203,7 @@ Rectangle{
Layout.fillHeight: true
Layout.fillWidth: true
Layout.minimumHeight: fitHeight
call: conference.callModel
call: mainItem.callModel
flat: true
showMargins: true
expandHeight: false

View file

@ -535,6 +535,7 @@ Rectangle {
colorSet: callModel && callModel.cameraEnabled ? IncallStyle.buttons.cameraOn : IncallStyle.buttons.cameraOff
updating: callModel.videoEnabled && callModel.updating && !mainItem.layoutChanging
enabled: callModel && !callModel.pausedByUser
visible: SettingsModel.videoSupported
property bool _activateCamera: false
onClicked: if(callModel && !mainItem.layoutChanging){
if( callModel.isConference){// Only deactivate camera in conference.

View file

@ -65,6 +65,7 @@ Item {
}
MenuItem {
visible: SettingsModel.isCheckForUpdateAvailable()
//: 'Check for updates' : Item menu for checking updates
text: qsTr('checkForUpdates')

View file

@ -27,6 +27,7 @@ MenuBar {
MenuItem {
visible: SettingsModel.isCheckForUpdateAvailable()
//: 'Check for updates' : Item menu for checking updates
text: qsTr('checkForUpdates')
role: MenuItem.ApplicationSpecificRole

View file

@ -239,6 +239,7 @@ TabContainer {
}
FormLine {
maxItemWidth: parent.width
visible: SettingsModel.isCheckForUpdateAvailable()
FormGroup {
//: 'Check for updates' : Label switch for enabling check for updates
label: qsTr('checkForUpdateLabel')

View file

@ -57,7 +57,7 @@ ApplicationWindow {
id: tabBar
onCurrentIndexChanged: SettingsModel.onSettingsTabChanged(currentIndex)
spacing:0
TabButton {
iconName: TabButtonStyle.icon.sipAccountsIcon
text: qsTr('sipAccountsTab')
@ -71,10 +71,10 @@ ApplicationWindow {
}
TabButton {
enabled: SettingsModel.videoSupported
visible: SettingsModel.videoSupported
iconName: TabButtonStyle.icon.videoIcon
text: qsTr('videoTab')
width: implicitWidth
width: visible ? implicitWidth : 0
}
TabButton {

@ -1 +1 @@
Subproject commit 27c02e232d7fd5facdcd21c2b15d558812ab4151
Subproject commit fbe6d7449d47e22ca8fed0975f70a8bbdac28a94