Commit Graph

861 Commits

Author SHA1 Message Date
dcz
5a210712f6 Merge branch 'fix' into 'master'
Fix scaling to set height

See merge request World/Phosh/squeekboard!535
2022-04-05 11:55:55 +00:00
Dorota Czaplejewicz
bb8bba163e layouts: Add Greek Polytonic
By Antonis Tsolomitis <atsol@aegean.gr>
2022-04-05 11:41:27 +00:00
Arnaud Ferraris
83b0d1553f state: fix "wide mode" detection in portrait orientation
We need to check if we should use the wide layout based on the
*logical* display width, not its *physical* resolution.
2022-04-05 10:16:22 +00:00
Dorota Czaplejewicz
29b30fbe22 panel: Use scaling to set height 2022-04-05 09:26:11 +00:00
William Wold
04018a8c06 Do not reset pending state on zwp_input_method_v2.done 2022-03-15 15:51:09 -04:00
dcz
dd2871b6bb Merge branch 'output' into 'master'
Derive panel size from outputs

See merge request World/Phosh/squeekboard!528
2022-02-26 10:49:52 +00:00
William Wold
0b9350d19b Check if dbus handler is null before using 2022-02-08 10:56:00 -05:00
Dorota Czaplejewicz
16d6871422 panel: Apply a hard limit of 1/2 height 2022-02-04 09:40:21 +00:00
Dorota Czaplejewicz
78ff02e255 output: Use new source of panel height information
This removed duplicate calculation of ideal height as well.
2022-02-04 09:40:21 +00:00
Dorota Czaplejewicz
a3f91701d0 outputs: Remove ui manager 2022-02-04 09:40:21 +00:00
Dorota Czaplejewicz
697be64418 visibility: Forward panel height information to window creation 2022-02-04 09:40:21 +00:00
Dorota Czaplejewicz
a4b67c65ff Don't reach for globals to choose output
This actually removes the size request from panel creation. Incidentally, this still works becuae the following configure event gets the sizes from glib.
2022-02-04 09:40:21 +00:00
Dorota Czaplejewicz
f040e708a4 Carry output information on visible command all the way to C 2022-02-04 09:40:18 +00:00
Dorota Czaplejewicz
e6c19a1e6a deps: Vendor assert_matches
The library is small and simple enough to be considered "finished". In addition, it doesn't seem to be shipped by Debian.

In relation to its usefulness, it's little effrt to copy it.
2022-02-04 09:38:06 +00:00
dcz
98ecce518b Merge branch 'tiny' into 'master'
Output sensing

See merge request World/Phosh/squeekboard!524
2022-02-02 17:41:14 +00:00
dcz
dfcb3ce020 Merge branch 'layout_ro' into 'master'
Add Romanian layout

See merge request World/Phosh/squeekboard!525
2022-01-30 17:52:57 +00:00
Tor
417fe35e91 Make compatible with latest cargo deps 2022-01-30 17:47:57 +00:00
Dorota Czaplejewicz
3f598086b7 Store preferred output 2022-01-30 12:43:17 +00:00
Dorota Czaplejewicz
3b0b8bea0d Save outputs state 2022-01-28 15:26:22 +00:00
Cosmin Humeniuc
ba00ec86a1 Add Romanian layout 2022-01-27 20:42:17 +02:00
Dorota Czaplejewicz
f15f97d4c9 outputs: Handle removal
Currrently, Squeekboard doesn't do anything with this information.

It still expects one output to be present, or it will crash.
2022-01-26 15:19:58 +00:00
Dorota Czaplejewicz
d3eb68ed5a outputs: Notify the state manager about changes 2022-01-26 15:19:58 +00:00
Dorota Czaplejewicz
14a485deba outputs: Clean up for more Rust usage 2022-01-26 15:19:58 +00:00
Dorota Czaplejewicz
236f7d4daf ffi: Remove unnecessary pointers to InputMethod
InputMethod is already a pointer.
2022-01-26 15:19:58 +00:00
Dorota Czaplejewicz
f4f44a49ae wayland: Move initialization to the Rust side
This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there.

The second benefit is that it allows outputs to become part of new state management.
2022-01-26 15:19:58 +00:00
Dorota Czaplejewicz
1b72cbdfaa docstrings: Clarify the purpose of Receiver 2022-01-26 15:19:58 +00:00
Dorota Czaplejewicz
ff3f7228b5 cleanup: Remove unused header lines 2022-01-26 15:19:58 +00:00
dcz
71768e27c0 Merge branch 'noreg' into 'master'
ci: Use bookworm image

See merge request World/Phosh/squeekboard!510
2022-01-19 16:49:21 +00:00
Dorota Czaplejewicz
8eb1c9b4a7 build: Remove regex crate 2021-12-17 14:04:22 +00:00
Dorota Czaplejewicz
3d60dd96af Revert "util: Add ArcWrapped"
This reverts commit 5c1b28e4ed8b046a251609e5f7db4b4df9e710f5.

It has only been needed to move Rust structure across C bridges. That's unneeded with more integration.
2021-12-12 12:49:12 +00:00
Dorota Czaplejewicz
4cc7017e1c event_loop: Separate and use for physical keyboard presence
Extra included: Change of naked Submission pointers to Wrapped.
2021-12-12 12:49:11 +00:00
Dorota Czaplejewicz
53137fd2e2 state: Connect the animation state machine to the rest
This ensures that the new state machine is fed events, as well as that its results are applied.

The old ad-hoc system is removed.

There is one regression where the last layout will be used when the panel is brought up manually.
2021-12-12 12:48:06 +00:00
Dorota Czaplejewicz
334504a5b2 animation: Prototype a way of handling state and applying it separately
Handling visibility state ad-hoc has shortcomings in testability and locality, and this module attmepts to rectify that by creating an explicit state machine, along with a loop to drive it.

Actually applying state is not implemented here.
2021-12-12 12:48:06 +00:00
Dorota Czaplejewicz
f5a1d379ca util: Add ArcWrapped
This structure is necessary to wrap Send data structures which are actually moved between threads.
2021-12-12 12:48:06 +00:00
Dorota Czaplejewicz
d64b8cdf1a submission: Wrap the structure in a safe wrapper 2021-12-09 12:43:36 +00:00
Dorota Czaplejewicz
81948425d8 popover: Fix reentrancy problem
Calling popover.show() returns control to the main loop, but squeekboard structures are still borrowed meanwhile. That's dangerous and forbidden in Rust. Therefore, this forces the return from the stack and release of the borrows before the glib main loop is invoked again.
2021-12-09 12:41:58 +00:00
Guido Günther
750814e050 Drop locale_config
Not used anymore.
2021-12-09 11:29:48 +01:00
Guido Günther
10ea276052 Drop custom translation handling
xkb layouts are translated fine by libgnome-desktop. If not
we should go fixing there since that makes keyboard layout
strings consistent with e.g. gnome-control-center.

There weren't any 'exotic' strings in the current translations
so what we get from libgnome-desktop should be just fine.
2021-12-09 11:29:48 +01:00
Guido Günther
72a7825c85 popover: Don't complain about missing translations
It's fine to do all via po.
2021-12-08 15:29:57 +01:00
Guido Günther
da789bcb87 Remove emoji and terminal from translations
Handled via po. Remove now empty files. The match with resources.rs
shows that some of them weren't even used (e.g. fa-IR) showing why a
switch to po is useful (which allows to maintain us that outside of
code).
2021-12-08 15:29:57 +01:00
Guido Günther
2aa9cf26ee popover: Make the ui file match the code file name
UI files are usually named like the code file. Stick to that
pattern.
2021-12-08 15:29:57 +01:00
Guido Günther
9b7e065b0f popover: Move Emoji and Terminal to ui file
This allows them to be translated via po so we don't have to maintain
the translation list by hand or care about empty translation files.

The only downside is that the "overlay layouts" in OVERLAY_NAMES need to
match the ones in the ui file but since a missing one is a clean crash
when selected there's little potential for subtle breackage. We could
even ensure consistency by comparing the two at run time but they change
only slowly this is not much of an issue (compared to how e.g. new
languages can be added now).
2021-12-08 15:27:17 +01:00
dcz
e776bf005e Merge branch 'email-and-url-variant' into 'master'
Add URL and email variants for US layout

Closes #65

See merge request World/Phosh/squeekboard!495
2021-12-08 11:52:17 +00:00
Guido Günther
12cf628c71 Add URL and EMail keyboard variants for us
Closes: #65
2021-12-05 21:26:44 +01:00
Guido Günther
16dd4f9753 server-context-servide: Don't translate application name 2021-12-05 21:04:43 +01:00
dcz
5054f4c9de Merge branch 'pin-keyboard' into 'master'
Use special pin keyboard

See merge request World/Phosh/squeekboard!492
2021-12-05 18:23:35 +00:00
dcz
6eb3914ab3 Merge branch 'po' into 'master'
Add initial po support

Closes #315

See merge request World/Phosh/squeekboard!497
2021-12-05 18:02:55 +00:00
Guido Günther
4903f3d1a0 layout: Keep content purpose around
This allows to add proper CSS style classes based on that
2021-12-05 17:31:12 +01:00
Guido Günther
3513bf8de4 Use special pin keyboard
This helps muscle memory
2021-12-05 17:31:12 +01:00
Guido Günther
5f40c31cab layout: Drop trailing whitespace
Otherwise sane editor setup is basically impossible since
we want to trim that by default (and not manually like here)
in the future.
2021-12-05 17:31:12 +01:00