Commit Graph
67895 Commits
Author SHA1 Message Date
John Scipione b515400884 BButton: Document AdoptSystemColors() and HasSystemColors() in the Haiku Book.
Change-Id: Ibe72cc796738e90beee9388eaba95342ab48640d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8898
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-30 14:57:07 +00:00
John Scipione 15c87be3ea ColorListView: Handle color dropped on unselected
Remove shared message handling from ColorListView,
you are expected to implement this yourself and these
message constants were not actually being used by
the message target.

Do color drop handling in Appearance and Terminal.
Handle all color drops in WasDropped().

Allow current selection to remain, only update color.
TODO Changing selection on external drops should be
fixed in BListView. Work-around in BColorListView.

Fixes #19562

Change-Id: Ic99bbb1288fd736778eac831d38e453122815abc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9296
Reviewed-by: John Scipione <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-30 14:56:42 +00:00
John Scipione 0d91cd6464 Tracker: Add Paste item to volume window context menu
Change-Id: Iaa8b992011510364cf1eb9a3f0e6a6e749eefe5f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8955
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
2025-06-30 14:55:52 +00:00
John Scipione 76f3ceaadc Deskbar: Reduce window height by 1 in mini-mode
Adjust tray icons and clock to fit accordingly. Leaf menu height is
reduced by 1 in vertical mode to match.

This makes the overlap of maximized windows and Deskbar less noticeable,
especially in horizontal mini-mode.

Fixes #16231

Change-Id: I622d008ee093e018ebcb46e3c45647577f46184f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8833
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2025-06-30 14:54:49 +00:00
Augustin Cavalier 83aa27ada6 netinet/in.h: Add IP_DONTFRAG socket option, and implement for IPv4.
To allow consumers to cause the "don't fragment" bit to be set in
all IPv4 packet headers.

There is no standard way of doing this, and different OSes expose
this option in different ways. Linux has "IP_MTU_DISCOVER", but it
takes an enum, not a boolean. NetBSD and OpenBSD appear to have
no socket option, instead they have "IP_MTUDISC", an option for
the "ip_output()" kernel-level network stack method.

"IP_DONTFRAG" sockopt originates on FreeBSD, and it seems macOS now
also supports it in version 11+. Windows has "IP_DONTFRAGMENT",
which, at a glance, appears to do the same thing. So this looks
like the one that makes the most sense to adopt.

This doesn't add any code to process MTU changes yet, though.

Change-Id: I492d22dbd0ee5f4ab35c600396ad3d3ec9f4f200
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9401
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-06-28 17:22:47 +00:00
Augustin Cavalier d31febdefa ICMP: Pass FRAGMENTATION_NEEDED and REDIRECT info up the stack.
Using the new net_error_data parameter to error_received.
Move the "update routing table" TODO into the IPv4 module,
since the ICMP module doesn't deal with the routing table
at all, while the IPv4 module already does.

Also add a missing endian swap in ICMP error_reply.

Change-Id: I1135eaa442f515d656143c76ab130be19cdcbaf2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9400
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-28 17:22:47 +00:00
Augustin Cavalier f9a86ebeab network: Add net_error_data parameter to error_received.
Same structure as used for error_reply, to contain information
(like path MTU or redirect gateway) from the original error packet,
so that upper layers don't have to re-parse it.

Nothing uses or passes it around at present, but it will be used
in the next commits.

Change-Id: I38a3dec5506bdcb77a7850294082db7be74dd80f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9399
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-06-28 17:22:47 +00:00
Augustin Cavalier 4cf1bb8619 netinet/in.h: Cleanup.
* POSIX also specifies in6 availability in in.h, not just RFCs.

 * Drop IPPORT_USERRESERVED. It's in RFC 1700, but FreeBSD and musl
   do not define it, and OpenBSD and NetBSD disagree on its value
   (the RFC says 5000, while OpenBSD used this "49151" starting
   in 1998.)

 * Organize the remainder with clear indications of what RFC defined them
   (if indeed they were specified in an RFC.)

 * Drop "helpful macros"; they're guarded by _KERNEL on OpenBSD.

Change-Id: Ia20be56398130ee22d70b38ee25a3f609b567c3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9398
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-06-28 17:22:47 +00:00
Augustin Cavalier eb8651d492 IPv4: IP_HDRINCL may need a checksum.
IP_HDRINCL isn't POSIX. The FreeBSD manual page for it doesn't specify,
but the Linux manual page indicates it will compute the checksum.
traceroute seems to depend on it doing so.

Significantly improves the situation in #3210.
2025-06-26 11:46:43 -04:00
Jérôme Duval 334de37d58 udp: empty address is different from uninitialized address
* instead teach getpeername that family is to be checked.
* fix #19652

Change-Id: I0e2150820687ca08e339adaf111918adc83b9e6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9397
Reviewed-by: waddlesplash <[email protected]>
2025-06-26 15:09:13 +00:00
Jim906 3738985e2c fat: Fix error handling in buffer IO functions
* Have bread() output a NULL *bpp when returning an error (consistent
  with FreeBSD).

* Enable brelse() to handle a NULL argument (consistent with FreeBSD).

* Ensure that when getblkx() returns an error, no clean-up remains to
  be done by bread() or getblk().

* Let allocate_data() set buf::b_owned, and set it only if successful
  in allocating, so the flag won't be misleading to put_buf() after a
  failure.

* Revise vput() to avoid situations when, after an error, it might
  call put_vnode() before the node is published to the VFS.

Change-Id: I42cc1684fe5b68333284b149e72a794c93ac71ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9393
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-26 14:44:39 +00:00
Jérôme Duval 2b9fdf7847 ipv4: empty address should be a zero sa_len
UdpDomainSupport::ConnectEndpoint() uses SetToEmpty() to unconnect when used
with AF_UNSPEC.
checked against the output of the test sortix/os-test/udp/connect-unconnect-getpeername
Change-Id: Iccfa46399a0e14057459966a2f406469566bcbac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9396
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-26 05:43:59 +00:00
Jérôme Duval 48e3aa8081 kernel/socket: allow sendto to an empty address
should return EDESTADDRREQ for UDP
checked against the output of the test sortix/os-test/udp/sendto-null

Change-Id: I3bc61e0cc9d75319d61f0395f1ae45d28171bfef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9395
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-26 05:43:59 +00:00
Jérôme Duval 74be257edf udp: send should return the error on the last send packet
checked against the output of the test sortix/os-test/udp/connect-send-error-send
* icmp: add more error codes

Change-Id: I7b1695d37cf5eae8cd09132047404b990f8791dd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9394
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-26 05:43:59 +00:00
scphandAugustin Cavalier f8e01ad15c app_server: Render cursors from vector icons based on the font size.
* Cursor bitmaps are now generated at runtime from vectors
   embedded in CursorData.cpp (replacing the old bitmaps).
   There is still a fallback bitmap pointer in case generation fails.
   All cursors should scale correctly, and hotspots are accounted for.

 * The Pointer vector in data/artwork/cursors was very slightly tweaked
   to look better at larger sizes - the white edge at the bottom was made
   rounder.

 * The new dynamically-generated cursor looks close to the old one,
   unless you're zoomed in and comparing them pixel-by-pixel.

 * The cursor shadow is generated with a gaussian blur to create a
   similar look to the old shadow, which was created in an image editor.

Fixes #13171.

Co-authored-by: Augustin Cavalier <[email protected]>
Change-Id: Ifa881619354a42bc60d2b5c1d0443e8addf6e0f5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5200
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-26 01:19:41 +00:00
Jérôme Duval f2a0f2a3e0 udp: implement shutdown()
instead of returning B_NOT_SUPPORTED.
* this fixes a few tests of sortix/os-test/udp.

Change-Id: I961e71cc419ce7ab38419749a42df8737e272c83
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9392
Reviewed-by: waddlesplash <[email protected]>
2025-06-25 13:24:25 +00:00
Augustin Cavalier 8e86be8509 libbe_build: Synchronize BBitmap implementation with the main one.
BView-related code removed or disabled, of course, but this now uses
the ColorConversions class, and adds some more ImportBits APIs from that.

Change-Id: I805cef159bac52173ef16030eae69e83db6f061b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9391
Reviewed-by: waddlesplash <[email protected]>
2025-06-24 22:47:45 +00:00
Augustin Cavalier 1ad882a7ec BToolBar: Use MENU_BACKGROUND color, and leave buttons with default.
Toolbars go with menu bars, and so to blend in better with them,
should use the same colors. (Under the default color schemes,
the menu bar and panel colors are the same, so this makes no
visible difference there.)

Added a TODO for button colors as we may want to do something different
for that, it also makes no difference with the default scheme, but
for non-default schemes may matter.

Improves #19629.
2025-06-24 14:48:30 -04:00
Niklas Poslovski 92261f367f Printers: Make icons scale for HiDPI
Fixes #17985

Change-Id: I867bb9c95f6421bf056845a2686789341c8aa7d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9376
Reviewed-by: waddlesplash <[email protected]>
2025-06-24 18:41:40 +00:00
Jérôme Duval 3aaa4c9d96 udp: a second bind on broadcast address should error with EADDRNOTAVAIL
Testcase: https://gitlab.com/sortix/os-test/-/blob/master/udp/bind-conflict-loopback-broadcast.c

Change-Id: I37c6d05910c3d9573610207b650f1957bccd1e47
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9390
Reviewed-by: waddlesplash <[email protected]>
2025-06-24 17:33:06 +00:00
Jérôme Duval 090519cfe5 network/stack: socket_accept: return B_NOT_SUPPORTED for non-stream sockets
Testcase: https://gitlab.com/sortix/os-test/-/blob/master/udp/accept.c

Change-Id: I9020292facb47339ede31a8d1c49d197e40d6ca9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9389
Reviewed-by: waddlesplash <[email protected]>
2025-06-24 17:33:06 +00:00
PawanYr 1e4ba4883f App Server: Don't set workspace in Desktop::MoveWindowBy
This fixes a bug that's been annoying me - when I use Workspaces to
move a terminal that's scrolling/moving on another workspace, the
terminal begins drawing into the current workspace; this also happens with
some other apps, like Qemu. I tracked this down to Desktop::MoveWindowBy,
where we update an invisible window's current workspace to the one it's
being moved on. Trouble is, the current workspace is set to -1 for windows
on another workspace, and IsVisible just returns whether the current
workspace is >=0, so doing this causes IsVisible to return true when it
shouldn't.

This patch replaces that call with one that sets a separate
invisible workspace member variable, which preserves all window moving
functionality without improperly setting a window as visible. It also fixes a
minor graphical glitch when moving off-workspace tiled windows.

Fixes #6722

Change-Id: I2c4f04602caed85bf08391d0ea99e4dc74c1e1d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9256
Reviewed-by: waddlesplash <[email protected]>
2025-06-23 19:58:39 +00:00
nipos 349b6d2d2a Expander: Improve HiDPI scaling and avoid cutting off the window
Fixes #17905

Change-Id: Ia6790a2ebe5e6cdfdc88365f39c46ad9412541ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9388
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-23 19:52:23 +00:00
Augustin Cavalier 5cfaa09f1f iprowifi3945: Replace with the OpenBSD driver.
According to the comments on #19588, this seems to be more reliable than
the driver variants from FreeBSD or elsewhere.

Change-Id: Icdc24683de3f588f51c4c08529aa6cab3a09c7fd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9311
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-23 19:50:07 +00:00
Augustin CavalierandPascal Abresch 91bed92e07 Interface: Rework and use B_CONTROL_BACKGROUND_COLOR for controls.
Presently, the control color is heavily tinted almost everywere
it's used, making it difficult to set from Appearance preferences,
and making the default theme not look so good in "dark mode."

After this patch, the defaults are changed to something much closer
to the actual final color used in buttons and scrollbars, and the tints
thus heavily reduced as a result.

B_CONTROL_BACKGROUND_COLOR wasn't present on BeOS, so it should
be safe to change its default. Some logic is added to app_server to
automatically migrate to the new color if the old default is present.

(This is based on nephele's initial patch, but significantly reworked
so that existing installs are upgraded as seamlessly as possible,
with few or very minor visual differences.)

Co-authored-by: Pascal Abresch <[email protected]>
Change-Id: Ida9fbaa61df9aeb89a9daf59cd9901a34737d5f9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8878
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-23 19:46:26 +00:00
Autocomitter 2a349a0a41 Update translations from Pootle 2025-06-21 08:08:21 +00:00
Jérôme Duval 3ef89f758f network/stack: socket() can error with EPROTOTYPE/EPROTONOSUPPORT
as POSIX requires.

Change-Id: Iee15bd3db6283a52ac5bc68be99752f36e12f1ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9384
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-20 22:26:35 +00:00
Jérôme Duval 0b97e6ab9a tcp: don't notify EPIPE/ENOTCONN when no connect or listen happened
Change-Id: I18bf8ceee7963729c5037e39fc1c23f243eba0bb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9380
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-20 11:55:44 +00:00
Jim906 45037be110 nfs4: zero out possible garbage values
* When a file hole is created, zero the start of the page where the
  hole ends.

In my test setup at least, the server takes care of zeroing any full
pages in the hole created when a write begins at a position after the
existing EOF. Since the file cache page where the write starts will be
written back to the server, we just need to partially zero that page.

This change allows the driver to pass the 'holey file' test in the
nfs connectathon test suite.

Change-Id: I5a0d52af5cce4fb9e2d9f928f45fd0adcfa23627
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9381
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-20 09:06:43 +00:00
Jérôme Duval 0847894277 tests/storage: reorder tests
Change-Id: Ic57c14c8124778b01357ef1afe6c7de7ad7aca8c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9383
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-19 15:51:33 +00:00
Augustin Cavalier 01240fc9dc DebugAnalyzer: Fix build after changes to BObjectList API. 2025-06-18 16:43:24 -04:00
Augustin Cavalier 1d810c307f tests/kernel: Add floating-point exceptions test.
Tests #18624 and related issues.
2025-06-18 16:22:21 -04:00
Jérôme Duval 914d5aea44 kernel/events: event_queue shouldn't be kept after fork()
_user_event_queue_wait(): when no timeout is passed, it means infinite timeout

Change-Id: Ic064551251413da8f4788f91d92c13c40201548a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9379
Reviewed-by: waddlesplash <[email protected]>
2025-06-18 17:06:19 +00:00
Augustin Cavalier 265302aefe BStatusBar: Fix handling of B_COLORS_UPDATED.
It didn't check if the message actually contained the status bar
color, and if it didn't, we'd wind up with a black color instead.
2025-06-17 20:51:30 -04:00
Augustin Cavalier 8de71284ed HaikuControlLook: De-convolute edge color computation.
Previously it used "contrast" and "brightness" values that were
computed in strange ways. Now it behaves more like the other
color computation functions and deals with the "flags" directly.

Comparing many controls, colors on button frames in all states appear
to be the same (or nearly the same, within 1-2 RGB values) before
and after this change.


Change-Id: Ia6d696c29fc76c73c88cc97af97ea45e1ff089ff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9321
Reviewed-by: waddlesplash <[email protected]>
2025-06-17 23:00:59 +00:00
Jérôme Duval 0b9af29d07 kernel/socket: shutdown() now checks argument how
Change-Id: I1d3c7b1e07588f712da094c1872cb63635e4eeee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9378
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-17 22:33:08 +00:00
Oscar Lesta e19042c642 pkgman: add an option to not refresh the repo caches on install.
Fixes #13161

Change-Id: I69b307cf8497d411d83f7065b9356159740f7d2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9337
Reviewed-by: Adrien Destugues <[email protected]>
2025-06-16 19:44:36 +00:00
Michael Brumbelow a2027cd5dd Cleaned up unused variables in glibc fileops code.
Change-Id: Ia97c900bac58e5da542f1ca4c8501a2ffb2e7008
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5674
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-06-16 19:23:25 +00:00
Humdinger 7d07c4bc73 Added Norwegian translation credits to AboutSystem
* Uncomment the Norwegian credits
* Added Johan Wagenheim to translation credits

Change-Id: I0016161fd8608da6bec9ed400b845deba64ed512
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9342
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2025-06-14 14:03:07 +00:00
Autocomitter 66af8458a3 Update translations from Pootle 2025-06-14 08:14:14 +00:00
Augustin Cavalier e6fc1b2484 openbsd_network: Add a method needed by the OpenBSD variant of the "wpi" driver.
Change-Id: I4385e8e527b6310b1002f0dc60b7a21e0c58e2f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9310
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-11 11:03:20 +00:00
Pascal Abresch f5049f8367 configure: use command -v instead of which
command -v is specified by posix, which is not

Change-Id: I2716ab2a0577882da952d94bf2a499b06b14f22a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9327
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2025-06-11 10:56:20 +00:00
Máximo Castañeda 86caaf1c50 UserBootscript: avoid opening nonexistent files
Fixes: #19612
Change-Id: I6fe210e087adbd094cbfb5625d54fbe958f72473
2025-06-11 12:48:09 +02:00
PulkoMandy 26bedc8f4e sparc: move kernel to a lower address
The openboot mmu code does not like addresses above 4GB, so load the
kernel to a lower address. It doesn't really matter anyway, because on
sparc the kernel normally lives in a separate address space and uses
special instructions to access userland memory.

See #19597 for details, further changes will be needed here.

Change-Id: Iac6901f275667efef5e64d059daf4c96032a7baf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3573
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-11 06:40:13 +00:00
Jérôme Duval 5ac839cb94 kernel/fs: vnode_path_to_vnode(): check directory on trailing slash
fix #14352

Change-Id: I2fb7f0f455f46f0b5b2fe0eb487896f41b33a44b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9335
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-10 16:00:13 +00:00
Jérôme Duval 23f923bcaf libbsd: add closefrom() and close_range()
Change-Id: I9c88948d6c4d5a32e3aa06cd696e2ce24c2d298f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9334
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-09 16:26:13 +00:00
Jérôme Duval 396ebbc16f POSIX-2024: support for MSG_CMSG_CLOEXEC and MSG_CMSG_CLOFORK
Change-Id: I55551860fb7dac5d0c11a6d4201502fff9ab2d13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9332
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2025-06-09 16:26:13 +00:00
Jérôme Duval 904fd2abf0 POSIX-2024: support for O_CLOFORK, SO_CLOFORK
Change-Id: I4f3a961947eefdeafd5a249499899cc92d67c2d1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9330
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-09 16:26:13 +00:00
Humdinger ba28b6f5f7 Mail: Avoid duplicate Person items
Duplicates can arise if e.g. you have backup of your contacts mounted.
Or, imagine someone packages a Person file with their software as it
was common back in the BeOS days. If you have several software packages
from that dev, you'll see copies of that Person file from each package.

If a contact has the same name, we compare all email addresses. If they
differ, a new item is created. That way, Person files with more than
one email attribute ("META:email{n}" with n >= 2), as used by other apps
like Peeps!, get an item per address.

When checking for email addresses in AddPersonAddresses(), don't quit
looking through the attributes when encountering an empty one via "break".
Do "continue" with the next "META:email{n}" attribute, as it's possible
META:email2 is empty, but META:email3 has an address.

Change-Id: I644cfa2d8349b5022ffde37344c55a54577b12f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9331
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-09 16:25:12 +00:00
Humdinger 1ebc7b923c Mail: Avoid showing contacts' empty addresses
Other contacts apps like Peeps! allow for more than one email
addresses, using the attributes META:email{n} with n >=2.
Only, not all contacts having those additional attributes have
them actually filled.

This results duplicate entries in e.g. the To-field pop-up with
no email address attached.

We now only add an item if its email address isn't empty for those
additional email attributes as well.

Change-Id: Icb1750fe8e2b10280bc01b3181b444f01096e021
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9329
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2025-06-07 13:19:05 +00:00