Commit graph

23693 commits

Author SHA1 Message Date
Caolán McNamara
e1bf395798 aarch64 doesn't have SYS_futimesat
we picked something obscure, and clearly aarch64 took advantage of
not adding something obscure unnecessary for backwards compatibility
on that arch

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I097ef24c98e23931a3997c743d17d52c0afd52b7
2024-04-07 22:20:10 +02:00
Martin Srebotnjak
affa583eb5 Translated using Weblate (Slovenian)
Currently translated at 100.0% (584 of 584 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0d6b357e94e0c991a0f3020ec3bb45a5c5b94a6f
2024-04-07 14:13:05 +02:00
Andras Timar
cd9293f95b Translated using Weblate (Hungarian)
Currently translated at 100.0% (584 of 584 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I16965aacd9f5c285c2cf94505ca76c309c68a020
2024-04-07 14:13:05 +02:00
Andras Timar
9ce1b32d05 Bump version to 24.04.1.2
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I44be7be99a902b2da46aff26a74b3cf8189fdc8d
2024-04-07 14:11:38 +02:00
Caolán McNamara
ee807283d4 drop newly unused HAVE_GETENTROPY and HAVE_SYS_RANDOM_H
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iccfa44f56fb0d3b185df3c9c8457cf19d42f85f1
2024-04-07 12:11:48 +02:00
Michael Meeks
144b701453 cool#8703 - Drop random node creation and rely on inherited fd.
Re-using an inherited file descriptor to /dev/urandom frees us
from problems with mount options including 'nodev' and removes a
capability from the set we need.

Change-Id: I70337e923f802d7efbd3159c11a4e39f6529b6e6
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-04-07 12:11:48 +02:00
Michael Meeks
7311352dd6 Random re-work: keep a file-descriptor open to /dev/urandom
This should be inherited by forked children, and kept alive at all
times. If we have it already open everywhere, there seems little
benefit to the getrandom / getentropy system calls.

Change-Id: I5d58f7216c65febd161cbd78c24308d9192830ee
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-04-07 12:11:48 +02:00
Michael Meeks
29ef73868f killpoco: avoid using Poco::Random which likes /dev/random.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I34659b3fda8a22a1b34416a37e18f483d7961f5e
2024-04-07 12:11:48 +02:00
Andras Timar
5e08727bd5 Fix typo: Bellow -> Below
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1b9938006734063075ff4e87193289a09f726a35
2024-04-06 17:11:28 +02:00
Oğuz Ersen
4f57fe8645 Translated using Weblate (Turkish)
Currently translated at 100.0% (584 of 584 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/tr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I41dd523b698ed045350da7bc94e7ba93c028feee
2024-04-06 17:10:22 +02:00
Matthaiks
00e2a29383 Translated using Weblate (Polish)
Currently translated at 100.0% (478 of 478 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (584 of 584 strings)

Co-authored-by: Matthaiks <kitynska@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/pl/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pl/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib6cff3505678989abd2bb5ebb4c5f32a177916e7
2024-04-06 17:10:22 +02:00
gallegonovato
5ef7265f5c Translated using Weblate (Spanish)
Currently translated at 100.0% (584 of 584 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/es/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id0232aecaa33814f268ba1d828d0dbb02813f79b
2024-04-06 17:10:21 +02:00
Szymon Kłos
ee256370dd Remove unused hideTooltip function
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If83bee032183fe93489eb8ff98f6f036528bd48b
2024-04-06 01:18:20 +02:00
Szymon Kłos
d79ca54bf7 Move updateVisibilityForToolbar to toolbar base class
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I81c24b50a304ac6771feedfb241a2af54fef8b2c
2024-04-06 01:18:20 +02:00
Szymon Kłos
1ad7500dfb mobile: show/hide align menu correctly
after accessibility rework in notebookbar we use "-"
as separator between id sections for something...

this breaks getting the menubutton items by id,
let's avoid that character then

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I58f6c03bd635e981986b64ae2acfc43561146e8f
2024-04-06 01:18:20 +02:00
Szymon Kłos
92588928ab statusbar: hide icon for language menu
it wasn't there before w2ui removing

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iaef58f76b8cd8aaa606dc6384d458448c24d5564
2024-04-06 01:18:20 +02:00
Szymon Kłos
6a1b5ec7d8 Firefox compatibility fix: text-wrap
As in https://caniuse.com/?search=text-wrap
text-wrap property is not used in currently most
popular Firefox versions, let's change it to
more popular white-space property.

It fixed wrapping of text in statusbar in Firefox

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0fc68fbb128db56844ae8e0174fe292ee95c572a
2024-04-06 01:18:20 +02:00
Szymon Kłos
3d5e04c671 Remove unused userlist code from statusbar
- desktop shows userlist on the top, don't show duplicate in the statusbar
- make behavior compatible with previous version (23.05)
- remove unused signal: it is fired but nothing is listening for it
  (updateuserlistcount)

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iabcb3b4a926c8941acf2e1425a9a28ede6e88311
2024-04-06 01:18:20 +02:00
Szymon Kłos
4885cbbaeb jsdialog: create base class for toolbars
This allows to share code and provide unified interface
for functionality like: show/hide/enable/disable/insert item.
Also restricted mode is supported for all the items.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4a4e7ea43a993751b28f685544827d00b2b3668f
2024-04-06 01:18:20 +02:00
Szymon Kłos
74ec3af8b3 Unify MobileSearchBar naming with other toolbars
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1102cb49e1dada7f3c5439068a05476b10c3ce96
2024-04-06 01:18:20 +02:00
Szymon Kłos
71f191803d remove-leaflet: Control.MobileTopBar
use standard ES6 class

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I316a7dad8b2085938602907f65f1affd4768a1e2
2024-04-06 01:18:20 +02:00
Szymon Kłos
4fd44c73ec remove-leaflet: Control.MobileBottomBar
use standard ES6 class

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I84698240985cf45bbd131f114f93f90b0f91711c
2024-04-06 01:18:20 +02:00
Szymon Kłos
69e85b4c6b remove-leaflet: Control.TopToolbar
use standard ES6 class

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1b0d9d13354bb8c6d6d70705e427e07f9d221ffd
2024-04-06 01:18:20 +02:00
Szymon Kłos
30c0d121ad remove-leaflet: Control.StatusBar
use standard ES6 class

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic4f41c050d05bf3ffb1a52c72e88af8901b271f6
2024-04-06 01:18:20 +02:00
Andras Timar
51b6f522c7 Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia23a33769b7844300bacd7df9a4ad0e2701dcec2
2024-04-05 18:54:09 +02:00
Alexander Gabilondo
f65cbf1ba1 Translated using Weblate (Basque)
Currently translated at 99.8% (581 of 582 strings)

Co-authored-by: Alexander Gabilondo <alexgabi@openmailbox.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/eu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib8dc41ff640785221cbb04c27b2c9ae5afb3fc21
2024-04-05 18:53:12 +02:00
ButterflyOfFire
dbe02ab9d3 Translated using Weblate (Kabyle)
Currently translated at 12.8% (75 of 582 strings)

Translated using Weblate (Kabyle)

Currently translated at 13.5% (65 of 478 strings)

Co-authored-by: ButterflyOfFire <boffire@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/kab/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/kab/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Idd37c98f62d70b59e83202b07e3973ce430f4aeb
2024-04-05 18:53:12 +02:00
Flavio F. M
f5fd9d248e Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (22 of 22 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (110 of 110 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (22 of 22 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Flavio F. M <flavius_androiduser@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/pt_BR/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/pt_BR/
Translation: Collabora Online/Android app
Translation: Collabora Online/Android lib
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I8b69106c8f95d50ab2bda716cde84c71a12a149d
2024-04-05 18:53:12 +02:00
Michael Meeks
e27a095775 bgsave: initial implementation (gated on COOL_BGSAVE=1)
Initial background save implementation from the Kit perspective.

To do a background save we:

   1. join known threads - we can't fork with >1 thread.
   2. check all is well: one thread, nothing unusual...
   3. create a socketpair to communicate with the child
   4. fork
   5. child: cleanup duplicated sockets
   6. child: setup LOK to not damage our shared file-system
   7. child: save
   8. child: report status back to parent & _Exit

There is still a substantial TODO, but this can be built on.

Change-Id: Ibf2c492372e2b5133932773e230ad05e18521794
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-04-05 17:34:43 +01:00
Michael Meeks
ae9fee7f5a bgsave: add WebSocketHandlers for Kit to chat with its forked child.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I224f120b9aae347c39d5c1471e2e74d8149c87f1
2024-04-05 17:34:43 +01:00
Patrick Luby
52a039e832 If there are no open documents, wait until one is added
Remove any stale elements from KitSocketPoll::KSPolls and
block until an element is added to KitSocketPoll::KSPolls

Signed-off-by: Patrick Luby <guibomacdev@gmail.com>
Change-Id: I25726171ef28d9107772f7665dd3cbb467e364e5
2024-04-05 09:02:13 -04:00
Caolán McNamara
bb7cd9f357 After fork we don't have a watchdog thread
So watchdog won't fire for a stalling kit.

After a fork the child has only one thread, but a copy of the watchdog
object.

Stop the watchdog thread before fork, let the child discard its copy of
the watchdog that is now in a discardable state.

And allow it to create a new one on the next SocketPoll ctor.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7dc166dca3996401fbdc20cd7643f944662454c8
2024-04-05 10:50:33 +01:00
Darshan-upadhyay1110
d1bc0e8f69 User avatar should be consistent after mode change
- User avatar should first consider is there is already extract info available or not
- if we already have that image source data then please do not set default value
- also when mode change we do preform some refresh function on all icons
    - `map.on('themechanged', setupIcon, this);`
- in that case as well, first check if we have user extract info or not
- and based on that set image source URL
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>

Change-Id: Ifbd543322f5222fa7717b40a5ae565ed2f3c9891
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
2024-04-05 09:15:29 +02:00
Miklos Vajna
75251f9496 cool#8648 clipboard: try to use navigator.clipboard.write()
For one, getting the selection HTML all the time when we create a text
selection is a waste of resources, since only a subsequent copy needs
that HTML. For another, the complex selection case required a confusing
"two step copy" workflow, where first you press Ctrl-C, then you
download the large selection, finally you press Ctrl-C again.

The underlying problem is the same: the document.execCommand() API for
copy (and cut) is synchronous, but network operations are async, which
don't play well together.

Fix the problem by trying to use navigator.clipboard.write() instead:
the write() call still has to happen inside a magic security context
(keyboard used, click happened), but it can take a callback as a
parameter, and inside that callback it's fine to perform async network
operations, which allows both using a one-step copy and getting rid of
the HTML download on text selection change (when most of the time we
don't need it).

Tested:

- Chrome and Safari; the behavior for Firefox is unchanged, unless
  about:config opts in to expose the new Clipboard API.

- HTML, plain text and image copy.

- Cut, not only copy.

- Doing this with the notebookbar button & keyboard.

- A single cypress test now uses a fake clipboard to assert copy. The
  rest of the tests are left unchanged for now, but likely we need to
  get rid of this implicit assumption that the copy container is updated
  on selection change: different behavior for automated vs manual testing
  is ugly.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ifcf16474a339f3f1dae3dc99181836e645340048
2024-04-04 14:09:42 +01:00
Szymon Kłos
6b37c158d1 jsdialog: enable desktop's idle popup on mobile
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I109b68e6190b16b25ad3a7404141d84c9b713227
2024-04-04 13:43:35 +02:00
Szymon Kłos
2d023ec77f jsdialog: handle select/unselect in toolitems
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I877d1803ba4605c4b82cb2adee2bb6c4226381a4
2024-04-04 13:43:35 +02:00
Szymon Kłos
f8d457cb62 remove-w2ui: convert mobile bottom bar to JSDialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1e86d91282d15c6ed055f9a74808cd3158ff08de
2024-04-04 13:43:35 +02:00
Szymon Kłos
cff5442244 jsdialog: enable snackbar on mobile
So far we had duplicated snackbar code.
Desktop version was more advanced, mobile wasn't updated.
Mobile one used mobile-wizard as a base so we had to hide
currently presented menu to show small piece of information.

Let's use desktop snackbar on mobile as well. We will be able to
remove old code path from mobile later.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1da7a6b75591913ca0fc66f6d0e81d136c874f62
2024-04-04 13:43:35 +02:00
Szymon Kłos
912258fe3e jsdialog: enable dropdowns on mobile
Let's allow usage of JSDialog component previously
used on desktop and tablet only - in some cases on mobile.

This case are dropdowns which we do not want to show
as separate mobile wizard screen (eg. alignment selector
from toolbar).

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ibcfaea457c065c34644738c7bf56a2e4e53c50a3
2024-04-04 13:43:35 +02:00
Szymon Kłos
c2a0d50839 jsdialog: create separate Util.MessageRouter
So we can type our messages, callbacks and better manage
where message is sent

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3290f5cf9bc08669353d3e71785baffc6fb07003
2024-04-04 13:43:35 +02:00
Szymon Kłos
84e7eb7d03 jsdialog: reduce missing icon warnings
If MenuButton has custom menu defined it should
use original data.id as a command to avoid warnings
about missing icon with "-menu" suffix.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I06dfcdb0412c7d087f4002cdfff83f8157c3f237
2024-04-04 13:43:35 +02:00
Szymon Kłos
46a5b063b7 remove-w2ui: delete library's JS file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib279379168d86227b2abf2c979d302c5156fc7f2
2024-04-04 13:43:35 +02:00
Szymon Kłos
72fece4cd1 Add separate mobile commands in docdispatcher
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6d83f0f5fbd0e373bd28129f8e444795068e3720
2024-04-04 13:43:35 +02:00
Michael Meeks
fd635e4d69 SocketPoll: better re-entrancy protection.
Remove toErase list; instead null socket pointers earlier
to make things more deterministic.

Simplify toErase path, by just removing null sockets.

Check _socketPoll array bounds to cope with a re-entrant
mutation - imperfect; but the fd comparison will help.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I27d81358a7d80b939b50ce4ccb1b2178a091a360
2024-04-04 07:16:53 -04:00
Gökay Şatır
cd014a92c2 Add simple geometry classes.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ic1819ff187edc9c0d33f77b3b82054cb8b27c6dc
2024-04-04 13:05:04 +03:00
Michael Meeks
9ba05ccbe6 Reduce C++ requirement.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I640230950cabd93bf12c86750f6aa6c95eb05021
2024-04-03 22:38:08 +01:00
codewithvk
5a90127236 fix : Present in the window button hides only for mobile apps
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I8b2824f6a17091d1a5202051cc95b6a53013f0cf
2024-04-03 13:38:36 +00:00
Ashod Nakashian
958f4b0f55 wsd: merge downloadAdvance with download
Change-Id: I0f9ad626c78e81896e42f5a431b0f209a77f563a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
64b4339e00 wsd: pass uriPublic explicitly to download()
Change-Id: I7c333c83598c2a4847efcd96cd59bc595cdae49f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00
Ashod Nakashian
25d10bf490 wsd: simpler downloadAdvance interface
Change-Id: Ibd8ba73b2f4e926cc078e66f53766ee99478f9d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-04-03 14:26:28 +01:00