Skip to content
Open
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
12 changes: 6 additions & 6 deletions bluetooth1/obex_agent.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -312,7 +312,9 @@ func (a *obexAgent) receiveProgress(transfer *transferObj) {
// 传送完成,移动到下载目录
realFileName := moveTempFile(oriFilepath, filepath.Join(receiveBaseDir, transfer.oriFilename))

newID := a.notifyProgress(a.notify, a.notifyID, realFileName, transfer.deviceName, 100)
// Use the last progress notification id as replaces_id so
// the progress bubble (e.g. 99%) won't linger after completion.
newID := a.notifyProgress(a.notify, currentID, realFileName, transfer.deviceName, 100)

notifyMu.Lock()
a.notifyID = newID
Expand Down Expand Up @@ -455,12 +457,11 @@ func (a *obexAgent) notifyProgress(notify notifications.Notifications, replaceID
logger.Warning("failed to send notify:", err)
}
} else {
notify.CloseNotification(0, replaceID)
actions = []string{"_view", gettext.Tr("View")}
hints := map[string]dbus.Variant{"x-deepin-action-_view": dbus.MakeVariant("dde-file-manager,--show-item," + filename)}
notifyID, err = notify.Notify(0,
gettext.Tr("dde-control-center"),
0,
replaceID,
notifyIconBluetoothConnected,
fmt.Sprintf(gettext.Tr("You have received files from %q successfully"), device),
gettext.Tr("Done"),
Expand All @@ -485,10 +486,9 @@ func (a *obexAgent) notifyFailed(notify notifications.Notifications, replaceID u
body = gettext.Tr("Bluetooth connection failed")
}

notify.CloseNotification(0, replaceID)
notifyID, err := notify.Notify(0,
gettext.Tr("dde-control-center"),
0,
replaceID,
notifyIconBluetoothConnectFailed,
summary,
body,
Expand Down
6 changes: 3 additions & 3 deletions gesture1/gesture_action.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2018 - 2022 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2018 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -109,11 +109,11 @@ func (m *Manager) doHandle4Or5FingersSwipeDown() error {
}

func (m *Manager) doMaximizeActiveWindow() error {
return m.wm.MaximizeActiveWindow(0)
return m.wm.PerformAction(0, wmActionToggleMaximize)
}

func (m *Manager) doUnMaximizeActiveWindow() error {
return m.wm.UnMaximizeActiveWindow(0)
return m.wm.PerformAction(0, wmActionToggleMaximize)
}

func (m *Manager) doMinimize() error {
Expand Down