-
Notifications
You must be signed in to change notification settings - Fork 58
sync: from linuxdeepin/dde-session-shell #420
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
base: master
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-ci-robot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dde-session-shell. Source-pull-request: linuxdeepin/dde-session-shell#8
4b63380
to
aa9da30
Compare
deepin pr auto review代码审查意见:
综合以上意见,代码在逻辑上和功能上看起来是正确的,但存在一些可以改进的地方,以提高代码的可维护性、性能和安全性。 |
Reviewer's GuideThis PR conditionally adds D-Bus–driven region format synchronization under the ENABLE_DSS_SNIPE guard: it hooks into the per-user config manager to watch locale/time/date settings, introduces helpers to fetch those settings, and extends the time widget to render using custom formats. Sequence Diagram for Region Format Setup on User Switch (ENABLE_DSS_SNIPE)sequenceDiagram
title Sequence Diagram for Region Format Setup on User Switch (ENABLE_DSS_SNIPE)
participant CTW as CenterTopWidget
participant QDBus as "QDBusConnection.systemBus()"
participant RootConfigMgr as "org.desktopspec.ConfigManager (on '/')"
participant UserConfigMgr as "org.desktopspec.ConfigManager.Manager (on user path)"
participant TW as TimeWidget
Note over CTW: Inside setCurrentUser(newUser)
CTW->>CTW: updateRegionFormatConnection(newUser)
activate CTW # updateRegionFormatConnection
opt m_currentUser exists
CTW->>RootConfigMgr: getRegionFormatConfigPath(m_currentUser) (calls acquireManagerV2)
activate RootConfigMgr
RootConfigMgr-->>CTW: oldDbusPath
deactivate RootConfigMgr
CTW->>QDBus: disconnect(oldDbusPath, "org.desktopspec.ConfigManager.Manager", "valueChanged", ...)
end
CTW->>RootConfigMgr: getRegionFormatConfigPath(newUser) (calls acquireManagerV2)
activate RootConfigMgr
RootConfigMgr-->>CTW: newDbusPath
deactivate RootConfigMgr
CTW->>QDBus: connect(newDbusPath, "org.desktopspec.ConfigManager.Manager", "valueChanged", ...)
deactivate CTW # updateRegionFormatConnection
CTW->>CTW: updateUserDateTimeFormat()
activate CTW # updateUserDateTimeFormat
CTW->>RootConfigMgr: getRegionFormatConfigPath(m_currentUser) (calls acquireManagerV2)
activate RootConfigMgr
RootConfigMgr-->>CTW: userConfigDbusPath
deactivate RootConfigMgr
Note over CTW: UserConfigMgr represents interface on userConfigDbusPath
CTW->>UserConfigMgr: getRegionFormatValue(localeNameKey) (calls value)
activate UserConfigMgr
UserConfigMgr-->>CTW: localeName
deactivate UserConfigMgr
CTW->>UserConfigMgr: getRegionFormatValue(shortTimeFormatKey) (calls value)
activate UserConfigMgr
UserConfigMgr-->>CTW: shortTimeFormat
deactivate UserConfigMgr
CTW->>UserConfigMgr: getRegionFormatValue(longDateFormatKey) (calls value)
activate UserConfigMgr
UserConfigMgr-->>CTW: longDateFormat
deactivate UserConfigMgr
CTW->>TW: updateLocale(localeName, shortTimeFormat, longDateFormat)
activate TW
TW->>TW: refreshTime()
deactivate TW
deactivate CTW # updateUserDateTimeFormat
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Synchronize source files from linuxdeepin/dde-session-shell.
Source-pull-request: linuxdeepin/dde-session-shell#8
Summary by Sourcery
Enable optional region-format synchronization for date and time display via D-Bus when compiled with ENABLE_DSS_SNIPE.
New Features: