Commits at f0d1f8284c6dfe7126ba5fd7b1554aa9faf6e1a5
f0d1f828Fix category panel loses focus after opened
When "AdwOverlaySplitView" opens the sidebar, it moves focus to the list
widget and the list widget *emits "row_selected" signal* with the
currently selected row. This quirks made the previously added
close-sidebar-on-row-select code to immediately close the sidebar upon
opening, but somehow the split view prevents closing the sidebar
immediately. As a result, the sidebar is closed-but-open state and focus
moves to the browse item row.
The code added in this patch is a workaround to this GTK bug. Inside
"row_selected" signal handler, it checks whether the signal is really a
"selected" event or not by testing the values.
Shota FUJI
authored at
Shota FUJI
comitted at
babb27deFix playback buttons have empty screen reader label
GtkButton or something messes with the `label` property? idk.
https://codeberg.org/pocka/plac-for-gtk4/issues/29
Shota FUJI
authored at
Shota FUJI
comitted at
376f82abClose category panel after selection when "focus on load" is enabled
The "focus browse items on load" option moves focus to the first loaded
item. This is problematic when the category panel (sidebar) is collapsed
and user selected a category using keyboard: the app moves focus to the
browse item list, but category panel is still open. In other words,
focus moves to the widget under an overlay.
While the behavior after this patch is not the best one, it's the safest
and correct one, I believe.
Shota FUJI
authored at
Shota FUJI
comitted at
7117b5f9Add user-customizable keyboard shortcuts
https://codeberg.org/pocka/plac-for-gtk4/issues/26
All but "browse back" have no default set for backward-compatibility.
"F10" for "Open application menu" might be a good candidate for default,
but I'm afraid that stealing key press from DE or other stack's shortcut.
---
Why writing own UI and mechansim?
GTK4/GNOME does not have good support for keyboard shortcuts.
It does not have a native way to let users customize shortcut, or API to
do so. This is fundamental design problem of GNOME. From their HIG:
https://developer.gnome.org/hig/guidelines/keyboard.html
> Use the standard GNOME shortcut keys if your app supports those functions.
> ...
> Don’t assign awkward reaches. Some people may only be able to use one hand
> on the keyboard, so shortcuts that can be easily used with one hand are
> preferable for common operations. (This guideline also applies to access
> keys below.)
While the first line makes sense, the "standard GNOME shortcut keys"
lacks many application types they couldn't imagine of, thus
"non-standard" applications have difficult time finding unused safe key
combinations.
The last line is straightup garbage. It's clear they don't understand
keyboard accessibility at all: people have different hand shapes,
use different keyboard layouts, or may have difficulty using their hand
partially or entirely. Application opts to non-configurable keyboard
shortcut is *okay*, but UI toolkit and platform embracing hardcoded
keyboard shortcuts is not. It's accessibility nightmare. A GUI toolkit
can't have great accessibility without user configurable keyboard
shortcuts as a first-class citizen.
I suspect this situation won't improve for foreseeable future. GTK
maintainer's stance is "it's application developer's responsibility."
"AdwShortcut*" widgets have no editing capability, and probably will not
given the HIG's writing. So each application has to write each own
keyboard shortcuts configuration mechanism, I guess.
The code is not that complex or massive. It's just I'm disappointed.
Shota FUJI
authored at
Shota FUJI
comitted at
a50feb86Add "Disable changing sensitivity before and after API calls" option
https://codeberg.org/pocka/plac-for-gtk4/issues/27
To workaround GTK4 moves focus to a sensitive widget when a widget goes
to insensitive state. Although the option suppress the safeguard, GTK4
still moves focus on pressing "play" and "pause", because it's two
buttons changing visibility instead of a single button swapping
appearance and label.
Shota FUJI
authored at
Shota FUJI
comitted at
96f826feDefine preferences dialog UI in XML file
Application.vala got too messy.
Shota FUJI
authored at
Shota FUJI
comitted at
73949790Add options to change seekbar's step/jump size
It has been fixed to 1s/10s. Ideal seekbar step size depends on personal
preferences, so I made it customizable. I changed my config to 5s/20s
after little fiddling.
https://codeberg.org/pocka/plac-for-gtk4/issues/25
Shota FUJI
authored at
Shota FUJI
comitted at
767d22f8Add stop button to playback toolbar
It works like the one on a cassette player.
I wanted it to behave like other apps, but Roon API lacks "clear queue"
functionality. It does have "subscribe to queue changes" and "play from
this queue item" but using those are hacky and fragile.
<https://codeberg.org/pocka/plac-for-gtk4/issues/24>
Shota FUJI
authored at
Shota FUJI
comitted at
25338e79Add "Default category" option
I personally don't use "Explorer" category much. The most frequently
used category differs by person, or even same person can change the
preferred category over time.
Shota FUJI
authored at
Shota FUJI
comitted at
5459e704Add "Hide window titlebar" preference option
Close button and window title does not make sense for certain kind of
window managers.
Shota FUJI
authored at
Shota FUJI
comitted at
d625bacfReorganize preference items
To use more common terminology.
Shota FUJI
authored at
Shota FUJI
comitted at
0f73b5a7Get rid of treefmt
It's not good. Overall design, speed, touches git, etc.
dprint is simple, and `buildFHSEnv` is enough for NixOS.
Shota FUJI
authored at
Shota FUJI
comitted at
2c161d22Make app menu available at server discovery window
Otherwise user has to manually edit dconf entry in order to set UDP
port.
Shota FUJI
authored at
Shota FUJI
comitted at
ba96062dFocus browse items on load
Because of Plac disables controls to prevent race-condition during API
calls, focus jumps back to unnatural position after every load. This
opt-in feature brings smoother keyboard experience. What follows after
selecting a category is select an item or browse items on list,
therefore moving focus to the list is the most suited in this case.
Shota FUJI
authored at
Shota FUJI
comitted at
de662386Do not output warning log for missing artwork image
It's an expected status code.
Shota FUJI
authored at
Shota FUJI
comitted at
1a6e7d04Output debug log by default for "zig build run"
99.9% of the time I use "zig build run" need debug logs.
Shota FUJI
authored at
Shota FUJI
comitted at
d5bbef62Update flake input (nixpkgs)
Changes to ".nix" files:
* Rename "nixfmt-rfc-style" to "nixfmt", as it has graduated to non-RFC
official tool.
* Remove "zig.hook", as it has been integrated to the "pkgs.zig".
Shota FUJI
authored at
Shota FUJI
comitted at