Commit Graph

64850 Commits

Author SHA1 Message Date
Emir SARI
174b7ef6cc ShowImage: Use BNumberFormat for percentage value
This provides automatic percentage formatting according to the locale
setting.

Change-Id: I9a833fdc4056ac5479d8e4b4feddd0fce06d1fcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6210
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-16 21:22:36 +00:00
Augustin Cavalier
f6fad5e8c2 src/test: Remove "sock".
Now available via HaikuPorts if needed.
2023-03-14 15:23:24 -04:00
Augustin Cavalier
f3dc3eabfc Mail: Increase the minimum size of the attachments view.
This restores approximately the old fixed size from before the
previous commit. Ideally this would be the preferred size, not
the minimum size, but that isn't quite possible when contained in
a scroll view.
2023-03-14 15:08:41 -04:00
Augustin Cavalier
e76f360a15 Mail: Refactor the Attachments (Enclosures) views to use layouts.
This does not fix all the problems with their appearance,
but it does fix some of them, and paves the way for further fixes
to be made.
2023-03-14 15:00:34 -04:00
Zach Dykstra
dd3f595b54 mail: only copy attributes for new IMAP folders
When mail_daemon associates a subscribed IMAP folder with a local
folder, ~/config/settings/Tracker/DefaultQueryTemplates/text_x-email
attributes are duplicated to the folder. Any customizations (column
layout, window size / location, etc) are overwritten by the values set
for text_x-email. The text_x-email template folder was originally meant
to be used by the 'New E-mail' query. In particular, the columns that
might be set for the query view aren't directly useful for an IMAP
folder - Account is useful for the query view, but not for an IMAP
folder, Status is not useful for the query view, but useful for an IMAP
folder.

This behavior is now modified such that attributes are only copied the
first time an IMAP folder is created. Subsequent launches of mail_daemon
will not overwrite per-folder customizations.

Fixes #18297

Change-Id: Iacdc78403681d5546668f28f7f0e34d1a57fd410
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6202
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-14 16:52:52 +00:00
Emir SARI
304569520d MediaConverter: Use BNumberFormat for percentage value
This provides automatic percentage formatting according to the locale
setting.

Also replaces some occurences of sprintf with SetToFormat.

Change-Id: I330aaebfe4615f4b40b00bd04f83a1a6d8efd6a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6204
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-14 16:49:03 +00:00
Emir SARI
4a0a64d446 AboutSystem: Use BNumberFormat for percentage value
This provides automatic percentage formatting according
to the locale setting

Change-Id: I571d2bd9ffc53425c9633de3504d04f41acf0017
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6157
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-13 09:44:19 +00:00
Alexander von Gluck IV
b965b55d86 efi/serial: re-init serial after efi detatchment
* This prevents haiku from "messing" with the gUART until
  EFI boot services are exiting.
* The previous design meant that our loader started fiddling
  with the gUART while EFI BIOS services were still being
  used.  On the SiFive, this broke serial output.
* Now, we guard on serial_init if EFI is unavailable, and
  only fallback to direct UART usage when EFI is no longer
  available.
* tldr; we're more closely managing serial across architectures
  * serial_init use EFI and init it
  * kernel_serial_handoff, stop using EFI
  * serial_init, oh no EFI. Use gUART and Init it
* one gap is likely if no serial is available in EFI, but I
  haven't seen that yet.

Change-Id: I644b51e4912272110435d288a95517d43a76740d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6200
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-03-12 18:00:54 +00:00
Alexander von Gluck IV
30d8d75640 minimum: Add Installer to minimum image
* Assists on early boot platforms to install / upgrade when
  no network is available.
* Doesn't introduce any additional dependencies
* Creates shine-though directories too.

Change-Id: I11dd207b2ffbae1768bab7a118a51034df238878
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6185
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2023-03-12 16:38:38 +00:00
David Karoly
434aab5a4d headers/kernel: remove alpha folder
Change-Id: I057cb53ad68113e9dce2bb13f172d4c3eb1406af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6196
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-12 10:36:01 +00:00
Humdinger
bb46ee6d5f Installer: tweaking strings
* Add ellipsis to menu item "Set up boot menu" as it opens a window
  to do the actual setting up.

* The app name is actually "BootManager".

* Consistenly use single quotes for button labels.

* Grammer correction

Change-Id: I4eaf7029653fc53c60b4a4b4496cf87e1834ac33
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6189
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-11 22:45:19 +00:00
Pascal Abresch
b548e9131d Api docs: fix code blocks
Also simplifies some canvas vars

Change-Id: I52cd507768ffa361bbd68e1064f947bbcf2dcfa4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6184
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-11 22:28:47 +00:00
David Karoly
0aeb55c8ac arm: remove unused variables from arch_kernel_args
Change-Id: Ice2be644142b646205648f44fb5bce5e9848e69d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6192
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-11 21:05:49 +00:00
David Karoly
9a9c5e9fee kernel/arm: clean up x86 PAE related code
Change-Id: I2bd1f1dc699396fee1ec03b5895e995c3aca5fef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6193
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-11 21:05:37 +00:00
David Karoly
f964790bcc headers/kernel: remove sh4 folder
Change-Id: I71e52b0f4e81c872b9bc14490bf7c38b261120b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6194
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-11 21:05:20 +00:00
Zardshard
cc1d9fb0fe Icon-O-Matic: Refactor code slightly
* The condition in TransformBox::MouseOver is always true (hint:
_DragStateFor never returns a null value)
* The code sometimes calls fCurrentState->UpdateViewCursor twice

Change-Id: I073203278fc103f5ee720dfbe06bf1f04f48c99f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6179
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-11 10:22:02 +00:00
Autocomitter
302df93219 Update translations from Pootle 2023-03-11 08:16:52 +00:00
Zach Dykstra
fbc2a57b09 mail: filter messages in Trash from unread count
When moving an unread message to the Trash, a B_QUERY_UPDATE is
triggered, resulting in a global notification popup of the new message
count - inclusive of all messages on the volume. The on-disk location of
a mail message is now checked to determine if it's in the Trash, before
incrementing or decrementing the unread mail count (and triggering a
notification). This effectively filters out notifications for deleting
unread e-mail messages.

The Deskbar view uses the same logic to display the Mail/No Mail icon.
The B_QUERY_UPDATE handler here has been adjusted to match.

Additionally, unread mail messages in the trash are now filtered when
mail_daemon starts. This ensures that an accurate initial unread count
is set.

Fixes #18252
Fixes #17510

Change-Id: I9b8ec0b2b1f1ddb07797f8a9bedf32811f26f137
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6136
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-11 04:32:40 +00:00
Zach Dykstra
4f1e67e18e mail: fix crash when associating IMAPFolder
_CreateFolder returns NULL when it's unable to create a folder on the
local filesystem to represent an IMAP folder. This can happen when a
file has the same name as an IMAP folder that has been subscribed to on
the remote server.

Handle this condition and do not try to add the folder to a connection worker.

Change-Id: I197d577fabe45360ffa9ce4ac07da34652e78fdd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6186
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-11 04:12:44 +00:00
Zach Dykstra
6f4e837685 filetypes: fix incorrect usage
Commit 6d9b21e8 contained an error that resulted in FileTypes being
unable to set icons for files and directories. This should now be
resolved.

Change-Id: Ieb65a6d80c7f96f94bca9dff89681777c7de5577
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6183
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-10 18:05:39 +00:00
Augustin Cavalier
5292bd2993 ActivityMonitor: Adjust last commit for style. 2023-03-10 10:53:29 -05:00
eblanca
1f40cad263 ActivityMonitor: never show settings window off-screen
Change-Id: Ibfd6eaf0a1b27e085b9e31173452e126a44329ca
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6176
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-10 15:05:29 +00:00
Oscar Lesta
fa39528cf9 AboutSystem: update kernel date from the replicant constructor.
Extracted a _GetKernelDateTime() function, and used that to get the value
for the kernel date/time text, and to update it at replicant's instantiation
time.

Fixes #18149.

Also: changed the _Get*() methods to return BString instead of const char*.

Change-Id: I908fe25f39355b3d46f504bd0d8a5fdef1af67f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6158
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-10 15:03:46 +00:00
Alexander von Gluck IV
c2f017dd25 platform/efi/riscv64: Drop extra SetSatp before jumping into kernel
* arch_enter_kernel does this anyway
* Called here, it causes a hang

Change-Id: I39d1a89d217fd0fbd55e7d91317b9d13b9758960
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6181
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: David Karoly <karolyd577@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
2023-03-10 00:57:31 +00:00
Oscar Lesta
26eb736c44 acpi_thermal: report temps in Celsius on acpi_thermal_read()
Change-Id: I94e52acff35a3bde5094b0e14e08443f0b196e5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6137
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 18:27:17 +00:00
Oscar Lesta
805eb54a62 drivers: remove uninit_hardware() from misc/kdl and misc/test
GCC complained of missing prototype for "uninit_hardware()" and,
as -Werror is enabled for these targets, build was broken for them.

While src/system/kernel/device_manager/legacy_drivers.cpp supports
that hook in legacy drivers binaries:

- no header mentions it.
- these two were the only places in-tree that implemented that hook.
- both were basically no-ops.

Change-Id: Ifb08846351b92a2d0fbbe95db2eee0e424ae5997
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6180
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 18:25:11 +00:00
PulkoMandy
2ab05dc925 docs/develop: a few notes about invalidation, view bitmaps, and overlays
Following some IRC discussions, it seems useful to have this written
down somewhere.

Change-Id: Ic02686948d989bff2fa671a3831ba5aed1515d25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6085
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 12:45:34 +00:00
PulkoMandy
53df6323c8 docs/develop: reorganize app_server documentation
Separate the "interface specification" into multiple individual, shorter
pages. Also update some outdated parts and replace references to
OpenBeOS with Haiku.

Change-Id: I86baa9a78c5f7a8a3c4c7aa3ac2992714afecae6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6084
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2023-03-09 12:45:34 +00:00
David Karoly
b19fa88344 boot/arm64: don't map EFI loader code and data regions
Change-Id: Ic3e83dceb917c84db6baed1f1e4af4a27ece5372
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6177
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2023-03-09 09:39:14 +00:00
David Karoly
e490b6343a kernel/arm64: align interrupt postlude with other architectures
Change-Id: I0a5325f163d2ca99bfdaa35d7addedcfdc16ff9a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6178
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2023-03-07 20:30:31 +00:00
Zach Dykstra
6d9b21e897 filetypes: support setting icons for directories
The FileTypes Tracker add-on allowed dragging-and-dropping an icon to
any open FileTypes information window, but directories were not
supported. Changing the icon for a directory (either directly, or via a
symlink) now works as expected.

Change-Id: I0c435ed789f79897972469f4e238f19789f8df1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6116
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-06 20:59:40 +00:00
PulkoMandy
0c062f469a docs/develop: add some documentation about our Jam usage
Change-Id: I18c1fd3192468a14205bf192b3d1431397d1cc1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6086
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2023-03-04 16:02:36 +00:00
Panagiotis "Ivory" Vasilopoulos
5929c25b71 Installer: Add partition setup instructions
Even if it may seem obvious to experienced users that they have to
click on the 'Set up partitions...' button, this is unfortunately not
always the case. Despite the pop-up that appears if there are no
suitable partitions to install Haiku on, some contradicting
instructions remain on the screen after closing it.

The Installer should also provide some feedback to the user as to
whether they used DriveSetup correctly, instead of inferring it from
the fact that they cannot select any drives after having used
DriveSetup.

For this purpose, the Installer window was made a bit wider.

Change-Id: If561f628e2768a01d85176359f07a187e002f51b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6087
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Tested-by: Automation <automation@haiku-os.org>
Reviewed-by: humdinger <humdingerb@gmail.com>
2023-03-04 15:56:06 +00:00
Autocomitter
593d482258 Update translations from Pootle 2023-03-04 08:17:29 +00:00
Zach Dykstra
45d7047cca mail: open New E-mail query on notification click
Change-Id: Iaf3fd1c5e8bdc537c67a796fe9aecb1451c825b8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6094
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Automation <automation@haiku-os.org>
2023-03-01 19:40:49 +00:00
Augustin Cavalier
338570d8d6 debug_server: Remove duplicate setting of B_FLOATING_ALL_WINDOW_FEEL. 2023-02-28 22:08:47 -05:00
Augustin Cavalier
4f3a8009e1 debug_server: Make crash prompt appear above all other windows.
With B_MODAL_WINDOW, others can be brought in front. But with
B_MODAL_WINDOW_LOOK plus B_FLOATING_ALL_WINDOW_FEEL, it will
retain its current appearance, but always stay on top of all other
windows.

Since debug_server does not have a Deskbar entry, this will prevent
such windows from getting "lost" and then having to minimize all others
in order to find them (or forgetting about them altogether by accident.)
2023-02-28 20:25:15 -05:00
Augustin Cavalier
8a5fc3866a openbsd_wlan: Synchronize net80211 with OpenBSD. 2023-02-28 20:09:12 -05:00
Augustin Cavalier
dd430c69f2 idualwifi7260 & iaxwifi200: Synchronize with OpenBSD. 2023-02-28 20:07:29 -05:00
Augustin Cavalier
b7cc4167b7 tests: Add missing Jam rule for mmap_cut_tests. 2023-02-28 19:36:26 -05:00
Augustin Cavalier
9ed77019b6 tests: Add mmap_cut_tests.
Tests #17556 and #16936. Loosely based on X512's example program.
2023-02-28 19:35:17 -05:00
Augustin Cavalier
bc35a6e445 kernel/vm: Prohibit offset from being < 0 in mmap.
POSIX seems to be silent about whether this is permitted,
but at least FreeBSD explicitly does not allow it.

Fixes #16936.

Change-Id: If6b23410ae88245e706df77d276234f4775654f9
2023-02-28 19:34:30 -05:00
Augustin Cavalier
0ecd7516de Package Kit: Use an object_cache in kernel mode for decompression buffers.
The kernel heap only uses object caches for objects up to size 8192.
Larger allocations have to go through the raw allocator. That can
get pretty expensive.

Adding instrumentation around the malloc/free calls in this function
showed that on my machine, some 596ms during boot were spent on
*malloc/free alone*, all else aside. After this change, we are at
around 110ms, or a >5x improvement. Running an fgrep -R on /system/
after boot increased the cumulative time in memory functions to over
5 seconds, while after this change it is "only" 1170ms.

Honestly, it seems like the object depots should be able to be faster
than that, even if this function is called thousands of times. But that
is a problem for a different investigation.

It would be even faster for every consumer of this data in
packagefs just allocated one set of buffers up front, or at least
for a single "read session", but plumbing that all the way
through the myriad abstractions of the Package Kit will
not be easy, and is left for another time, as well.
2023-02-28 13:49:00 -05:00
Augustin Cavalier
4e51d4b707 packagefs: Use object_cache_delete instead of calling a destructor manually.
No functional change.
2023-02-28 13:48:53 -05:00
Panagiotis "Ivory" Vasilopoulos
be7386be30 Installer: factorize _SetStatusMessage() calls in _UpdateControls()
Change-Id: I34306c8c13bff0d8d3e7e8841c552fd05fa11d41
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6083
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2023-02-28 15:33:51 +00:00
Augustin Cavalier
ded3731e44 netfs: Include bsd/features.h.
Fixes the build.
2023-02-28 09:49:45 -05:00
Augustin Cavalier
552ac089cf nfs & websearchfs: Drop unused fsproto.h.
Also remove #ifdefs for BeOS.
2023-02-28 09:46:23 -05:00
Augustin Cavalier
79bc16ba6e Rewrite <netdb.h> and drop a lot of non-standard stuff.
While the BSDs and glibc seem to have various _r functions,
they all return int for errors instead of a pointer, making ours
exactly backwards of theirs for error reporting and thus useless.
So, remove them from the header entirely. They are left in
for ABI backwards compatibility for the time being.

A few constants not used by anything in the tree (i.e. not actually
implemented by libnetwork/netresolv) were also dropped. Some deprecated
or non-standard functions were placed behind _DEFAULT_SOURCE or deleted
entirely.

The header itself is now organized approximately as the BSDs do,
although with various Haiku-isms instead of BSD-isms where appropriate.
2023-02-27 22:51:17 -05:00
Augustin Cavalier
9ae547b297 data/network: Use ports & services files from OpenBSD.
This cuts out a lot of unnecessary protocol entires found in the
longer NetBSD (and originally from ISC) lists. This data is used
in the implementation of getservent(), etc.
2023-02-27 22:01:12 -05:00
Augustin Cavalier
6d36f6bfad netdb: Drop definitions for getipnodeby...
We do not actually export them, or even have source for them in-tree.
2023-02-27 21:11:49 -05:00