Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Release 1.5.5 #185

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions calendar-client/src/widget/monthWidget/monthview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,16 @@ void CMonthView::slotScheduleRemindWidget(const bool isShow, const DSchedule::Pt
// 因为将提示框从window改为widget,要转换为相对窗口的坐标
auto rPos = this->mapFromGlobal(remindPos);
//根据提示框在屏幕的位置设置箭头方向
qWarning() << this->window()->width() << rPos << m_remindWidget->width();
if (this->window()->width() - rPos.x() > m_remindWidget->width()) {
qWarning() << "window width: " << this->window()->width() << "pos:" << rPos << "remind width: " << m_remindWidget->width();
if (rPos.x() < this->window()->width() / 2) {
// 显示到右侧
m_remindWidget->setDirection(DArrowRectangle::ArrowLeft);
m_remindWidget->show(rPos.x()+10, rPos.y());
} else {
// 显示到左侧
m_remindWidget->setDirection(DArrowRectangle::ArrowRight);
m_remindWidget->show(rPos.x()-10, rPos.y());
}
// 因为将提示框从window改为widget,要转换为相对窗口的坐标
m_remindWidget->show(rPos.x(), rPos.y());
} else {
m_remindWidget->hide();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void SidebarCalendarWidget::setKeyDate(QDate date)
return;
}
QString fd = "";
fd.append("yyyy").append(tr("Y")).append("MM").append(tr("M"));
fd.append("yyyy").append(tr("Y")).append(" ").append("MM").append(tr("M"));
m_dateLabel->setText(date.toString(fd));
SidebarCalendarKeyButton::setDisplayedMonth(date);

Expand Down
9 changes: 6 additions & 3 deletions calendar-client/src/widget/yearWidget/yearwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,13 +652,16 @@ void CYearWindow::slotMousePress(const QDate &selectDate, const int pressType)
QPoint pos22 = variant.value<QPoint>();
// 因为将提示框从window改为widget,要转换为相对窗口的坐标
auto rPos = this->mapFromGlobal(pos22);
// 默认在左边显示,空间不够时在右边显示
if ( this->width() - rPos.x() > m_scheduleView->width() ) {
// 根据鼠标位置,决定悬浮框显示位置
if (rPos.x() < this->width() / 2) {
// 显示到右侧
m_scheduleView->setDirection(DArrowRectangle::ArrowLeft);
m_scheduleView->show(rPos.x()+10, rPos.y());
} else {
// 显示到左侧
m_scheduleView->setDirection(DArrowRectangle::ArrowRight);
m_scheduleView->show(rPos.x()-10, rPos.y());
}
m_scheduleView->show(rPos.x(), rPos.y());
update();
break;
}
Expand Down
3 changes: 3 additions & 0 deletions calendar-service/src/alarmManager/dalarmmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@

#include "dalarmmanager.h"

#include "commondef.h"
#include "csystemdtimercontrol.h"
#include "dbus/dbusnotify.h"
#include <QLoggingCategory>

#define Millisecond 1
#define Second 1000 * Millisecond
Expand Down Expand Up @@ -46,6 +48,7 @@ DAlarmManager::DAlarmManager(QObject *parent)

void DAlarmManager::updateRemind(const DRemindData::List &remindList)
{
qCDebug(ServiceLogger) << "updateRemind" << "list size:" << remindList.size();
if (remindList.size() == 0)
return;
QString &&accountID = remindList.at(0)->accountID();
Expand Down
6 changes: 5 additions & 1 deletion calendar-service/src/csystemdtimercontrol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

#include "commondef.h"
#include "units.h"
#include <qloggingcategory.h>
#include <QDebug>
#include <QLoggingCategory>

#include <QDir>
#include <QStandardPaths>
Expand All @@ -28,6 +29,7 @@ CSystemdTimerControl::~CSystemdTimerControl()

void CSystemdTimerControl::buildingConfiggure(const QVector<SystemDInfo> &infoVector)
{
qCDebug(ServiceLogger) << "buildingConfiggure";
if (infoVector.size() == 0)
return;
QStringList fileNameList{};
Expand All @@ -36,6 +38,7 @@ void CSystemdTimerControl::buildingConfiggure(const QVector<SystemDInfo> &infoVe
createService(fileNameList.last(), info);
createTimer(fileNameList.last(), info.triggerTimer);
}
execLinuxCommand("systemctl --user daemon-reload");
startSystemdTimer(fileNameList);
}

Expand Down Expand Up @@ -251,6 +254,7 @@ QString CSystemdTimerControl::execLinuxCommand(const QString &command)
process.start("/bin/bash", QStringList() << "-c" << command);
process.waitForFinished();
QString strResult = process.readAllStandardOutput();
qCDebug(ServiceLogger)<< "exec: " << command << "output: " << strResult;
return strResult;
}

Expand Down
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
dde-calendar (5.14.5) unstable; urgency=medium

* fix: sidebar calendar widget(Issue: https://github.com/linuxdeepin/developer-center/issues/10343)
* feat: Execute reload after changing systemd(Issue: https://github.com/linuxdeepin/developer-center/issues/10093)
* fix: remind widget display position(Issue: https://github.com/linuxdeepin/developer-center/issues/10341)

-- myml <[email protected]> Wed, 14 Aug 2024 16:37:30 +0800

dde-calendar (5.14.4) unstable; urgency=medium

* feat: Unable to set timer reminder in Linglong environment
Expand Down
Loading