Commit Graph

64628 Commits

Author SHA1 Message Date
Oscar Lesta
8fc394c12d pkgman: change default search scope
* Reduce default search scope to: "name", "summary", and "provides".
* Add a new "--search-scope=<scope>" option that allows to either limit
  the search to packages names (-s name), or to replicate the previous
  behavior of searching everywhere in the package info (-s full).

Motivation for the change:

The ever increasing number of packages available for Haiku was impacting
pkgman search usefulness, as it easily returns too many packages (what a
wonderful problem to have :-D).

Limiting the default search scope helps with that, and the old behavior
is kept "just an option away".

Change-Id: I5b456b90137237134eee7ca7ee501bf8e3767440
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5616
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-06 20:31:38 +00:00
Oscar Lesta
e4d44d82aa Sounds preflet: small UX improvements.
* Disable BMenuField unless a sound event is selected.
* Changes in the MenuItem enable/disable the play button as necessary.
  (previously only changes in the EventList did that).
* Enable the play button when BFilePanel is closed (after selecting valid file).

Fixes the (still reproducible) UI/UX portion of #17150.

Change-Id: I5b5d00cc7fce00a0d0f908bbaff883169f38f855
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5613
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-06 17:48:26 +00:00
Humdinger
3e06d97bc8 HaikuDepot: add missing strings to catalog
Quite a few source files were missing when collecting strings
for translation. Just do the catalogs for all applicationSources.

Change-Id: I452bed61b50d5693b46d63cf5773b49f75ef2aef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5622
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2022-09-06 07:21:50 +00:00
Oscar Lesta
83a4315c94 /bin/pidof: add a basic "pidof" command.
Change-Id: Ia70d3280d46cf9f5770f8c83a5941ea5b1b8dfe7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5599
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-06 05:57:07 +00:00
David Karoly
9a515fedd9 virtio-mmio: hush
Change-Id: I3f628c3045819acd48497bc7224cb68fd661e2bc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5617
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-05 18:53:42 +00:00
David Karoly
3bfbf2fb53 kernel/arm: check for PXN and alignment fault in page fault handler
Change-Id: I2a863b57b1252343c9c029d1bb5af8d328558576
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5620
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-05 17:29:49 +00:00
David Karoly
72274d4a8d kernel/arm: refactor page fault handling
Introduce common page fault handler so we don't have to do code duplication.

Change-Id: Ib9fa6a3d38e137e43911a24a3405c7c3f1de5908
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5619
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-05 17:29:49 +00:00
David Karoly
17569c02ff kernel/arm: clean up arch-specific defines
* align fault syndrome and fault address register naming with
  ARM Architecture Reference Manual (i.e. IFSR, DFSR, IFAR, DFAR)
* move PSR bitfield defines to arch_cpu_defs.h

Change-Id: I813045eec335ffbdd75270ad5a1afb2f222f73c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5618
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 19:11:05 +00:00
David Karoly
67406e5145 kernel/arm: save FPU registers on context switch
Change-Id: Icb62688338d3a3083f8f6d1874cae3218ba042e0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5614
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-04 17:33:49 +00:00
Niels Sascha Reedijk
97f11716bf Merge remote-tracking branch 'origin/master' into dev/netservices
Change-Id: I588c4a840523995f820161d63741c137bc5c719c
2022-09-04 07:30:59 +01:00
Niels Sascha Reedijk
27196c4068 NetServices: use BBorrow<BDataIO> for custom body targets
Change-Id: Ib2d4b0ca3689338d906f943295278c086c6f2c83
2022-09-04 07:27:08 +01:00
Niels Sascha Reedijk
1e22817dfb NetServices: add the BExclusiveBorrow<T> smart pointer
This smart pointer is designed to help with putting some explicitness and
safety around the case where someone will use their own object that implements
the BDataIO interface to store the body of a network request. By default,
BDataIO objects do not require or enforce thread safety. Since accessing these
unsynchronized objects between two threads is undefined behavior, it should be
explicitly discouraged.

The BExclusiveBorrow/BBorrow smart pointer helper helps solve that by enforcing
the limitations on using an unsynchronized object in two threads. When used
correctly, there is a runtime check on incorrect use by the developer. This
should help write better code.

The design is based on shared_ptr, including having an admin block akin the
control block, that manages the internal object. This type-erased admin block
has the advantage that it allows the owner to have a different type than the
borrower. It also handles cases where the lifetime of the borrower is longer
than the owner: the borrower can continue to use the object until they want to
return it, after which it will be cleaned up. This will make it possible to do
some fire and forget pattern in the network services kit, where someone may
just wants to create a file and borrow it to the network request, and care
about further processing the file in the future.

Change-Id: Ie9b7e7472c868b60f663b4db4fa449d421e447eb
2022-09-04 06:54:37 +01:00
David Karoly
d244e9ef2d kernel/arm/exceptions: use more readable macro names
Change-Id: I4f41f6dff6a871583ea91e029476fc9c5f0ca46d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5615
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-09-03 18:04:42 +00:00
Autocomitter
772c2cf97c Update translations from Pootle 2022-09-03 08:17:09 +00:00
John Scipione
605761f47a Deskbar: Calculate clock margin based on font size
Based off of tray padding instead of hard-coding 12. Calculate tray
padding once in AttachedToWindow() and use that value everywhere.
Create some class float member variables to keep track of these values.

Fixes #17923

Change-Id: I3e767fdc8d2775e5f0dfff3275aeb0b686a8ea76
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5610
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:25:44 +00:00
David Karoly
c791590a8e kernel/arm: fix iframe unwinding
* add missing call to thread_get_current_thread()
* apply some better formatting to iframe printout
* pass iframe in lr to exception handlers
* add missing iframe scope in syscall handler
  (was removed previously by mistake)

Change-Id: I01c34f2114cd874f72f91be428921ad2002e256a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5611
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:24:23 +00:00
David Karoly
3d79cd3332 kernel/arm: set PXN for user memory
* set PXN for all page tables below KERNEL_BASE
* also set PXN for physical page mapper

PXN, Privileged execute-never

When the PXN bit is 1, a Permission fault is generated if the processor
is executing at PL1 and attempts to execute an instruction fetched from
the corresponding memory region.

Change-Id: I3056cbed151004ac9edfbc81ebeada328aeb603c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5607
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:24:08 +00:00
David Karoly
c0a7601219 kernel/arm: store current thread pointer in TPIDRPRW register
Use the Privileged Only Thread ID Register aka TPIDRPRW to store
the current thread pointer.

The Privileged Only Thread ID Register is only accessible
in privileged modes, and is read/write.

see: ARMv7 Architecture Reference Manual,
section B3.12.46 CP15 c13 Software Thread ID registers

Change-Id: I5273bee8a80b78cdc547b2f6c96632d120eb3d55
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5608
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-09-02 16:23:53 +00:00
Máximo Castañeda
2eab9be564 HaikuBook: fix xml
Change-Id: If6dfe4de919d946f1ff19946e1fa1abe726ea95f
2022-09-02 12:12:01 +02:00
Máximo Castañeda
0da59b2407 DesktopSettings: remove unnecessary includes
Change-Id: I94fbffbe359be954bf769299420d1df97b2da184
2022-09-02 12:10:31 +02:00
David Karoly
e96dc7dbcb kernel/arm/int: print user SP and LR from iframe
Change-Id: If3ad93f00c869321b1897f8e779e435b25d244f7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5609
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: David Karoly <karolyd577@gmail.com>
2022-09-02 06:42:12 +00:00
Augustin Cavalier
388f8d4c0f TeamMonitor: Appease GCC2. 2022-09-01 00:26:33 -04:00
Augustin Cavalier
054c1b2706 Tracker: Overhaul list column size initialization and storage.
Mostly for HiDPI, but this also cleans up the code in general, too.

 * Apply a scale-factor when loading and serializing column size/offsets
   in ViewState.

 * Do not hard-code offset values for default columns but let
   BPoseView::AddColumn() compute them manually instead.

 * Change BPoseView::AddColumn() to support being called during
   early initialization and utilize it in SetUpDefaultColumns...().

 * When adding deserialized columns to a BPoseView, always realign
   the offsets instead of just doing sanity checking. The rationale here
   is that the first time the TitleView is touched, it will do this
   anyway, and cause "snapping" or drawing glitches if the alignment
   is not as expected.

   If it was actually somehow an intended feature that non-adjacent
   columns can be displayed, changes are needed in TitleView and PoseView
   to properly support this without triggering redraw glitches.

I still saw some very slight redraw glitches (e.g. column contents
shifting by 1px) at higher font sizes; however, Tracker before this
commit had far more of those glitches (this commit seems to resolve
a number of them.)

Tested with 12pt, 18pt, and 20pt font sizes; this seems to work
pretty well. But if you see strange behavior or more redraw glitches
than there were previously, please do file a ticket.
2022-08-31 23:59:00 -04:00
Augustin Cavalier
509c951d85 Tracker: Scale all icon sizes, not just the list icon size.
ViewState now always holds the unscaled icon size and PoseView
computes and caches the actual display icon size.

Anyone who used Tracker on HiDPI before this commit will likely need
to reduce the icon size on their desktops and any open windows.
2022-08-31 22:48:42 -04:00
JackBurton79
2eaee4a7a1 Screen preflet: fix usage of std::find()
Change-Id: I8689ea6baa408d07c715703e8f8bf8f29bf40f60
std::find() never returns NULL but the last element in case of failure
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5602
Reviewed-by: Máximo Castañeda <antiswen@yahoo.es>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2022-08-31 21:13:32 +00:00
Augustin Cavalier
33cf9d22ff ProcessController: Utilize ComposeIconSize and refactor icon menu items.
* All MenuItem variants which draw icons now derive from IconMenuItem
   and use its functions to draw and otherwise manage their icons. This
   resolves a number of TODOs and reduces code duplication.

 * Use BControlLook::ComposeIconSize() to compose icon sizes throughout.

 * Remove unused methods from IconMenuItem.
2022-08-31 17:07:49 -04:00
Augustin Cavalier
72e4928f8a Tracker & desklink: Pass -1 to GetTrackerIcon for sizing.
It can just deduce the size from the passed BBitmap if we do this.
Simplifies the code somewhat.
2022-08-31 16:21:53 -04:00
Augustin Cavalier
e6ab6daf98 TeamMonitor: Use BControlLook::ComposeIconSize.
And DefaultLabelSpacing, too. Fixes appearance on HiDPI.
2022-08-31 16:17:19 -04:00
Augustin Cavalier
1f0c87711b shared/IconView: Add a variant of SetIcon which directly accepts a BBitmap. 2022-08-31 16:16:43 -04:00
Humdinger
ee88fb6f03 HaikuDepot: Minor GUI string changes
"Shutting down" is too reminiscent of a system shutdown.
We're just quitting the app. Going with a generic "Cleaning up".
Correcting the app name, HaikuDepot.

Change-Id: Ifadf533170dc89befc971ea86b7140d3aa7fcef8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5605
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-31 17:25:11 +00:00
Augustin Cavalier
cd3045596e BColumnListView: Optimize check for whether the focus row has moved.
If the new row is not in an open branch, it cannot possibly have
caused the focused row to have moved, and so we need neither check
nor perform an invalidation if that is the case.

This code has been this way since it was originally imported into
Vision's (!) CVS repository in 2001 from some Be sample code area,
and has not been substantially changed since it was imported into
Haiku's repository in 2004.

This saves quite a number of app_server round-trips and redraws
when importing lots of rows to the list, which fixes the other half
of the hang when changing functions in the call stack in Debugger.
2022-08-31 00:13:24 -04:00
Augustin Cavalier
29335bd389 Debugger: Never automatically resize the columns of the ImageFunctions table.
This table will have thousands of items in every branch, most with
extremely long names, so resizing all its columns to the preferred size
takes an unbelievable number of app_server round-trips to measure text.

For modules with any significant usage of C++, there are going to be
functions with names so long that it will make the table quite
unwiedly to work with, anyway, when columns are automatically resized.

This fixes half of the whole-application hang that happens when changing
between functions in the call stack.
2022-08-31 00:08:21 -04:00
Augustin Cavalier
0a48878fba Debugger: Set AUTO_UPDATE_SIZE_LIMITS and adjust default size of Teams window. 2022-08-30 23:00:56 -04:00
Augustin Cavalier
1f34a738be Debugger: Use monospace font in tables that display addresses.
This makes stack traces, registers, variables, etc. so much nicer
and easier to read and work with. Ahh, much better.
2022-08-30 22:43:56 -04:00
Augustin Cavalier
1f72988e61 Debugger: Improve appearance of TeamsWindow insets and spacing.
The buttons are now aligned to the scroll bar and window resize knob,
by using BControlLook::GetScrollBarWidth. (Hmm, perhaps it might make
more sense to just have scrollbar sizes be a kind of insets, which can
be gotten via B_USE_SCROLL_BAR_INSETS, and then drop this extra method
altogether? After all there are a lot of applications which align to
scroll bars...)
2022-08-30 22:28:04 -04:00
Augustin Cavalier
af791479cb Debugger: Initial fixes to TeamsListView for HiDPI.
* Use BControlLook::ComposeIconSize.
 * Use LabelSpacing for row heights.
2022-08-30 22:26:32 -04:00
Augustin Cavalier
861282ffa7 BColumnListView: Dynamic scrollbar size support.
Improves appearance on HiDPI.
2022-08-30 22:14:16 -04:00
Andrew Lindesay
8d18358cdf HaikuDepot: Fix Image Rendering
Resolve an issue with rendering package
icons when "Disable user addons" is
turned off.

Relates to #17862

Change-Id: Ic2d17626c40a97598613b8f21218d6829de97bbf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5556
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jacob Secunda <secundaja@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-31 01:16:37 +00:00
Jérôme Duval
8045bb174e kernel/vm: also honor page protections on copy-on-write
this fixes #17895

Change-Id: Ide6cb044cf96213b4bae7eb62235f988b73c0fb1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5601
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2022-08-30 16:43:41 +00:00
Augustin Cavalier
90d62fd900 TLS.h: Drop inline assembly from the header.
This was a holdover from BeOS, which did this as inline assembly.
We do not on any platform other than 32-bit x86, and even there
we may have preferred to do things a little differently on non-BeOS
ABIs.

Most things ported from other systems, or even native apps, are going to
use _Thread_local variables anyway, which will bypass this system
altogether.
2022-08-30 00:00:04 -04:00
Augustin Cavalier
3b7f223770 ShowImage: Appease GCC2. 2022-08-29 16:59:37 -04:00
Augustin Cavalier
bbee4c3ab6 ShowImage: Do not hardcode the font size of the status view. 2022-08-29 16:10:38 -04:00
Augustin Cavalier
87d8b1776f ShowImage: Use BControlLook::ComposeIconSize.
Also use BBitmap::ImportBits instead of a manual copy, while at it.
2022-08-29 16:08:27 -04:00
Augustin Cavalier
fac73debbf Deskbar: Compute basic metrics earlier, in TBarApp::InitSettings().
This way we know the minimum and maximum window width earlier
and consumers of them do not come up with "0" incorrectly.

Fixes #17890.
2022-08-29 15:55:41 -04:00
Augustin Cavalier
f34e3931e8 Deskbar: Correct sizing and placement of icons in window menus.
Fixes #17891.
2022-08-29 15:36:48 -04:00
Javier Steinaker
4f0d375c54 WebPositive: added shortcut to cycle through tabs like in every other browser
Change-Id: I3cb543948929c20e64c1c8c245a568fb81637a3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5574
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2022-08-28 18:49:19 +00:00
Autocomitter
100e2a19c1 Update translations from Pootle 2022-08-27 08:22:26 +00:00
Augustin Cavalier
e5f774e848 Tracker: Rework file-panel initialization.
* Get spacing from BControlLook.

 * Initialize and place the buttons before the PoseView,
   so that they can be used to constrain the PoseView's size.

 * Update size limits based on spacing metrics.

Tested against filepanel command, Backgrounds preflet,
and WonderBrush. All seems to still work acceptably, and
now the controls are properly font-size-sensitive.

Fixes #13178.
2022-08-26 23:49:24 -04:00
Augustin Cavalier
34ab706011 StyledEdit: Do not do font->Size() / 12 but rather downscale directly. 2022-08-26 23:01:32 -04:00
Augustin Cavalier
e038086025 BButton: Adjust the spacing and minimum values to use LabelSpacing.
Seems to fix the last part of #16180.
2022-08-26 22:29:29 -04:00