pidgin/pidgin

Convert PidginStatusBox to a GtkMenuButton

13 months ago, Elliott Sales de Andrade
adf6d358d438
Convert PidginStatusBox to a GtkMenuButton

This moves to a menu system to populate the list of statuses, and the new `PidginStatusDisplay` to show them. I tried a `GtkDropDown` previously, but that was unable to show the separators that we previously had. Consequently, it uses actions a bit more then before.

However, since menus don't support icons+text at the same time, and doesn't have a factory property, we do need to manually create custom widgets a bit, but it's mostly only a button + the `PidginStatusDisplay`.

The main display is now centred, but there seems to be nothing we can do about that, as the box with that alignment is internal to the `GtkMenuButton`. If we don't want that, we could switch to managing a `GtkToggleButton` and `GtkPopoverMenu` ourselves.

Testing Done:
Opened status box and confirmed that all primitives and saved statuses were there as expected.
Modified a status, and confirmed that the menu updated to match.
Added/deleted statuses from the manager and confirmed they menu updated to match.
Chose the New Status/Saved Statuses menu items and confirmed they opened the correct dialogs.
Picked a bunch of statuses from the menu items and confirmed the main display updated, and some updates were sent out to protocols (e.g. Demo disconnecting when offline, etc.)

Reviewed at https://reviews.imfreedom.org/r/2386/
---
environment:
- BUILD_NUMBER
- REPOSITORY=pidgin/builders
- REGISTRY=docker.io
- DOCS_BUILD_IMAGE=${REGISTRY}/${REPOSITORY}:debian-bookworm-amd64
tasks:
import:
type: docker/import
files: .:.
build:
type: docker/run
image: ${REGISTRY}/${REPOSITORY}:${TARGET}
clean:
type: convey/clean
files:
- appimage-x86_64
- clang
- debian-bookworm-amd64
- fedora-36-amd64
- fedora-37-amd64
- scanbuild
- ubuntu-kinetic-amd64
docs-clean:
type: convey/clean
files:
- finch3-docs
- pidgin3-docs
- purple3-docs
docs-build:
type: docker/run
image: ${DOCS_BUILD_IMAGE}
workdir: ${CONVEY_WORKSPACE}
script:
- set -ex
- meson -Ddoc=true build-docs
- ninja -C build-docs doc
docs-export:
type: docker/export
files:
- build-docs/doc/reference/finch/finch/:finch3-docs
- build-docs/doc/reference/libpurple/libpurple/:purple3-docs
- build-docs/doc/reference/pidgin/pidgin/:pidgin3-docs
export:
type: docker/export
files: build-${TARGET}:${TARGET}
bare-export:
type: docker/export
files: ${TARGET}:${TARGET}
plans:
pidgin3-appimage-x86_64:
environment:
- TARGET=appimage-x86_64
- RECIPE=Pidgin3
- CONFIGURE_ARGS=-Dconsoleui=False
stages:
- tasks: [import, build, bare-export]
clang:
environment: [TARGET=clang]
stages:
- tasks: [import, build]
- tasks: [export]
run: always
clean:
stages:
- tasks: [clean, docs-clean]
debian-bookworm-amd64:
environment: [TARGET=debian-bookworm-amd64]
stages:
- tasks: [import, build]
- tasks: [export]
run: always
docs:
stages:
- tasks: [docs-clean, import, docs-build, docs-export]
fedora-36-amd64:
environment: [TARGET=fedora-36-amd64]
stages:
- tasks: [import, build]
- tasks: [export]
run: always
fedora-37-amd64:
environment: [TARGET=fedora-37-amd64]
stages:
- tasks: [import, build]
- tasks: [export]
run: always
scanbuild:
environment: [TARGET=scanbuild]
stages:
- tasks: [import, build]
- tasks: [export]
run: always
ubuntu-kinetic-amd64:
environment: [TARGET=ubuntu-kinetic-amd64]
stages:
- tasks: [import, build]
- tasks: [export]
run: always