phosh v0.11.0

New features:

  • Wifi/WWAN/BT quick settings toggle on/off, long press opens Settings
  • Initial support for gnome-session --systemd
  • Torch brightness slider
  • Allow to show battery percentage in top bar (via Settings toggle)

Maybe noteworthy:

  • Bumps glib requirement to 2.62
  • Test suite improvements (and bugs uncovered fixed)
  • Switch from lcov to gcovr
  • Fixes Modal-Dialog keyboard navigation
  • Fixes crash with ja locale
  • translation updates: it

Detailed changes:

phosh (0.11.0) byzantium; urgency=medium
.
  [ Guido Günther ]
  * d/control: Mark build-deps as nocheck
  * gitlab-ci: Avoid some build-deps for cross-builds.
    They're not needed since we just check if the build works.
  * system-promper: Cleanup properly.
    Unref the prompter and make sure we don't unregister if not registered.
  * idle-manager: Guard against disposing multiple times
  * polkit-auth-agent: Indentation fixups
  * polkit-auth-agent: Don't leak error in error path
  * build: Use files()
    This avoids having path prefixes in some places and not in others
    and makes it simpler to use these from other directories.
  * test-app-grid-button: Drop test for expected message.
    We catch that in the output of the subprocess and it's a noop
    when running with `-DG_LOG_USE_STRUCTURED`.
  * d/control: Add dbus-x11.
    Needed for the shell test
  * build: add static phosh lib too.
    This contains the whole phosh without main() allowing reuse in
    tests. By using `both_libraries()` we can munge that into the
    shared lib build and unconditionalize this without increasing
    the number of targets.
  * tests: Create shell object.
    This creats the shell object making sure we create most of
    the objects that aren't created in the idle callback()
  * d/control: Add more schemas.
    The tests bring up more of the shell now so we need those schamas
    during tests too.
  * tests: Make shell enter main loop.
    This brings up all the manager objects
  * gitlab-ci: Drop the one output smoke-test.
    The test-shell unit test basically covers this.
  * gitlab-ci: Use gcovr instead of lcov.
    This creates a bit nicer reports but more importantly supports
    a gcovr.cfg in _build/ so we can exclude autogenerated files
    in the future.
    This needs some hackery due to
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818
    but since this only affects this project and not e.g. downstreams
    it should be o.k. for the time being.
  * Add gcovr configuration.
    This allows us to exclude autogenerated files. It needs to go
    toplevel for gcovr to find it.
  * Bump glib requirement to 2.62.
    This is in byzantium/bullseye and will allow us to use
    g_clear_signal_handler() and friends.
  * Use g_clear_signal_handler.
    We can rely on glib 2.62 now.
  * brightness: Use simpler g_clear_object
  * mode-manager: Use correct type.
    Unused so far so the compiler didn't spot it.
  * home: Use correct type.
    Unnoticed by the compiler since the type was unused so far.
  * monitor: Use proper cast.
    This helps detecting bad types.
  * gnome-shell-manager: Run parent constructor first.
    This makes it consistent with other classes
  * media-player: Unconditionally dispose DBus connection.
    The connection is independent from the signal subscription.
  * system-prompter: Always unown DBus name.
    Don't bother if we ever acquired it, it's important if we tried
    (and hence got a > 0 id).
  * idle-manager: Unown DBus name.
    We should clean up properly on dispose.
  * monitor-manager: Unown DBus name.
    We should clean up properly on dispose.
  * notify-manager: Unown DBus name.
    We should clean up properly on dispose.
  * screen-saver-manager: Unown DBus name.
    We should clean up properly on dispose.
  * gnome-shell-manager: Unown DBus name.
    We should clean up properly on dispose.
  * shell: Dispose keyboard_events past gnome-shell-manager
    gnome-shell-manager invokes phosh_shell_remove_global_keyboard_action_entries()
    when disposing it's keybindings.
  * gnome-shell-manager: Properly free grabbed keybindings.
    We shouldn't remove elements form the GList of keys while looping over
    it. Fixing this makes sure we actually fee the entries (and is less
    code).
  * gnome-shell-manager: Handle DBus skeleton export error
  * screensaver-manager: Dup lockscreen-manager.
    We unref it on dispose so we need to take a reference.
  * on_bus_acquired: Use proper cast with type check.
    Seems this got copy pasted all around and should.
  * location-manager: Unwatch name on dispose.
    We don't want to be called after going away.
  * location-manager: Unexport the interface
  * gnome-shell-manager: Unexport the interface
  * monitor-manager: Unexport the interface
  * notify-manager: Unexport the interface
  * screen-saver-manager: Unexport the interface
  * screenshot-manager: Don't opencode g_clear_handle_id
  * screenshot-manager: Unexport the interface
  * session-manager: Unexport the interface
  * lockscreen: Move player to center widget.
    This makes the player centered with the indicators and clock
    See https://source.puri.sm/Librem5/phosh/-/issues/543
  * screenshot-manager: Only flash screen on success.
    Don't flash screen when taking the screenshot failed.
  * shell: Remove some trailing whitespace
  * tests: Use define for startup-timeout magic constant
  * util: Add helper for the common async callback error checking.
    A canceled operation error should not print a warning while all others
    should.
  * connectivity-info: Cancel nmclient acquisition on dispose.
    Otherwise we might access already freed data. We reorder the ready
    handler to not access self when the operation is cancelled.
  * wifimanager: Cancel nmclient acquisition on dispose.
    Otherwise we might access alrady freed data. We reorder the ready
    handler to not access self when the operation is cancelled.
  * session-manager: Cancel session registration on dispose.
    Otherwise we might access already freed data. We reorder the ready
    handler to not access self when the operation is cancelled.
  * brightness: Cancel proxy creation on dispose.
    This makes sure there's no lingering async callbacks.
  * gnome-shell-manager: Don't ref self when trying to own name.
    If the shell quits and the async g_bus_own_name didn't finish then
    `dispose` will not be run with when a ref is held and the name won't be
    given up. This prevents us from freeing up properly.
  * monitor-manager: Don't ref self when trying to own name.
    If the shell quits and the async g_bus_own_name didn't finish then
    `dispose` will not be run with when a ref is held and the name won't be
    given up. This prevents us from freeing up properly
  * modem-manager: Cancel proxy acquisition.
    Instead of holding a ref on self make sure we cancel the operation in
    dispose. This allows the object to dispose properly.
  * background: Cancel async operation on dispose
  * rotation-manager: Cancel async operation on dispose.
    Instead of holding a ref during the async operation we cancel it in
    dispose. Otherwise we might not properly dispose the object while an
    async operation is pending.
    We shuffle the code around to not access self prior to checking if the
    operation was canceled since it might not be existent anymore.
  * wwan-mm: Cancel async operation.
    This makes sure we don't use self although already disposed. Lower
    warning to `g_message` to not trip up tests when mm is not present
    or the operation gets canceled.
  * Add PhoshManager.
    This adds a common base class for managers that currently derive
    from GObject.
  * mode-manager: Use manager.
    This ensures the idle callback gets removed on dispose.
  * bt-manager: Move functions between class_init and init upwards.
    Matches our recommended layout and needed for the next commit.
  * bt-manager: Use manager.
    This ensures the idle callback gets removed on dispose.
  * torch-manager: Move functions between class_init and init upwards.
    Matches our recommended layout and needed for the next commit.
  * torch-manager: Use manager.
    This ensures the idle callback gets removed on dispose.
  * status-icon: Add idle_init virtual method.
    This allows for easier idle setup and makes sure we properly
    remove the callback.
  * torch-info: Use status-icon's idle_init.
    Instead of opencoding use the parent's class functionality which
    also makes sure the handler gets properly removed.
  * wwaninfo: Use status-icon's idle_init.
    Instead of opencoding use the parent's class functionality.
  * bt-info: Use status-icon idle_init.
    Instead of opencoding use the parent's class functionality.
  * docked-info: Use status-icon idle_init.
    Instead of opencoding use the parent's class functionality.
  * wifiinfo: Use status-icon idle_init.
    Instead of opencoding use the parent's class functionality.
  * home: Drop idle callback.
    Binding to settings is save and won't trigger excessive object
    creation.
  * media-player: Cancel idle callback in dispose.
    Cancel idle callback on dispose so we don't run it if we're already
    disposed.
  * Replace some g_warning()s with g_message()
    Some hardware is not required so reduce the log level. This helps
    tests and since those messages still end up in logs by default don't
    make debugging harder.
  * batteryinfo: Use g_autoptr
  * polkit: better error message
  * polkit: Lower warning when we fail to get session.
    This is likey due to no polkit at all.
  * Move DBus connect failures from warning to debug.
    When the DBus service is not even there no need to print a warning since
    the shell just disables that part.
    This helps to have warnings enabled in tests.
  * tests: Drain event loop in shell test.
    This make sure there's no lingering async/idle callbacks
    of disposed objects.
  * screensaver-manager: Cancel idle callback in dispose
  * screensaver-manager: Don't hold ref on self during g_bus_own_name.
    This avoids cancelation and hence proper cleanup. It's also not
    needed since we unown the name in dispose.
  * wifimanager: Don't use warning when failing to register agent.
    Lower to `g_message` to not trip up tests. It's not fatal anyway.
  * wifimanager: Don't use warning when failing to connect to NM.
    Lower to `g_message` to not trip up tests. It's not fatal anyway.
  * wifimanager: Unref access point.
    We need to disconnect the signals manually since
    nm_device_wifi_get_active_access_point is transfer none.
  * background-manager: Allow to retrieve backgrounds.
    Used in tests.
  * shell: Allow to retrieve background-manager.
    Makes it more symmetric with other managers, used in tests only atm.
  * notify-manager: Don't hold ref when owning dbus name.
    We unown the name in dispose. Holding the ref prevents proper cleanup.
  * test-shell: Simplify shell setup and tear down.
    This makes it reusable in other tests. We don't move that to testlib
    since that does not link against shell.c atm but stubs the shell object.
  * test-shell: Add test with two outputs.
    We need a 2nd fixture since setting up the 2nd output in the
    test itself is too late, the compositor is already running.
  * gitlab-ci: Drop two-output test.
    We run that via ninja now making it easier to use during local
    development.
  * ui: Remove receive-default properties from check buttons
    'False' is the default anyway.
  * system-modal-dialog: Drop unused dispose
  * polkit-auth-prompt: Simplify by using template_callback.
    Less code.
  * polkit-auth-prompt: Use correct cast.
    It's a label not an entry.
    Fixes: 3b60ed8fa4d08c18978e4b90ddf29e1cfd537c2b
  * polkit-auth-prompt: Drop receives-default.
    Otherwise moving the focus via tab to cancel and hitting
    <return> activates 'ok' instead of 'cancel'.
    Also drop the deprecated double-buffered property.
    Fixes: 3b60ed8fa4d08c18978e4b90ddf29e1cfd537c2b
  * system-prompt: Drop property descriptions.
    We have doc strings which allow for more context and don't
    end up eating space in the binary.
  * system-prompt: Simplify by using template_callback.
    Less code.
  * system-prompt: Drop receives-default.
    Otherwise moving the focus via tab to cancel and hitting
    <return> activates 'ok' instead of 'cancel'.
    Fixes: f2feed05d89bddf440685589b3c5f85bc61bd5f6
  * network-auth-prompt: Drop receives-default.
    Otherwise moving the focus via tab to cancel and hitting
    <return> activates 'ok' instead of 'cancel'.
    Fixes: 5ec5a932461fad35b3a9830fba3b23abe2a97050
  * app-auth-prompt: Drop receives-default.
    Otherwise moving the focus via tab to cancel and hitting
    <return> activates 'ok' instead of 'cancel'.
    Fixes: 14a763b094630cd326b4d7b09a834cd0e15a5973
  * end-session-dialog: Drop receives-default.
    Otherwise moving the focus via tab to cancel and hitting
    <return> activates 'ok' instead of 'cancel'.
    Fixes: fb4c5e1d3493865be3d84d00c3dc9859ea9bf107
  * end-session-dialog: Set focus.
    Make this explicit as in other modal dialogs
  * end-session-dialog: Avoid creating a row.
    Since we don't need to disable focus anymore we can just use
    gtk_list_box_insert ().
  * end-session-dialog: Make listbox insensitive.
    The list of inhibited apps should just be avoided when using keyboard
    focus however just setting can-focus = False on the listbox and the
    rows only makes it swallow the cursor completely. Mark the widget
    as insenitive instead. This dims the widgets in the listbox so
    undo that via CSS.
    With that using tab to cycle through the dialog works as expected (only
    switches bestween the buttons).
  * mode-manager: Don't use wl before we checked the async operation.
    Otherwise this can cause problems when the async calls is cancelled
    in dispose and PhoshWayland already got disposed since we'd trigger
    recreating the singleton.
  * wifimanager: Don't check type before async error check
    self might already be gone if the async call got cancelled in dispose.
  * docs: Drop coverage report.
    Using a gitlab badge is nicer since it doesn't clutter the the docs.
  * wwan: Move wwan DBus sources to src/dbus.
    This gets them ignored when calcualting coverage but also gets us closer
    to have all DBus generation in once directory and meson variable.
    We keep file and interface names unchanged for minimal diff noise and
    just rename the interface definitions.
  * monitor: Move DisplayConfig DBus sources to src/dbus.
    This gets them ignored when calcualting coverage but also gets us closer
    to have all DBus generation in once directory and meson variable.
    We keep file and interface names unchanged for minimal diff noise.
  * osk: Move OSK0 DBus sources to src/dbus.
    This gets them ignored when calcualting coverage but also gets us closer
    to have all DBus generation in once directory and meson variable.
    We keep file and interface names unchanged for minimal diff noise and
    just rename the interface definitions.
  * osk: Move to src/
    No point to have a directory for single file.
  * tests: testlib: Unregister timeout handler.
    Otherwise it might fire at a later invocation.
  * tests: testlib: Don't fetch outputs early.
    This can cause trouble when using this to bring up the shell since we
    might otherwise miss wayland events in the shell (see
    phosh_shell_constructed).
  * tests: Always run idle-manager test.
    Now that we can use PhoshShell in tests use that
    in a thread plus a spawned compositor to always
    run the idle tests instead of requiring a running
    shell upfront.
    For that we need to fix resource leaks to not reuse
    DBus proxys on already gone shells, etc.
    We mark DBus session bus using tests as not being run in parallel for
    now since test clients might otherwise get confused.
  * tests: Add initial screenshot-manager test.
    Takes a screenshot and makes sure it ends up in the right location
    on disk.
  * Add initial monitor-manager test.
    Just queries the current state.
  * tests: Add initial notify-manager test.
    Since we want notifications on the lock screen soonish we better
    test this a bit.
  * gitlab-ci: Use libglade-common from experimental too.
    This fixes the build until bullseye gets unfrozen
  * po: ja: Fix printf format in translation.
    It swapped to arguments without marking as such.
  * po: ja: Remove second plural forms.
    Japanese uses nplurals=1
  * gitlab-ci: Install gettext.
    Needed for po file check
  * Move po check from gitlab-ci to a tools/
    This allows for easy local checking
  * tools/check-po: Check po files via msgfmt.
    This makes sure we don't end up with incorrect plural forms
    or broken format strings.
  * top-panel: Indicate disabled state for wifi and bt.
    The top panel so far handled disabled the same as missing for wifi and
    bt.
  * settings: Add torch brightness slider.
    This adds brightness slider when the torch is enabled. (Closes: #386)
  * debian: Switch to debhelper 13.
    This makes us fail on missing files
  * hacking: Fix property function names.
    We always use the singular form
  * Add css names to info widgets.
    This eases styling and makes things consistent with other widgets
  * top-panel: Add css name.
    Instead of using a CSS class on the top-panel and the widget name
    for home make this consistent.
    We use 'top-panel' since this is what is should be named (pending
    a source file and class rename).
  * top-panel: Always use bold font for indicators.
    We always want to use bold font on the right indicator box
  * batteryinfo: Drop superfluous NULL checks
    g_clear_object() does this for us.
  * batteryinfo: Add optional label with battery percentage
  * panel: Honor show-battery-percentage.
    This allows to show the battery percentage in the top bar
    Closes: https://source.puri.sm/Librem5/phosh/-/issues/268
  * debian: Use systemd.
    Use systemd for the CI debs and simplify installation (we don't
    need any enablement)
  * notify-manager: Fix docstring
  * notifications: Expand docs a bit.
    I always need to look up the relationship of the classes. Add some
    docs to make this simpler.
  * notification-content: Make sure we disconnect on dispose.
    Use g_signal_connect_object() instead of g_signal_connect()
    so that if self goes away the signal handler gets disconnected.
    The notification might live way longer than the content, e.g. when a
    banner expires but the notification is still in the notification list.
    Closes: https://source.puri.sm/Librem5/phosh/-/issues/321
  * shell: Emit signal when shell is fully up
  * tests: Test shell ready
  * main: Measure startup time
  * main: Inform systemd we're up
  * systemd: Inform systemd we support notify.
    Closes: https://source.puri.sm/Librem5/phosh/-/issues/568
  * tests: Don't hardcode version
.
  [ ZenWalker ]
  * layersurface: avoid redundant assignment
  * end-session-dialog: avoid redundant assignment
.
  [ Pablo Correa Gómez ]
  * settings: Remove duplicated assignment after check
.
  [ Dylan Van Assche ]
  * proximity: faster proximity fading.
    Fades out faster when in proximity.
    This improves the user experience when placing a call
    as the phone blanks faster. The user isn't 'afraid'
    anymore to accidentally touch a button with
    his/her/their ear when placing a call for example.
.
  [ lajonss ]
  * settings.c: quick settings Wi-Fi and BT toggle.
    Quick settings Wi-fi and BT buttons
    were opening the corresponding settings panel.
    This commit introduces new behaviour for
    Wi-Fi and BT quick settings:
    - toggling enabled state on clicked event
    - opening settings panel on long_pressed event
    This commit introduces "button-pressed" feedback
    on opening settings panels.
    Concerns: #372 (Quick toggles open settings panels)
  * settings: wwan quick toggle.
    Changes behaviour of wwan quick settings from:
    - opening settings panel on click,
    to:
    - toggling wwan enabled on click,
    - opening settings panel on long press.
    Introduces PhoshWWanManager - base class for WWan
    backends. Used for backend-agnostic nm operations.
    Concerns: #372
.
  [ Zhaofeng Li ]
  * data: Generate required session components from an array
  * Add systemd user units.
    This allows Phosh to be started with `gnome-session --systemd`, with
    most session components managed by systemd.
  * Allow the compositor path to be overridden in a Meson option.
    However, `/usr/bin/phoc` will still be used if it exists.
  * Add environment variable to support overriding the gnome-session executable
.
  [ Vittorio Monti ]
  * po: Update Italian translation

Required patches on other projects

Patches that aren't merged upstream yet or not in a released version:

Recommended patches on other projects

Patches that aren't merged upstream yet or not in a released version: