Commit Graph
100 Commits
Author SHA1 Message Date
PulkoMandy 0ea56347bd Update to OpenSSL 3.
- Rename the package in Jamfiles as appropriate (but don't rename the
  build feature)

- Remove libnetapi SSL class (not needed anymore, OpenSSL now knows how
  to use pthread functions directly and seed its random generator)

- Rename or remove a few other deprecated functions

Change-Id: I624833923e113a8235932d7ce8020bf27c6e2ea6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7717
2024-08-09 22:49:51 -04:00
PulkoMandy b9ec4108cc PCI ECAM: fix boundary check
The previous code (introduced in hrev57034) was correct for most accesses, but
would reject access to the last word of the configuration space using 8 or 16 bit
access.

May help with #18536

Change-Id: I3eecbdb187eca0ec57e0ce65e4d1eb0d7c43d00a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7929
Reviewed-by: waddlesplash <[email protected]>
2024-08-05 16:21:20 +00:00
PulkoMandy 2d24dd2184 Synchronize PowerPC HaikuPortsCross repo definition with actual repository state 2024-07-20 23:30:04 +02:00
PulkoMandy 9d09763865 Create source packages during bootstrap
This used to be the default in haikuporter, but it isn't anymore. This
resulted in source packages (which are needed for bootstrap) not being
generated.
2024-07-20 23:27:50 +02:00
PulkoMandy ee658d503b Tracker Kit: fix TitledSeparatorItem size
This menu item has extra decorations around the label, that need the
menu to be a bit wider than just what would be needed to fit the string.
Otherwise, the string can be truncated.

The problem is not visible in the current usage in Tracker (in open
panel favorite menu) because other items force the menu to be wide
enough. However, I tried to reuse this code in another app and hit this
problem.

Change-Id: If5d2475c22d9943e26b45c415fcd6e4df3d5fc4c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7834
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-07-09 19:08:55 +00:00
PulkoMandy a85ea80f68 Fix adding Gutenprint to regular image
This was missed in the update to Gutenprint 9.

Change-Id: Ie372a38d557e8f1506b27294b3d6699bb30f7fc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7716
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-06-26 01:54:07 +00:00
PulkoMandy 7d5b913b51 BCatalog: declare GetString as format_printf function
This tells the compiler that this function takes a format string as a
parameter, and returns a "similar" string with the same formatting
operations. This allows the format string to "propagate" to prinf-file
functions (including BString::SetToFormat) and the format string to be
actually checked with the arguments passed to that function.

Without this, all translated strings were not checked to match with
their arguments.

Change-Id: I5c3c5cbfe7dfede9a6f45cad47a7524f9138fac0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7663
Reviewed-by: Adrien Destugues <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-05-03 16:38:23 +00:00
PulkoMandy 7eab6b486e Fix printf format warnings in B_TRANSLATE strings
Previously these were not checked by the compiler due to a missing
function attribute.

Unfortunately, for the translation macros to work, the translated string
must be identical in all architectures (otherwise, we would need
different translations and different catalogs for each). This means the
B_PRI* macros can't be used, and instead the parameters must be in one
of the types handled directly by printf. Change the variables types
directly where it was easily possible, and otherwise, use a cast.

Change-Id: Ib77a7e378b7c508f6e7a015bbe3cbb4c2c096bfa
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7665
Reviewed-by: waddlesplash <[email protected]>
2024-05-03 16:38:23 +00:00
PulkoMandy c9810ca22a GLife: more style fixes
Change-Id: I16eecf18736058329c5a073d9b569f2a4d5941d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7664
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-05-03 16:38:23 +00:00
PulkoMandy bee419ebd8 GLife: fix string formatting macros
Change-Id: I6c7cff8b0b283d5ef1b32d1ecdb0c54fd614d98d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7662
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-05-03 16:38:23 +00:00
PulkoMandy a6a90f5b7e GLife: fix line endings
Change-Id: I4a52783deb0c0a7e9ac686ab6ca612710a7a3399
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7661
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-05-03 16:38:23 +00:00
PulkoMandy 5ea01a50c2 cmedia: enable -Werror
Errors are now enabled for all audio drivers.

Change-Id: Ia4e986f0ed8965376c3bbefc3d9f04bcd68ad561
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7621
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alexander von Gluck <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy 99351a72d3 sb16: enable -Werror
Change-Id: I990362cd764e3a219e5022a62264b76be4cdf80c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7620
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alexander von Gluck <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy 98afcfa72a geode audio: fix almost all warnings, enable -Werror
The compiler complains about implicit declaration of free and calloc
despite stdlib.h being included. I think it's because of -ffreestanding
being used on the command line?

Change-Id: I57c3899e5034d1c2ee9cb6c1ed4c92aa818b53ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7619
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alexander von Gluck <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy e7e9e58fbd emuxki: use shared util.c instead of a separate copy
Change-Id: I1ba248d442e558565e41472a6daab279ee8ee8af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7618
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alexander von Gluck <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy d3503944f0 echo: actually fix warnings and enable -Werror
The driver Jamfile had a "-w" added to the compiler command line to
disable all warnings.

Use the generic util.c/h instead of having a separate copy.

Change-Id: I74e325850d573e75d652658748426c9ae353c6e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7617
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alexander von Gluck <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy beb5d39776 audio drivers: move util.{c,h} to generic directory
Change-Id: Ied0afa5ad9f66ee6f2249715d66fb62e6206d137
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7607
Reviewed-by: Alexander von Gluck <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy 8a3e82a04d ich, ichaudio: remove
These have never been included in the Haiku build as far as I can see.
All the soundcards they support are already handled in the auich dirver.
All the IDE driver that ichaudio claims to support, I'm not sure why they
are in an audio driver.

One of them was written for BeOS and never updated for Haiku
multi_audio, and the other was apparently some experiment that didn't
get anywhere in the end. To avoid confusion, let's keep only one driver.

Change-Id: I5bf48e7dd2c5340e84a1ab4eb3e3b079103b7988
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7604
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy f5e5891bbb es1370: enable -Werror
- use shared (updated) util.c for memory allocation
- disable functions that are currently not used (ac97 suopport)

Untested, I don't have the hardware.

Change-Id: I9c406e46af94dfc213cfa258c5f375da3c0c719d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7603
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Alexander von Gluck <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy d6e543c388 emuxki: enable Werror
Change-Id: I6ed7bfbe157bee86a8ce1dabc5829b8825e43f99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7609
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy fe640d9339 pcmcia: fix compilation warnings and errors
Needed for the echo indigo soundcard driver build.

IRQ is used as a field name in pmcia/cs.h. The IRQ() macro should only
be used with parameters. So we can avoid the use of IRQ in cs.h being
accidentally replaced by the macro.

Change-Id: Ib10f3c5148cfb7c87a0b258a95a590778b6e5cb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7608
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-04-15 16:02:49 +00:00
PulkoMandy 57ad6e6f34 BFilePanel: fix items from favorites menu not working
Regression from hrev57294.

The code introduced there relies on the state of the "open" button being
updated from a previous selection in the file panel. But that is no the
case if the B_REFS_RECEIVED message does not come from the file panel
(in this case it comes directly from the favorites menu).

Fixes #18627.

Change-Id: Ic12b1989a4fbd631ce048aa6286d4d7c60ab1d99
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7577
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-04-02 19:44:53 +00:00
PulkoMandy 1f09e28c68 ffmpeg: enable multi-threaded decoding
Fixes #18874.

Change-Id: I24c74080fcc8280796af64624e0cdbf96cd57dc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7586
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-04-02 18:55:22 +00:00
PulkoMandy b0674032b5 AVCodecDecoder: remove legacy ffmpeg support
Change-Id: I103ab2d7063dca33f2ef9c04202dd1699f871196
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7564
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-04-02 14:58:48 +00:00
PulkoMandy 3281146c1f ffmpeg: implement equivalent of avcodec_guess_frame_rate
The frame rate in the codec context isn't always a frame frate in the
video sense. It may be a smaller time unit used as a base for the frame
presentation timestamps.

I did not initially notice this because we set it to a default value
from the AVFormat passed input encoded_video format, but it is erased
after reading the first frame.

Fixes #18797.

Change-Id: I6157ae9942f6d5ca32aad7bac012df0822659a21
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7563
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-04-02 14:58:48 +00:00
PulkoMandy 43f35014f0 AVCodecDecoder: fix build with tracing enabled
Change-Id: Id1f79faf218a589d68c81258e4a88ee2d3b001be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7562
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-04-02 11:14:23 +00:00
PulkoMandy b140858b8c ioapic: more useful logging
Back when this log was introduced, it could not be tested because no
hardware hitting that limit was known. Now there is some.

Add the actual number of IOAPIC redirection entries to the log, so we
can know how many redirection entries we need, and also add a missing
newline.

Change-Id: I00fa0c21628fc336c364cd975dd48801add75302
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7579
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-04-01 20:38:50 +00:00
PulkoMandy 723c4270dd es1370: initialize the log only if the hardware is detected
Otherwise the logfile always exists on all Haiku installs. There is
nothing useful logged to it if no hardware is found.

Change-Id: I290cb0ac070256dbd2647d5fe36ab71f825600e8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7578
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-04-01 20:38:30 +00:00
PulkoMandy 5c6e17e773 PCI: try harder to fixup broken resource ranges in ACPI tables
Try to handle two cases mentionned here: https://github.com/xCuri0/ReBarUEFI/wiki/DSDT-Patching

- Min/Max/Length/Gran are all zero, but no resource tag (ignore the range)
- Length is larger than Min/Max window (recompute the length)

Should fix #18454

Change-Id: I536dc06fcfbfc9aacf5eb6b9563cf03f9d09178a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7581
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2024-04-01 20:37:55 +00:00
PulkoMandy 48cd211d71 usb_hid: add quirk to enable 6th button on Elecom M-XT4DR trackball
Linux implementation: https://www.spinics.net/lists/kernel/msg2665216.html

In our case it is not possible to read the original descriptor from
quirk handlers, so, I had to hardcode it all. The descriptor is the same
as the original one with just 3 bytes changed (detailed in comments).

Other Elecom hardware requires similar quirks, but can have different
number of buttons, so I did not add it for now.

Change-Id: Ie24c8535f3b4535eb414a4e35a62696ea1f9056d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7580
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-03-31 18:22:39 +00:00
PulkoMandy c98ea724b9 WebPositive: allow to select "full and half fixed" monospace fonts
The same fix was done some time ago in Appearance preferences, but the
version in WebPositive had not been updated.

Allows to select the current version of Noto Sans Mono as the monospace font.

Change-Id: I829f80cab3ea224c9963147cc333877edafdeebe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7576
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
2024-03-31 16:07:20 +00:00
PulkoMandy 5b5c8f7d41 ffmpeg: update to ffmpeg 6
Partial change, for testing on x86_64. You need to build with
-sHAIKU_NO_DOWNLOADS=1 and manually provide the needed packages in
generated/downloads.

Confirmed working on x86_64. Other platforms will need similar updates.

Change-Id: I81ca4b1d81bd18e64f50250970e00e0a072072d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7278
Reviewed-by: Alex von Gluck IV <[email protected]>
2024-03-26 21:44:17 +00:00
PulkoMandy 0e703d1f1e vfs: log in syslog which inode is preventing an unmount
This may be somewhat helpful to investigate problems when unmounting
fails.

Change-Id: I72b70a34ca43697f22a13db6aff342abce38cd78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7501
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Rene Gollent <[email protected]>
2024-03-05 11:49:21 +00:00
PulkoMandy 35718d84c3 ffmpeg: Fix build with tracing enabled
Change-Id: I72cf1ce895baf3380568fbb0f0e8a92e79c5a53b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7500
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
2024-03-04 15:33:35 +00:00
PulkoMandy 7845db65a2 Remove wqy_microhei font from Haiku release images
It has been replaced by Noto as the default font for CJK characters and
is not referenced anywhere else anymore.

Change-Id: I9eb706531deb44395d71e0a04b0ec5e2f2dea230
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7499
Reviewed-by: nephele nephele <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-03-04 15:33:35 +00:00
PulkoMandy 8cc8ec9ef9 BSpinner: do not redefine fValue
BSpinner had its own fValue defined instead of using the one from
BControl. This results in the be:value in the message sent when the
control is invoked to always be 0.

Change-Id: I1cff5f30adbf5b1dede57a14377cd4e1db7a30d3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7428
Reviewed-by: waddlesplash <[email protected]>
2024-02-27 15:47:10 +00:00
PulkoMandy 2a2e7ad562 doc/user: mention libnetwork and a bit of the filesystem hierarchy
Based on the feedback from Maya Posch in https://mayaposch.wordpress.com/2024/01/20/porting-nymphcast-to-the-haiku-operating-system/
Thanks for noting that the information was missing!

Change-Id: I4a9f709b17cb3a4a771f167b5af0fc83843ec5ad
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7406
Reviewed-by: Niels Sascha Reedijk <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-02-20 12:14:51 +00:00
PulkoMandy 7804ba6054 ffmpeg: use new AVFifo API
Change-Id: I5712acc78087c00d066695eab6b2625316153f41
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7277
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2024-02-09 13:08:40 +00:00
PulkoMandy 1774dd5ee9 ffmpeg: channels and channel_layout are deprecated
Use ch_layout instead

Change-Id: I6a07870eae42836d3fd993c253613bc0f33b1598
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7252
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2024-02-09 13:08:40 +00:00
PulkoMandy a4ae49d573 Package server: turn down logging a bit.
This prints two quite long lists of packages that are mixed up with
other logs, making them annoying to read. It is also not very useful now
that the package server is working quite reliably.

Change-Id: Ibf9d5fc3eadc5cef42a78aea831e0a035e248de3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7366
Reviewed-by: waddlesplash <[email protected]>
2024-02-01 21:31:29 +00:00
PulkoMandy e96dd82392 Screen preferences: some ui fixes
- When there is no refresh rate info available, disable the menu rather
  than showing "nan Hz"
- Rework the screen info tooltip generation, to avoid a confusing %s
  that was mistakenly moved to the end of the string in the French
  translation.

Change-Id: I4c29863a30c8c761021be57f8a2e2010709b16d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7364
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2024-02-01 21:19:19 +00:00
PulkoMandy 0199d1f39b ffmpeg: remove interlaced_frame
Change-Id: I870bea36c6180e46ae3d63fe407126606bdda3c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7254
Reviewed-by: Adrien Destugues <[email protected]>
2024-01-28 16:14:21 +00:00
PulkoMandy 6dd4427158 ffmpeg: use accessors for AVStream indexes
The fields are not publicly exposed directly anymore

Change-Id: I39348116378c11fd3a1c4f08756b5a31f54b8781
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7255
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
2024-01-28 16:13:13 +00:00
PulkoMandy 1978089f7c API docs: document menu reordering functions
Change-Id: Ic1a914af343aa713cfb7edc813c6a6458cb5027f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7357
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2024-01-28 16:12:09 +00:00
PulkoMandy 67380402ab BMenu: use std::stable_sort to implement SortItems
This fixes two problems:

- Use of a stable sorting algorithm makes sure that the relative
  position between items that compare equal are not modified
- More importantly, the compare function in BList passes a
  pointer-to-pointer (in this case a BMenuItem**) and this was masked by
  the casts due to BList lack of type safety. So, BMenu::SortItems was
  not working at all when trying to use it as its prototype would imply.

NetworkStatus and Network preferences worked around this by doing the
extra dereferencing in their compare functions. I did not find any
other places in Haiku where this function is used (it was introduced
specifically for this in hrev55562). All 3rd party code that had a
similar workaround will have to be fixed to remove it (if there is
anything using that function).

Change-Id: Ia78fd1363f2c012f6eff6f9a47e8b3aac2752ebd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7356
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2024-01-28 16:12:09 +00:00
PulkoMandy 8e4a60d3f1 PCI: handle "non fixed" addresses
If the max address for a PCI bus is not fixed, try to compute it from
the minimum and length (if available).

Change-Id: I23d87da32779d22324f944b5b359390f523ec7a7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7111
Reviewed-by: waddlesplash <[email protected]>
2024-01-15 18:44:39 +00:00
PulkoMandy 2f719499aa ffmpeg: update dump_ffframe_video for ffmpeg6
- coded_picture_number, display_picture_number and key_frame are deprecated
- dump all of the frame flags
- add missing entries in the picture type list

Change-Id: I64f0f20833f9cf3f31f77b26b464b36f68a67998
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7251
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2024-01-03 02:14:17 +00:00
PulkoMandy c020b0832c ffmpeg: remove unused and broken video framerate computation
ffmpeg already provides us with a framerate if it is known at the stream
level. If it is not known at this level, the framerate may not be fixed
througout the video, and so the best thing to do is to leave the media
kit field_rate unset, and let applications handle frames according to
their presentation timestamps as they come (this is what we had been
doing anyway, the code to output the framerate to the media kit had been
commented out for a long time and the computed value was not used)

Since ffmpeg removed the ticks_per_frame field [1], the code would not
compile anymore with later ffmpeg versions.

[1] https: //patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/

Change-Id: Icc0988c507965883a1570e46f904ebf235fb71bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7247
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-12-31 20:48:32 +00:00
PulkoMandy da4dbfa47a API docs: document KernelExport.h and overview of synchronization primitives.
Change-Id: Ic3853bf103710f289a32f43f5fb1beb79bca0b9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7245
Reviewed-by: waddlesplash <[email protected]>
2023-12-30 18:33:37 +00:00
PulkoMandy dbe86e4638 regex.h: use _DEFAULT_SOURCE
This file was imported from glibx and uses __USE_GNU as defined by
glibc(s features.h. Our implementation of features.h is simpler, just
defining _DEFAULT_SOURCE directly and that's what we use in other
headers.

As a result, using GNU extensions to regex.h required defining __USE_GNU
directly in applications (for example in TraX).

Fixes #11818

Change-Id: I11e4cf2e88c330cf58083852c4b33aedb8a3a9ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7238
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-30 18:09:57 +00:00
PulkoMandy 4629bc0cc7 ffmpeg: stream cur_dts is not publicly available anymore
Change-Id: I613f110978c5859cf4db05824c0345fbd8a992bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7276
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-12-29 21:06:41 +00:00
PulkoMandy bda0b2b0bb ffmpeg: remove AVCODEC_FLAG/CAP_TRUNCATED
https: //ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285257.html
Change-Id: I61c306a9f040378afbe643a1ab3869cff60c2690
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7253
Reviewed-by: waddlesplash <[email protected]>
2023-12-29 21:06:41 +00:00
PulkoMandy 926289d3b2 ffmpeg: missing const
Change-Id: Id0121958533afde8b226c5e8f6591356d59e3a9e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7250
Reviewed-by: waddlesplash <[email protected]>
2023-12-29 21:06:41 +00:00
PulkoMandy 9bf436a214 ffmpeg: av_init_packet is deprecated
https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=3189

Change-Id: I5ac25141ce76b2f7737e2f1b7ce5c8eac4a90082
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7249
Reviewed-by: waddlesplash <[email protected]>
2023-12-29 21:06:41 +00:00
PulkoMandy 3d6dc09d83 ffmpeg: avcodec_find_decoder returns a const AVCodec*
Change-Id: I03af13cc74f8bee7b82bb6398aadbfc28ce92df9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7248
Reviewed-by: waddlesplash <[email protected]>
2023-12-29 21:06:41 +00:00
PulkoMandy fadf60cd92 ffmpeg: remove unused variable
Change-Id: Icd933dbb45c33ad48f59473b75dbaaf22faba0df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7246
Reviewed-by: waddlesplash <[email protected]>
2023-12-29 21:06:41 +00:00
PulkoMandy 4c07199d82 Add a script to draw a dependency graph from a set of hpkg files
Useful for understanding dependency chains.

Change-Id: I64113ff87fe3cef2f45796b064749e0c6a5bf880
2023-12-28 14:10:30 +01:00
PulkoMandy e92b4d3a27 docs/develop: add sourcetree layout document
Largely based on a_brief_introduction_to_our_source_repository_layout.html
from the website, revised and updated. I will delete the one from the
website and put a redirect to here once this is merged.

Change-Id: I06657bbea4c16df7bff1f2357cffd2ec8a63c65a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7236
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-24 02:56:51 +00:00
PulkoMandy 53f146bc7d launch_server tests: fix gcc2 build
The launch daemon tests consist of two parts: one unit test and one
set of "libbe_test" executables. These share some sources from the
launch daemon source directory, but use different compiler flags.

Due to the way we generate object files, the .o files for both variants
end up overwriting each other since they are generated in the same
directory.

There is also some confusion on compiler flags, since some flags are
applied globally to the directory and confuse one or the other of the
two targets.

To avoid this, move the test binaries to a subdirectory separate from
the unit tests.

Change-Id: I28058abf7a4d4356bc56ef7a67430a277b979532
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6875
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2023-12-18 08:00:33 +00:00
PulkoMandy 15338de99f Update ACPICA to 20230628
Change-Id: I5cbe5fa52bcca13ef8308ae1d2a1b1c19afcfe7e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7142
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-15 15:15:12 +00:00
PulkoMandy 4f9df95dc8 HaikuDepot TextView: add a way to relayout when document changed
When adding new paragraphs or otherwise editing a document from outside
the view, the layout needs to be recomputed and the view invalidated.
Otherwise, the changed text is not shown.

Change-Id: Id3c60d8b510443f71ebbc805b7b7ca5b35220fd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7131
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-11 08:18:44 +00:00
PulkoMandy 6af1381397 HaikuDepot TextView: add support for hyperlinks/clikable areas
Specific text spans can be assigned a cursor and BMessage to send when
they are clicked. This allows for implementing hyperlinks, specific
popup menus, and clickable text of any type.

With some extra work it can also be used to implement spell checking
suggestions, buttons, and so on.

Change-Id: I390e0c44656da76a950c432bdd934bd51af49baf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7130
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-12-11 08:18:44 +00:00
PulkoMandy 9cd2a23203 HaikuDepot TextView: simple implementation of underlined text
The TextView has planned support for fancy underlines (double underline,
squiggly, and possibly different colors than the text). However, it does
not implement any rendering for these yet. Until that is added, have at
least the basic case (single line underline the same color as the text)
by using BFont B_UNDERSCORE_FACE flag.

Change-Id: I26875e51efb1050cbabb2287307516c4cea077cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7129
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-12-11 08:18:44 +00:00
PulkoMandy 841c1c0c10 acpica: fix tracing on 64bit systems
Change-Id: I75be1a37a17c171a45c4b5994c65117aed894b56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7141
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-12-07 06:48:59 +00:00
PulkoMandy 111528d18d HaikuDepot TextView: fix merging of spans
When adding two successive spans with identical styles, they should be
merged into a single span. However, all prevous spans in the view were
accidentally removed.

Change-Id: I4b2d21331ba97cf54a0db83e7638e23bd2303a63
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7128
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-11-25 10:49:21 +00:00
PulkoMandy 8a00ea4af6 ps2_dev: shorter timeout for mouse reset
The keyboard is initialized after the mouse. When there is no mouse,
this timeout delays keyboard initialization noticeably (especially if
there is a mouse port multiplexer with several ports).

Change-Id: Icd4a7c28f6afca062d829df88bd15e88225d4bc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7112
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-11-16 17:11:46 +00:00
PulkoMandy 0822ec27a9 libicon: Fix dangling references to VertexSource in PathTransformer
PathTransformer keeps a reference to the VertexSource used (which can be
either another PathTransformer, or the base path for a shape). When a
shape is cloned, this should be retargetted to the new object in the
clone.

However, references are not settable, and so, what would happen instead
is the original (non-cloned) vertex source was reinitialized (through
the default implementation of the assignment operator) using data from
the clone, and the clone would still point to it. Then, if the original
object is deleted, the clone would point to freed memory.

To avoid this problem, replace the reference with a pointer (which can
be set to point elsewhere, as the code intended to do). To make sure
this does not happen again, make the VertexSource copy constructor and
assignment operator private, and deleted when the compiler supports
that.

Fixes #18577

Change-Id: I8870d9471c5064e922a84eff8447cbda783b13e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7052
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Zardshard <[email protected]>
2023-10-26 12:34:24 +00:00
PulkoMandy 51355272b3 ArchitecturesRules: error on use of deprecated functions
The previous commits have cleaned all the remaining ones.

Change-Id: I6b12ba4f23779f3e2e4fd5a00c6acfaaeb50f4d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6804
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-10-26 10:50:02 +00:00
PulkoMandy 9858be4f63 ffmpeg: remove usage of deprecated method avcodec_decode_audio4
Use avcodec_send_packet and avcodec_receive_frame as recommended in
ffmpeg documentation.

Change-Id: Ib9dc343a9f5cfbc50192158934e5e80c09a37fab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6803
Reviewed-by: Adrien Destugues <[email protected]>
2023-10-26 10:50:02 +00:00
PulkoMandy 538f9a182c MIDI kit: remove obsolete comment
The function used to be "not supported", but now it is implemented.

So, the comment about printing a "not supported" message for debugging
is obsolete and can be removed.

Change-Id: I2db26ef5a59e6e04bf903a29563d88d1d98fc303
2023-10-26 09:41:34 +02:00
PulkoMandy c220175c65 Add Noto Cherokee to font fallback list
Someone asked about it in the forum.

Change-Id: Ib80b9a3bd76f6e882070cc60fcc239f5837d8231
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6983
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-10-09 08:07:19 +00:00
PulkoMandy ae2049aa4f user docs: add note about use of BView::GetMouse() in BView::MouseUp()
Fixes #18606

Change-Id: I2f6d9cd67de6cd4223b6837bb1b8b0cd1de79800
2023-09-30 21:27:32 +02:00
PulkoMandy 52050c56f6 BTextView: improve GetHeightForWidth in non editable mode
In non editable mode, BTextView computes a preferred size that just fits
the current text. This did not take into account the insets from
SetInsets, so, when these are used, the resulting view size was too
small.

Additionally, avoid calling _Refresh that has two problems: it needs the
view to already be attached to a window, and it does a lot of things we
don't really need here: recomputing scrollbars, clearing the empty space
below the text to avoid flickering, and so on. We just need to recompute
fTextRect according to the suggested width, to do that, it is enough to
call _RecalculateLineBreaks instead.

Finally, also restore the text rect at the end of the method, since it
is not actually resizing the view, it is very unexpected that it changes
the text rect. This is not perfect, as the line breaks from
_RecalculateLineBreaks are not undone. But, since the next step is
probably to resize the view according to the computed width/height, this
will be sorted out at that time. If this proves to be a problem, we can
add a second call to _RecalculateLineBreaks after restoing the original
text rect, or refactor _RelcalculateLineBreaks so that it can return the
new height without actually changing the lines.

Change-Id: Ie2fa60c1b2314c8a3346d03ab3ff6843aebaf3dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6845
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-08-19 15:15:00 +00:00
PulkoMandy 7b2f246e69 Cortex: remove use of deprecated C++ features
Change-Id: I174bf8a5224b53370c3dd5f7dc152885ff0ec985
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6800
Reviewed-by: Fredrik Holmqvist <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-08-19 15:11:44 +00:00
PulkoMandy 9c8f4ac5d6 Remove usage of some deprecated C++ features
Change-Id: I8faff44ca5fbce9b56ce135ebd070be6bd4c1c78
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6799
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-08-08 19:52:09 +00:00
PulkoMandy 3a6bc1cf65 SerialConnect: implement clipboard paste
Change-Id: Iaddb6588afa774bcffad9713f280a0078784605a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6770
Reviewed-by: waddlesplash <[email protected]>
2023-08-02 21:16:56 +00:00
PulkoMandy 4c28b3f19f Screen preferences: use a matrix menu for the resolution list
When there are a lot of display resolutions available, the menu can
become very high. Switch to a "matrix" menu with 3 columns in this case
to keep it a reasonable size.

Change-Id: I826be06a91bd1bcae600cc333e34d4a9dd7b3df5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5320
Reviewed-by: nephele nephele <[email protected]>
Reviewed-by: John Scipione <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-07-31 07:02:23 +00:00
PulkoMandy 699bc5363f Launch daemon: fix some unused variables
Used for tracing only, so mark them as unused when tracing is disabled.

Change-Id: I76acb0f18ccab12512eaa4b2644e9d57c591b9ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6740
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-29 15:56:19 +00:00
PulkoMandy 2a7d6a9850 Cortex: fix some unused-but-set warnings
Declare the variables as unused because they are used only in ASSERT
calls which are disabled by default.

Change-Id: I4786fad54463b532b00afa5be00ed52fb118776f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6737
Reviewed-by: waddlesplash <[email protected]>
2023-07-29 15:56:19 +00:00
PulkoMandy 21b533d448 Bootloader FAT: remove unused variables
The "longNameValid" variable already indicates if a long name is present and
valid, and it is correctly handled, with the short name used as a fallback
if the long name is either not present, or not encoded correctly.
The "hasLongName" variable is useless since long names are already handled.

The "partial" variable indeed indicates a partial read was done. There is
nothing to do with that info, the read is already complete at this point and
the correct data is read and returned to the caller. So I don't see why we
should keep this variable.

The "count" variable seems to serve no purpose and is easy to re-add if
someone ever has a need for it.

Change-Id: Ic7eb7f34a49243ecdb5dd3c6b29c3b90f3bece10
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6739
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-29 15:56:19 +00:00
PulkoMandy 30e762a797 bluetooth: fix unused but set variable
Change-Id: Ie63b0a28c352bc9997a2a70b3e335af2b3cc1bc3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6714
Reviewed-by: waddlesplash <[email protected]>
2023-07-29 15:56:19 +00:00
PulkoMandy c75dc6af6b pci and usb header scripts: avoid generating trigraphs
Change-Id: Ifd10f039cebdd3995397ad380b7a2c6ddd437775
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6738
Reviewed-by: Jérôme Duval <[email protected]>
2023-07-28 09:11:43 +00:00
PulkoMandy 7e80a0ba59 PSD translator: fix mismatched types compiler warnings
Change-Id: I12f0cc2b7f4fea43726425af558641d8e6789a14
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6736
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-28 09:11:43 +00:00
PulkoMandy 16a112ae7b ext2: fix unused-but-set variable
This variable was introduced in hrev38573 which is the conclusion of
a GSoC project by jvff to add write support to the ext2 driver.
It has been unused for 13 years, I think it is safe to remove.

Change-Id: I8ae4635dbc39f108b769d90b92e5545f8183a10d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6715
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-28 09:11:43 +00:00
PulkoMandy a2b91af97b highpoint_ide: fix unused-but-set variable
Change-Id: I2b6769779682978b5e61166bc4032291bb02bea2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6713
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-24 18:42:51 +00:00
PulkoMandy 70d3b1028a ps2: mark unused-but-set variable unused to avoid warning
Change-Id: If0073d878cfe4c37ea61bc10459e698ebbb47897
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6712
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-24 18:42:51 +00:00
PulkoMandy 69657d9d4f ACPI: remove unused-but-set variable
Change-Id: I8095cb13c51c3891cc36dca1b7667041cb6c9df0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6711
Reviewed-by: Fredrik Holmqvist <[email protected]>
2023-07-24 18:13:52 +00:00
PulkoMandy 45311bd6f9 usb_rndis: synchronize writes
The write function can be called concurrently by multiple threads. The
way it is implemented now means this desn't work, since there is no
guarantee the correct thread will be released from the semaphore by the
USB completion callback.

I tried to allow mutiple requests to run "in parallel" (really letting
the USB stack schedule them) by having he callback track which thread to
wake up (using send_message/receive_message as a synchronization tool)
but that still resulted in lockups.

The simplest solution is to ensure there is only a single thread doing a
write transaction at a time, which is achieved here with an extra mutex.

Fixes #18521.

Change-Id: I0b737acab6f5665cbe5b0e40a20ce99c16bdf21c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6707
Reviewed-by: Jérôme Duval <[email protected]>
2023-07-24 14:47:23 +00:00
PulkoMandy 5a86b40e33 xres: fix extracting resources
Regression introduced in hrev51641 which added braces to fix a
misleading indentation warning. The code was behaving correctly and the
indentation was wrong.

Change-Id: I378ff3ed6209917b44387fc29459b6e492c5eb9c
2023-07-18 21:26:03 +02:00
PulkoMandy 899e0ef82b userlandfs: use std::bitset for FSCapabilities
gcc 13 is confused by the custom bitset implementation, so use the C++
standard one instead.

However, this results in including the C++ <string> header in kernel
code. This doesn't work for gcc2, because of two problems:

- That header includes a declaration of atomic_add that doesn't match
the one in SupportsDefs.h (which can in some cases replace the function
with a #define for an inline version). Adjust the header to use the
be a problem because it creates a risk of circular inclusions.
Standard C++ headers shouldn't depend on BeAPI ones.
- It also leads to the inclusion of iostream which defined lock and
unlock functions in the global namespace. We don't want these, and they
are not part of the C++ standard, so just remove them.

Ideally we could use std::hash for the GetHashCode implementation, but
that doesn't work because it depends on an helper function that's in
libstdc++, and we can't link that from kernel add-ons.

Change-Id: Iee07280beb4dddf7a9b6160e37f3b816e4de89ae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6663
Reviewed-by: Niels Sascha Reedijk <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-07-10 06:27:18 +00:00
PulkoMandy a6957d9ff4 fifo_poll_test: add handling of EINTR signal
This is the test for #7859, the problem now is just that the SIGCHLD
signal is delivered before the file descriptor close event wakes up the
poll().

Change-Id: Iddf96e2830d5c7496ec3c6bd27cc235c5ce9d7d4
2023-07-04 20:19:02 +02:00
PulkoMandy 311dc3ca7d tty: notify read in addition to write when the other tty is closed
Reading a tty that's closed by the other side will return an end of file
error, but will not block.

Fixes #18486.

Change-Id: I8441becdcc8c83c08611684fa0a29216e9d04ec8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6665
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2023-07-03 09:38:33 +00:00
PulkoMandy 037c2257f9 Export liblinprog symbols in libalm
Appls using libalm (mainly the Aukland Layout Editor) expect to find
these symbols in libalm.

Change-Id: I9ed72ce9fb63510351ab8b50643c3eace2c2953b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6664
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Niels Sascha Reedijk <[email protected]>
2023-07-02 16:51:56 +00:00
PulkoMandy 37e1b12911 framebuffer: report display EDID data
This allows to see the display in Screen preferences, and know its DPI
and physical size (as much as EDID data can be trusted). This
information could be used to compute the default font size, for example,
so it's important that all drivers provide it whenever possible.

Change-Id: Ic3d04e53cf5fcb24e22d35661d2b364a257947da
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6576
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-06-11 11:23:01 +00:00
PulkoMandy 7da4ade74b Remove version constraints for ICU
These are populated with the correct version automatically when building
the package, so there's no need for an explicit setting. This had
already been cleaned up for the other packages, but not yet for
haiku_secondary

Change-Id: I5bcc94fb80f639610899ec31fc77a6e678ca9e80
2023-05-28 17:03:35 +02:00
PulkoMandy 80cb3bc23e Add source for Misc_WebSearch icon
Used in WebSearchFS.

Change-Id: I55a6c74dfb2b57f2a1ea6141727f40a187a9868f
2023-05-28 16:59:19 +02:00
PulkoMandy 5bf195cdad Remove libicutu and libicutest from Haiku dependencies
These are used only by ICU tests and should not be in the ICU package.
They will be removed in the next versions of the ICU package when we
update.

Change-Id: Ib8bb2dd24ce1671e8b369c775b89d49b9b6e84eb
2023-05-28 16:59:19 +02:00
PulkoMandy 8be0a59e77 ECAM ACPI PCI controller: handle missing address_length
On my machine, the address_length somehow is 0, but can be computed from
the minimum and maximum values.

Change-Id: I2262263915319e0d97a2cd9b9fde3f6af1f79a84
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5759
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
2023-05-24 11:00:07 +00:00
PulkoMandy 4dbd474753 Add BIconUtils::GetSystemIcon
Allow to easily access the alert icons and anything that's added to app_server
resources.

Fixes #10887.

Convert BAlert, Debugger AlertWithCheckbox and Keymap ModifierKeysWindow
to make use of it, removing the duplicate code to locate app_server
resources.

The resources are initialized only once (per application), so there is no need
to reload them for every access to the icons.

In the ticket there is discussion about putting this in BControlLook,
but I think this should in fact be moved fully into app_server with
special drawing commands for well-known icons. That would avoid loading
and rendering the icon on the application side to then send it to
app_server (especially in remote_app_server case)?

In any case, this simple API can serve as a base for applications to
use, and we can change how it is implemented later on.

Change-Id: Id370526ae5cf165cfb8bc277bc8a7f46c26f542d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6463
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2023-05-24 10:58:48 +00:00
PulkoMandy 217bbbf423 Debugger: fix empty button on alerts with only 2 buttons
When no debuginfo is available from packages, the alert has only two
buttons. This was not handled correctly, leading to a small empty button
being present.

Change-Id: I44de1101f7cd539da5c582eaf34bb1476aa9ab20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6462
Reviewed-by: waddlesplash <[email protected]>
2023-05-20 14:52:26 +00:00