Skip to content

Commit

Permalink
fix: fix the new notice style
Browse files Browse the repository at this point in the history
hide the file path after the screenshot is completed.

Log: hide the file path after the screenshot is completed.
Task: https://pms.uniontech.com/task-view-356211.html
  • Loading branch information
add-uos committed Jul 17, 2024
1 parent ce66128 commit f44ae59
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 15 deletions.
18 changes: 11 additions & 7 deletions src/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3353,13 +3353,17 @@ void MainWindow::sendNotify(SaveAction saveAction, QString saveFilePath, const b
QList<QVariant> arg;
int timeout = 5000;
unsigned int id = 0;
arg << (QCoreApplication::applicationName()) // appname
<< id // id
<< QString("deepin-screen-recorder") // icon
<< tr("") // summary
<< tr("Screenshot finished") // body
<< actions // actions
<< hints // hints
QString saveBody = tr("Screenshot finished");
if (saveFilePath == QString(tr("Clipboard"))) {
saveBody = tr("Screenshot finished and copy to clipboard");
}
arg << (QCoreApplication::applicationName()) // appname
<< id // id
<< QString("deepin-screen-recorder") // icon
<< tr("Screen Capture") // summary
<< saveBody // body
<< actions // actions
<< hints // hints
<< timeout;
notification.callWithArgumentList(QDBus::AutoDetect, "Notify", arg);// timeout
// }
Expand Down
4 changes: 2 additions & 2 deletions src/record_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,8 @@ void RecordProcess::exitRecord(QString newSavePath)
arg << (QCoreApplication::applicationName()) // appname
<< id // id
<< QString("deepin-screen-recorder") // icon
<< tr("Recording finished") // summary
<< QString(tr("Saved to %1")).arg(newSavePath) // body
<< tr("Screen Capture") // summary
<< QString(tr("Recording finished")) // body
<< actions // actions
<< hints // hints
<< timeout; // timeout
Expand Down
16 changes: 10 additions & 6 deletions translations/deepin-screen-recorder_zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ or press the shortcut again to stop recording</source>
</message>
<message>
<source>Screenshot finished</source>
<translation>截图完成</translation>
<translation>截图完成,文件已保存</translation>
</message>
<message>
<source>PNG (*.png);;JPEG (*.jpg *.jpeg);;BMP (*.bmp)</source>
Expand Down Expand Up @@ -114,6 +114,10 @@ or press the shortcut again to stop recording</source>
<source>Open Folder</source>
<translation>打开文件夹</translation>
</message>
<message>
<source>Screenshot finished and copy to clipboard</source>
<translation>截图完成,文件已复制到剪贴板</translation>
</message>
</context>
<context>
<name>MenuController</name>
Expand Down Expand Up @@ -167,11 +171,7 @@ or press the shortcut again to stop recording</source>
</message>
<message>
<source>Recording finished</source>
<translation>录制完毕</translation>
</message>
<message>
<source>Saved to %1</source>
<translation>文件已保存到%1</translation>
<translation>录屏文件已保存</translation>
</message>
<message>
<source>Record</source>
Expand All @@ -181,6 +181,10 @@ or press the shortcut again to stop recording</source>
<source>Open Folder</source>
<translation>打开文件夹</translation>
</message>
<message>
<source>Screen Capture</source>
<translation>截图录屏</translation>
</message>
</context>
<context>
<name>Screenshot</name>
Expand Down

0 comments on commit f44ae59

Please sign in to comment.