Commit Graph

61556 Commits

Author SHA1 Message Date
X512
db3a94141a SeparatorItem: support horizontal layout
This is required for BMenuBar based toolbars.

Fixes #15785.

Change-Id: I8d108694b481e408e5c56e23a697c8e7829343dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2316
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-10 15:45:27 +00:00
Pascal Abresch
3ef1314981 aboutsystem: add Pascal Abresch
Change-Id: I30722cf3a72c0ebb89b5da08c5d3d7f03ac485ee
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2528
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-10 15:41:51 +00:00
Adrien Destugues
dc104a2ade bfs_shell: build fix. 2020-05-10 14:24:30 +02:00
Adrien Destugues
93f6ca70a8 FileTypes: ensure there is enough space to display app info
Fixes #15793
2020-05-10 11:53:13 +02:00
Adrien Destugues
12e4ac5d81 DiskUsage: fix infinite loop when computing tab width
Stop when we have a solution that is within 1px of accurate. Since tab
width are rounded to the nearest pixel anyway, there is no need to
compute further, and this could otherwise never converge due to rounding
errors.

Fixes #15944.
2020-05-10 11:07:47 +02:00
John Scipione
aca685fca1 BeControlLook: Control look resembling BeOS R5
Inspiration for this change comes from work done by Marc Flerackers
circa 2003 and has been repackaged into an updated BeControlLook class
which serves as a replacement for HaikuControlLook with the controls
that resemble BeOS R5.

Implemented the following controls:
Check boxes
Radio buttons
Menu bars
Menu fields
Menus
Scroll bars
Scroll view frame
Buttons
Tabs
Sliders
Borders

Backported check box placement fix from HaikuControlLook.
Copied label icon support from HaikuControlLook, BeOS did not have this.
Implemented support for left, right, and bottom tabs.
Implemented dots and lines scroll bar knob styles.
Copied slider bar from HaikuControlLook, BeOS did not have this.
Backported Desktop glowColor fix from HaikuControlLook

Change-Id: I5deac44ba8113ab7d1afd6e75f3dd93bfa222610
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2382
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Sergei Reznikov <diver@gelios.net>
2020-05-10 08:35:52 +00:00
Suhel Mehta
d72239d23d Move DeviceOpener class to a separate file.
It is used by several of the filesystems, so it seems a good idea to
move it to the shared/ directory.

UFS2, BFS, XFS, EXT2 and EXFAT are adjusted.

Change-Id: I493e37a1e7d3ae24251469f82befd985a3c1dbdd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2489
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-10 08:29:31 +00:00
Alexander G. M. Smith
e9c3e80c58 Clarify .PackageInfo user creation arguments.
Change-Id: I4f0ea6da53d4793a5128324af2b99d460b67b523
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2576
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 20:20:19 +00:00
Augustin Cavalier
9304fbae8a uchar.h: Remove duplicate definition of mbrtoc32. 2020-05-09 16:15:55 -04:00
Adrien Destugues
aa272ca35c Package Kit: reduce identifer/base-url confusion
For historical reasons, the package kit has an "url" field that is not
actually meant to be used as an URL. Rename it in the API and user
facing output as "identifier" to make it clear what the file is used
for. This change preserves the "url" key in on-disk and online storage
(hpkr files, stored settings, etc) in an attempt to not break anything.

Fix one remaining misuse of the "url" field as an URL in
get_package_dependencies.

Add an unit test showing that BUrl does parse "tab" URIs properly (there
is just a protocol and a path segment).

Change-Id: I339ce526e5798d42d78ae650855d7e988dbb4a1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2542
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 20:04:50 +00:00
Adrien Destugues
5ef5cba68a Mail: layout-ify the Find panel
Fixes #13163

Change-Id: I2880b3dcd824087ee998a5dd67c5e9d904b5874d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2629
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:43:07 +00:00
Adrien Destugues
2b4c59635f Appearance: add some extra margin around menufield labels
The font antialiasing settings make the font rendering change. It can
make strings longer or shorter, and this can result in the menufield
being moved by a few pixels. So add a safe margin around the menu field
to accomodate for it.

Fixes #13039.

Change-Id: I73de08b747dc8cade58bcc674dd4f94fb6a9f9eb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2630
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:41:27 +00:00
Adrien Destugues
39c68f46dd Remove deprecated build profiles @image and @vmware-image.
The @image build is not used anymore and doesn't work. Use @nightly-raw
or @nightly-anyboot instead. The new method of release type/image type
configuration of profiles is more flexible and allows to manage the
various configurations a lot more easily for us. But the old profiles
were never formally deprecated.

Fixes #15963

Change-Id: I1c72f0e77bfbcda10502476e595f120280e8c7a4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2625
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:35:06 +00:00
Adrien Destugues
8bb5fd2437 StyledText translator: use a larger buffer for encoding detection
It may be the case that a file is largely ASCII with few UTF-8 or
similar characters (typically, english text mentionning names in other
languages). It turns out 2 kilobytes of text is not enough for a safe
guess in that case.

Fixes #14674

Change-Id: Id894bebb821c22a17b776a71822d011abc795dea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2628
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:34:22 +00:00
Murai Takashi
2e6ca31c5a SerialConnect: Add localization.
Add localization for menus, statusbar and system name.

Change-Id: I85ef95c1ff940c6d794f49a859ff1b696b866839
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2602
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-09 19:32:59 +00:00
Adrien Destugues
693e2f4fb4 app_server: actually invalidate decorator area on window close
More completely fixes #12085

Change-Id: I73bf987f06422bebbfc739d3700c11edad928646
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2621
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit a16c358d59)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2634
2020-05-09 19:31:08 +00:00
Adrien Destugues
22337d8f4b uchar.h: char16_t must be uint_least16_t
We attempted to make it a 32bit char type, but that is actually not allowed
unless we also make uint_least16_t a 32bit type. And even then, we
wouldn't be allowed to store or handle values wider than 16bit.

Comply more closely to the standard. As a result, mbtoc16r is not
implemented. c16rtomb is implemented by casting the char to 32bit, which
isn't really correct either (I think you're supposed to be able to feed
the two halves of a > 16bit codepoint in two separate calls and get a
meaningful result out?)

Related to #15990 but we may want an actual implementation?

Change-Id: If8198675c27dd2aa412bc44d12d3df4e31d3e8c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2623
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:29:28 +00:00
Adrien Destugues
566914fad4 AboutSystem: some updates to the contributors list
- Move Kyle Ambroff-Kao to the maintainers
- Add Diver, Vidrep and Luroh as bug triaging and testing team (your
  work deserves more credit, thanks a lot!)
- Move Koki back into "past website/marketing team"

Change-Id: I3f198277804aaa2dedf0551ced65e5f94393f3ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2624
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:28:44 +00:00
Adrien Destugues
fc86ef2cef Revert "Add-ons: Add alert warning to PNGTranslator"
This reverts commit 450208975b.

The alert is not appropriate because applications cannot intercept it.

Fixes #15734

Change-Id: I5be98367ae615a572193406a559e5d34617e445c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2626
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 19:27:07 +00:00
Murai Takashi
75ffe22658 GLInfo: Add localization for capabilities.
Change-Id: Iafa1ab40962df779efd85a708a54358c96bcaaf3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2622
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-09 19:25:49 +00:00
Adrien Destugues
2edfb7b145 DeskBar: misplaced NULL check
- Main problem was that lastItem was accidentally used outside of a NULL check
- Also cleanup initialization and reset of fLastClickedItem (it is now valid
  from mousedown on an item to either mouseup, or when the team dies)

Fixes #15991

Change-Id: I82e30303c50a61b9d44c092347f067dcb1105006
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2619
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-09 13:22:30 +00:00
Adrien Destugues
24337d5342 DecorInfo missing from libbe catalog.
Fixes #15971
2020-05-09 13:56:43 +02:00
Adrien Destugues
8d9eff5881 ext2: report ext2/3/4 fs name depending on available features
Should help with #12157.

Change-Id: I7ea0310957c06606bc66a289afe8c3a78540a803
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2610
Reviewed-by: Kyle Ambroff-Kao <kyle@ambroffkao.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-05-09 08:36:12 +00:00
Niels Sascha Reedijk
4bd6250035 Translations: remove various languages
* Greek (el) and Korean (ko) no longer made the norm to be included on the image.
* For bg, sl, hr, eo and cs, there were leftovers that should have been removed before.
2020-05-09 09:22:37 +01:00
Augustin Cavalier
cac30e4190 kernel_debug_config: Move global VMCache option to KDEBUG_LEVEL_2.
It does have a performance impact (as it serializes all VMCache
creations), and it is not that useful, so move it to KDEBUG_LEVEL_2
so that the beta releases (on KDEBUG_LEVEL_1) are not affected
by it.

(The nightlies are on KDEBUG_LEVEL_2, so this will not affect
them.)

Change-Id: Iab35d58f9d210651e3fd9027b75ea27a7a6928e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2612
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-09 03:43:20 +00:00
Augustin Cavalier
a20a26e264 Versioning: Add BETA_2 and PRE_BETA_3 constants.
* PRE_BETA_3 is now the default in master.
2020-05-08 23:30:15 -04:00
Augustin Cavalier
cf9bfa4bb0 SoftwareUpdater: Default to "full-sync" instead of "update".
Fixes #15899.
2020-05-08 23:06:30 -04:00
Michael Lotz
b94221f3b2 mmap: Use MAP_NORESERVE to request overcommit, not PROT_NONE.
This reverts hrev54120 and instead adds the commonly supported
MAP_NORESERVE flag to request overcommit.

Using PROT_NONE for overcommit is problematic as the protection of
individual pages can still be changed via mprotect to make them
accessible, but that won't change the commitment. An application
using such a pattern may then unexpectedly run into out of memory
conditions on random writes into the address space.

With MAP_NORESERVE the overcommit can explicitly be requested by
applications that want to reserve address space without producing
memory pressure.

Change-Id: Id213d2245c5e23103e8e0857f7902e0cd8a2c65d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2611
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-05-09 02:57:48 +00:00
Adrien Destugues
7362b02b0e TabDecorator: fix invalidation when removing a tab.
Fixes #12085.

Change-Id: I346e39ba4dc6befe97f33f8ff409a6ac84ae8585
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2609
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 22:09:50 +00:00
Adrien Destugues
09af7c139b Tracker: fix layout of find panel.
A minimal layout cleanup for beta2. Further changes were proposed in a
separate ticket, #9781, maybe for later.

Fixes #9780.

Change-Id: I1f66d808bd2cea683aa9f3a905cdf5717f1824ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2607
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 22:07:55 +00:00
Adrien Destugues
9670db20dd Tracker: add some time_t overflow checks in StatusWindow
Don't pretend file copies will end in 1901, that's obviously wrong.

Helps with #11176, but we should really not use time_t here, or make it
64bit.

Fun fact: we're now closer to the end of the UNIX epoch than to the creation
of Haiku!

Change-Id: I64acc5ab29fb778fe3034c65b5a8418951d30505
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2608
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 22:07:08 +00:00
Michael Lotz
d8d403ef5d VMAnonymousCache: Reuse _FreeSwapPageRange in destructor.
The use of individual _SwapBlockGetAddress() and _SwapBlockFree() calls
would lock and unlock the swap hash for each page.

Using _FreeSwapPageRange() also allows to skip entire blocks when they
are not present or get empty early.

Change-Id: Ia76735e514cf8967d282e099cf5409fe1b104297
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2590
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
4e2b49bc0c kernel/vm: Implement swap adoption for cut_area middle case.
Rename MovePageRange to Adopt and group it with Resize/Rebase as it
covers the third, middle cut case.

Implement VMAnonymousCache::Adopt() to actually adopt swap pages. This
has to recreate swap blocks instead of taking them over from the source
cache as the cut offset or base offset between the caches may not be
swap block aligned. This means that adoption may fail due to memory
shortage in allocating the swap blocks.

For the middle cut case it is therefore now possible to have the adopt
fail in which case the previous cache restore logic is applied. Since
the readoption of the pages from the second cache can fail for the same
reason, there is a slight chance that we can't restore and lose pages.
For now, just panic in such a case and add a TODO to free memory and
retry.

Change-Id: I9a661f00c8f03bbbea2fe6dee90371c68d7951e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2588
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
6dc4e9d72e kernel/vm: Factor out condition for cache resizing in cut_area.
Change-Id: I2c49b550f72b9778934abbf90a04579caa7b43f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2587
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
65598ca615 kernel/vm: Inherit the temporariness of source cache on split.
Otherwise pages from it would later be tried to be written back with
nowhere to go in case of temporary caches.

Change-Id: I81e7335408c419a9b2c7bbb31290d551f5508d56
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2586
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
d2dd287e5e kernel/vm: Use already determined priority in middle cut_area.
Change-Id: I4dd677a0f1378f4fa483502124bea70ad7ba40c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2585
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
f626525071 VMAnonymousCache: Fix use after free when freeing partial block.
When only some initial slots of a block were filled, the block would
become unused early and get freed. The iteration for the remaining slots
would then operate on the stale swapBlock as the pointer was not reset.

As we already know that the remaining slots can't be in use, directly
skip to the next swap block to avoid needless hash lookups.

Change-Id: Ib25377beb092aaf3533de1786b5f4c1099464599
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2584
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
315a581cd6 VMAnonymousCache: Fix off by one in page freeing on resize.
The pageIndex is incremented on loop, so rounding up to the next swap
block would skip the first entry of the next block which would leak its
swap slot.

Change-Id: Ief3d29e711d323756034ea5ba6e300c489198aff
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2583
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Michael Lotz
1702afeb88 VMAnonymousCache: Factor out page freeing from Resize/Rebase.
Except for the offsets the code was identical. Also simplify the
conditions with early returns.

Change-Id: Ia7c44578ab06e571f6bf992db6c6d3493fd93230
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2582
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Hamish Morrison
c6657ffe02 Resize caches in all cases when cutting areas
* Adds VMCache::MovePageRange() and VMCache::Rebase() to facilitate
  this.

Applied on top of hrev45098 and rebased with the hrev45564 page_num_t to
off_t change included.

Change-Id: Ie61bf43696783e3376fb4144ddced3781aa092ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2581
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 21:56:56 +00:00
Justin Stressman
905284b397 Add examples to checkfs help output.
Fixes #11075
2020-05-08 19:35:53 +02:00
Adrien Destugues
1826e60db5 Do not locate DeskBar window by its name
The name changes when translations are enabled. Use the index instead.

Fixes #8982.

Thanks to X512 for catching the problem!

Change-Id: I3c4e943f8476e46e7378a50e83a7758f694a8dc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2606
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 14:03:03 +00:00
Adrien Destugues
2dc597d50d Optimize ffs() implementation
- Use gcc builtin
- Define as a static inline function in the .h so no function call overhead is needed
- Keep the function in libroot for backwards compatibility
- Remove a duplicate implementation in the freebsd compatibility layer

gcc2 does not document the builtin, but it is in fact already available
there as well.

Fixes #3281.

Change-Id: I94f8a2548637aa70e85febbfab06f07c1a427005
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2605
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-08 14:01:53 +00:00
Niels Sascha Reedijk
0cc9a12ae0 Installer: fix an issue where file attributes were not copied
The issue was introduced when the original CopyFile() and CopyFolder() methods
were integrated into a single recursive Copy() method in
bf551d3889

The installer originally followed the principle that attributes are not copied
for target directories that already exist. Unfortunately the new logic to
filter out that case disables attribute copying in recursive calls of this
method, thus breaking things like bookmarks and tracker templates.

Fixes #15913

Change-Id: I0dfe5ce30fdc78cfd4e3695b4b4e8c23b4848100
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2600
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: leorize <leorize+oss@disroot.org>
2020-05-08 13:00:04 +00:00
Autocomitter
362f1bd35b Update translations from Pootle 2020-05-08 12:15:28 +00:00
Adrien Destugues
20f2ebae4b Remove MouseDownThread and its usages
This code comes from an old Be Newsletter and since then the API
received the addition of SetMouseEventMask. In several places the
MouseDownThread was misused: it would spawn a new thread on every mouse
click and not clear the previous one. This could for example lead to
BSpinner skipping values if you clicked it at the right speed.

There are functional changes in BSpinner, before it updated for the
first time 100ms after mouse down, and then as you moved the mouse
around the button, now it activates immediately on first click and then
every 200ms (which may be a bit short). In other places, no functional
changes intended.

Change-Id: Ie600dc68cbb87d1e237633953e5189918bf36575
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2599
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-07 22:08:23 +00:00
Sergei Reznikov
7bf88c5132 Enable KeymapSwitcher automatically for some locales.
Change-Id: Ie3b49be07dd02227850cb0d7d2a7befca7992668
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2597
Reviewed-by: Sergei Reznikov <diver@gelios.net>
2020-05-07 22:07:58 +00:00
Emir SARI
5f7045a37b Enable "Accept First Click" (supplementary)
The setting still fails to set "Accept First Click" by default. So
hopefully this commit fixes it once and for all.

Change-Id: Ia8d2a1fdf575a524d675fcd8692a86677c9f4e22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2601
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-05-07 22:05:46 +00:00
Jérôme Duval
a94c4e5abf HaikuImage: add acpi_als
Change-Id: Iae4e9ddee1c6fcaba485470469e24fdf48bee661
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2579
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-06 15:03:12 +00:00
Emir SARI
3eb9476f43 Enable "Accept First Click" (supplementary)
As Axel mentioned, there is one more value to be changed. It should be
complete now. Ticket: #15953

Change-Id: Ibe09beb6a434f1572c5b3b3dfd7fced3b2af5935
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2580
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-05-05 23:48:26 +00:00