Change room bookmark terminology to pin/unpin

Pin/unpin is more representative of what the function actually does
for rooms in the left pane. Also change the corresponding icons and
renames the config file section: RoomList.Bookmarks → RoomList.Pinned
This commit is contained in:
miruka
2021-02-25 05:51:48 -04:00
parent 13558fd61c
commit 8a6f7c262f
6 changed files with 39 additions and 32 deletions

View File

@@ -63,7 +63,8 @@ HTile {
TitleLabel {
text:
(model.bookmarked ? "\u2665 " : "") +
// U+1f4cc pushpin + force black-and-white variant
(model.pinned ? "📌\ufe0e " : "") +
(model.display_name || qsTr("Empty room"))
color:
model.unreads || model.local_unreads ?
@@ -135,6 +136,14 @@ HTile {
}
contextMenu: HMenu {
HMenuItem {
icon.name: model.pinned ? "room-unpin": "room-pin"
text: model.pinned ? qsTr("Unpin"): qsTr("Pin to top")
onTriggered: py.callClientCoro(
model.for_account, "toggle_room_pin", [model.id]
)
}
HMenuItemPopupSpawner {
visible: joined
enabled: model.can_invite && accountModel.presence !== "offline"
@@ -150,14 +159,6 @@ HTile {
})
}
HMenuItem {
icon.name: model.bookmarked ? "bookmark-remove": "bookmark-add"
text: model.bookmarked ? qsTr("Remove bookmark"): qsTr("Bookmark")
onTriggered: py.callClientCoro(
model.for_account, "toggle_bookmark", [model.id]
)
}
HMenuItem {
icon.name: "copy-room-id"
text: qsTr("Copy room ID")