fix(personalization): remove all files filter from wallpaper dialog#3304
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideLimits the wallpaper selection dialog to image files by removing the generic "All files" filter from the file chooser. Flow diagram for restricted wallpaper file selectionflowchart TD
User[User opens wallpaper dialog]
Dialog[Wallpaper FileDialog shows image-only filter]
Select[User selects file with image extension]
Accept[FileDialog onAccepted]
AddWallpaper[dccData.worker.addCustomWallpaper]
User --> Dialog
Dialog --> Select
Select --> Accept
Accept --> AddWallpaper
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- If the wallpaper backend supports additional common image formats (e.g., GIF, WebP, HEIC), consider adding them to the nameFilters list so the dialog remains consistent with the supported types.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- If the wallpaper backend supports additional common image formats (e.g., GIF, WebP, HEIC), consider adding them to the nameFilters list so the dialog remains consistent with the supported types.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
deepin pr auto review★ 总体评分:95分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 --- a/src/plugin-personalization/qml/WallpaperPage.qml
+++ b/src/plugin-personalization/qml/WallpaperPage.qml
@@ -225,7 +225,8 @@ DccObject {
FileDialog {
id: customWallpaperFileDialog
title: "Choose an Image File"
- nameFilters: ["Image files (*.png *.jpg *.jpeg *.bmp *.tiff)", "All files (*)"]
+ // 移除"所有文件"选项,防止非图片格式传入 addCustomWallpaper 处理异常
+ nameFilters: ["Image files (*.png *.jpg *.jpeg *.bmp *.tiff)"]
fileMode: FileDialog.OpenFile
onAccepted: {
dccData.worker.addCustomWallpaper(customWallpaperFileDialog.selectedFile) |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: caixr23, mhduiy The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1. Remove "All files (*)" option from wallpaper file dialog 2. Only allow image file types to be selected (*.png, *.jpg, etc.) 3. Prevent users from accidentally selecting non-image files Log: Remove "All files" filter from wallpaper file chooser dialog fix(personalization): 移除壁纸对话框的全部文件筛选项 1. 移除壁纸文件对话框中的"所有文件"选项 2. 仅允许选择图片文件类型(*.png, *.jpg 等) 3. 防止用户意外选择非图片文件 Log: 移除壁纸文件选择对话框中的"全部文件"筛选项 pms: BUG-365845 pms: BUG-365849
|
/forcemerge |
|
This pr force merged! (status: blocked) |
Log: Remove "All files" filter from wallpaper file chooser dialog
fix(personalization): 移除壁纸对话框的全部文件筛选项
Log: 移除壁纸文件选择对话框中的"全部文件"筛选项
Summary by Sourcery
Bug Fixes: