Commit Graph

61675 Commits

Author SHA1 Message Date
Augustin Cavalier
b022a5e224 BScrollView: Ask the BScrollBars what their preferred sizes are.
This replaces the use of the hard-coded scroll bar size constants
and instead asks the scrollbars for their preferred sizes directly.

Right now, this is a giant no-op since BScrollBar just returns
the same hard-coded size when asked. The next commit will, however,
change that.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
9481a1ec39 BScrollBar: Unify PreferredSize computations.
Reduces code duplication. This should not significantly affect
actually computed sizes.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
9fe3529f3e BScrollBar: Remove DISABLE_ON_WINDOW_DEACTIVATION constant.
It was always enabled, and disabling it would break ABI.
If we want to make it disable-able, it needs to be a setting,
but I don't really see a reason for that.
2020-07-05 18:37:48 -04:00
Augustin Cavalier
e9815ed8b6 BScrollBar: Move SCROLL_BAR_{...}_KNOB_SIZE constants into the source.
They were not used anywhere else in the tree anyway. Resolves a TODO.
2020-07-05 18:37:48 -04:00
Leorize
a3f0ca5023 tests/system/kernel/vm/Jamfile: remove non-existent
This non-existent file causes unittests builds to fail.

Change-Id: I0ea2164487279fefcbc9e5c930440db3f2e6ccb9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2969
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 21:16:20 +00:00
Andrew Lindesay
9295c1f645 HaikuDepot: Url -> Identifier
This change will rename the confusing "url" within
HaikuDepot to be "identifier" in line with
corresponding changes in pkg kit and HDS.  Also at
the same time support is introduced for HDS
repos' meta-data to artificially match against
multiple repos; as requested for the future R1B3
release process.  Some tidy-ups and extensions have
been made to the JSON schema-to-model and the
schema-to-parser scripts.

Change-Id: I402e7d610986039f58d72028bda7de977e9115e2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2986
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 09:41:54 +00:00
Andrew Lindesay
66a4cd11c2 HaikuDepot: Custom List Removal
Remove use of custom list class where it is not
really required.

Relates To #15534

Change-Id: I4bdc258a64055b6e36c7be93672c52d0499e512b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2991
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-05 09:13:38 +00:00
Augustin Cavalier
981f67b9c8 BAlert: Add cast to appease GCC2. 2020-07-04 19:35:20 -04:00
Augustin Cavalier
9a0cae9d28 BButton: Use BControlLook for label spacing instead of a constant.
This gets button proportions under HiDPI much closer to the ones
under a default font size. Still not quite there yet, though.
2020-07-04 18:43:30 -04:00
Augustin Cavalier
2d68cd06c7 HaikuControlLook: Scale frame insets.
This is a pretty simple change, but has a noticeable effect
on insets throughout the system under HiDPI.
2020-07-04 18:42:45 -04:00
Augustin Cavalier
cf7c2ea69d BMenu: Make margins/padding more HiDPI-aware.
This greatly improves the appearance of menus under font-scaled systems.
The computations are written such that the margins should be unchanged
under a 12pt font size.
2020-07-04 18:19:26 -04:00
Augustin Cavalier
99e4ca5fc7 BAlert: Use factional scaling for icons.
The behavior of not making the icons smaller than their default
pixel size is (for now) kept, but when making them larger,
fractional scaling is now used.

This makes alerts look much better on my system, which has a font
size of 18 (i.e. 150% normal, so 32px -> 48px.)
2020-07-04 17:57:06 -04:00
Alexander von Gluck IV
89fd39f42a efi: Refactor CPU code to be arch-specific
* Migrate some platform agnostic architecture code into
  boot/arch from efi/arch. This helps to avoid conflicts
  between kernel and boot sources as well.
* Conflicts between arch_cpu in efi and kernel code means
  bootcode really should *never* directly use kernel arch
  headers. (other platforms don't, which is why they don't
  have this same issue)
* We carefully thread any needed kernel headers (namely
  assembly helper macros) into the bootloader headers without
  mixing in the whole conflicting kernel/arch headers.
* ARM now properly get its cpu init code called, and we
  progress further into the EFI bootloader.

Change-Id: If67ec9758b5ce68563ebd9eb45d5196401911c67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2975
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 21:04:20 +00:00
JadedTuna
1f2666fd48 preferences/screen: Call _UpdateActiveMode after brightness is reset
* Make sure brightness is reset to properly disable the Revert button.

Fixes #16354

Change-Id: I4551e809db316db05f3fd9db361b8703d149a88b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2989
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 16:50:51 +00:00
X512
d9d96260e0 BMenu: speed up deleting items
Fixes #16336.

Change-Id: Ie941f45f363f6fe94062fc3acb8bd3bb876c1f1e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2976
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-04 16:49:55 +00:00
Autocomitter
9802849814 Update translations from Pootle 2020-07-04 08:14:21 +00:00
Augustin Cavalier
8da1468de6 arpa/nameser.h: Fix build on GCC8.
ssize_t comes from sys/types.h.
2020-07-03 15:30:00 -04:00
Suhel Mehta
239a1c3561 ufs2: implementing open_dir and read_dir function
Root directory is read sucessfully.

Change-Id: I8bdc8c1a52edb679a6cb4b5f70e7f42eb2b2c8f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2907
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 19:21:06 +00:00
Augustin Cavalier
4a230cfc6c SPARC: Remove ancient BSD arch headers.
None of these were used; they were all imported with the original
root Haiku commit, and they are totally unrelated to PulkoMandy's
new SPARC work. Plus, they were also under a BSD Advertising Clause
license.
2020-07-03 15:13:24 -04:00
Augustin Cavalier
657f041aee fnmatch: Replace BSD implementation with musl one.
The BSD implementation was under the Advertising Clause,
so we might as well take the opportunity to replace the
implementation entirely with musl's.

Header also rewritten to be a Haiku one; the constants
are left unchanged of course.
2020-07-03 15:09:33 -04:00
Augustin Cavalier
6996e5b271 headers: More removal of the BSD Advertising Clause.
Taken from FreeBSD; some minor cleanup elsewhere.

udp.h rewritten entirely as it contained no copyrightable
material and bears little resemblance to BSD's.
2020-07-03 15:00:37 -04:00
Augustin Cavalier
ebffd73fc5 arpa/nameser.h: Cleanup.
* Remove functions not even FreeBSD defines.
 * Remove dependency on unnecessary headers.
 * Update copyright headers to match FreeBSD's; includes
   removal of the advertising clause.
 * Move some private structs to netresolv port_before.

Unfortunately, it seems musl implements very little of this file,
so we may wind up sticking with netresolv for its implementation.
2020-07-03 14:27:17 -04:00
Kacper Kasper
2899294cf1 app_server: Fix assert in DrawStringDry
Change-Id: I58b86860367df86b77bbdffadeff9843c9c8ab11
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2958
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 08:15:17 +00:00
CruxBox
7e1b5cf809 xfs: An attempt at reading shortform dir
This patch gets read_dir, lookup and few others to work. Entries cannot
be listed yet except the root.

Change-Id: Ic4b7b61a794a1b75849e45777a383b3315b15aa8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2915
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-03 08:13:27 +00:00
waddlesplash
66f0993a1b Revert "BMenu: fix memory leak in scripting"
This reverts commit fb44a1cd72.

Reason for revert: may cause UAFs

Change-Id: I315ce4fc5cd1706ca07e7062fc0461b7fff7c831
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2980
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-03 03:02:12 +00:00
Augustin Cavalier
1eabd14811 Network: Update DNSSettingsView after previous API deprecation.
Create a res_state on the stack and initialize it instead of using
the private API.
2020-07-02 19:35:07 -04:00
Augustin Cavalier
1a3518cf75 Add missing includes after previous commit. 2020-07-02 19:34:54 -04:00
Augustin Cavalier
2ed1a36d4b resolv.h & netdb.h: Clean up and simplify.
* Remove all functions and a number of constants that neither
   glibc nor musl define or support (and even FreeBSD does not
   declare a good number of these anymore.)
 * Redeclare the primary flags in terms of (1 << X) instead
   of raw 0x... for readability (the constants at the end
   do NOT match up to their definitions in glibc, musl, and BSDs!)
 * Remove usage of unneeded headers, and __BEGIN/END_DECLS.
 * Replace non-Haiku license headers with the ones from FreeBSD,
   which notably contain a removal of the advertising clause.

ABIs remain unchanged, but a small set of applications that
use these esoteric APIs may not compile anymore (are there
any remaining?)
2020-07-02 19:33:51 -04:00
Augustin Cavalier
d91d9fe552 netresolv: Use a copy of resolv.h internally.
The next commits will remove libbind-isms from the public resolv.h,
which netresolv still uses, so it will need its own copy to continue
building.
2020-07-02 18:52:38 -04:00
Augustin Cavalier
22a5213517 padblocker: Remove unneeded SetSubDirSupportedPlatforms... 2020-07-02 18:52:01 -04:00
X512
fb44a1cd72 BMenu: fix memory leak in scripting
Change-Id: Ia283594a622f758189cc8280683a4e068ae1f3af
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2978
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-07-02 19:26:49 +00:00
Alexander von Gluck IV
b4e10d71e6 arm64: Attempt to build efi bootloader
Change-Id: I90a9440898994459f8d6de922a3f363fbeddaaf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2974
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-01 13:47:07 +00:00
Humdinger
a4462d205d ShowImage: Reset slide show delay if a user interferes
This change resets the delay when the user moves to next/previous image or
page within an image (e.g. TIFF) or deletes an image while a slide show is
running.

Fixes #16321
Change-Id: If0b8f4caef9c6aa4c0ad5bbb01d65bf43c1f831f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2967
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-07-01 12:35:51 +00:00
François Revol
4bfd65a2b7 system/boot: Fix relocations in ARM EFI loader
The .rel.* sections were forgotten in the PE binary, so we just put them in a single .rel

Change-Id: I7bc564e18ec8dd64410b43106272ee74696c2883
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2973
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-06-30 16:25:07 +00:00
Kacper Kasper
009df98c86 app_server: Fix gcc2 build 2020-06-29 19:44:57 +02:00
Humdinger
72fcffef9d Installer: GUI change initialize -> format
DriveSetup terminology was changed a while ago. Disks get 'initialized'
with a partition map. Partitions are 'formatted'.

Change-Id: I600145cdd1ed622378d364aa66a6146aae4a9a87
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2968
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-29 17:20:21 +00:00
Alexander von Gluck IV
595b4d406e efi: Ensure MultiBootSubDirSetup runs in arch directories
* Otherwise, important HAIKU_BOOT_* flags don't make it into
  the build commands.
* Ensure any external sources used by EFI get recompiled
  vs reused due to potential differences in wchar length
  (EFI dictates short-wchar, but no wchar's in our code)

Change-Id: I7a4a0347d39239c73fa510378e048f51be1cd360
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2965
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 16:20:37 +00:00
Alexander von Gluck IV
9f739dd2e8 u-boot/arm: Break script out of Jamfile. Add EFI support.
* boot.scr was growing past Jam MAXLINE and was causing segfaults
* Break out to tree, data/boot could be used for other arches
* boot.scr is getting a bit complex, but supports the old
  u-boot haiku_loader, as well as u-boot starting our EFI loader.

Change-Id: I93a3167ab0bc78747c1d70fedd08595e9ac89662
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2963
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 16:18:32 +00:00
Kacper Kasper
97bd6fe8d4 app_server: Implement more composition modes
* Use agg::comp_op classes to blend pixels.
* Subpixel path not implemented.
* Needed by WebKit.
* Implements #10274.

Change-Id: I07b0002196fd0a05fc100bd9f6d703c33cadc85b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2932
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-29 14:07:42 +00:00
X512
cc30c791bd TV: fix scripting
Change-Id: I84e8f87ff7f84d0624bfea72c2e12d148a5a2562
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2959
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:42:52 +00:00
X512
213e62a7a0 Input: fix MouseView drawing
BeginPicture/EndPicture do not save state so origin should be restored
after recording picture. BView::Draw use PushState internally so origin
is added and cause problem.

hrev54347 fixed behavior when recording picture so state change is
affected. It revealed #16317 bug.

Fixes #16317.

Change-Id: Iee69631ce83fea5ea73c99b492b8cf67d1b148c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2960
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:39:42 +00:00
Adrien Destugues
445f9c6c92 IPP: Accept replies without content-type
My printer doesn't include a content-type in its replies.
If a content-type is present, it should be the expected one. But if the
printer doesn't specify it, we can try to parse the reply and see if it
makes sense. Since the reauest has a content-type, it's reasonably safe
to assume the reply will match the requested content type.

Change-Id: I0fce7edd7cc40d2761b683d3e4c7b5316436e298
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2962
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:37:30 +00:00
Adrien Destugues
33984e7b7d IPP: remove custom URL implemenation.
Use BUrl.

Change-Id: I40ce72fc34b2ba4f5980eee3cc81cba58c74a43a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2961
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-28 21:37:30 +00:00
Heinrich Schuchardt
35323f65d5 efi: create map file
When debugging the EFI bootloader it is helpful to have a map file
available.

Write file efi.map when linking.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Change-Id: I6d566df50fb2713f53375970f6645353bac54042
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2964
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-06-28 21:04:29 +00:00
Andrew Lindesay
dc8d6e73f8 HaikuDepot: Custom List Removal
Remove use of custom list class in the python-
generated model classes for interaction with
HDS; use STL container classes instead.

Relates To #15534

Change-Id: Ib8f4942b55859c1af38da816591e911174ba52ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2957
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-28 08:39:20 +00:00
X512
43def5e333 Fix source code encoding
Make it correctly readable as UTF-8 encoding.

Change-Id: Ifef77aa988b8d45c485927b698526e234711425c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2955
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-27 16:58:05 +00:00
Murai Takashi
c23cd33c75 file_systems/fat: Fix usage of sizeof()
Fix suspicious usage of 'sizeof' with a numeric constant
as parameter.
Pointed out by cppcheck.

Change-Id: Icf43843bb92b3db0634c20ddce38e2fe1099c552
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2954
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-06-27 15:09:04 +00:00
Autocomitter
1a83eab65b Update translations from Pootle 2020-06-27 08:16:31 +00:00
Murai Takashi
6b3cfabfd4 libnetapi: Fix if condition
Fix length[0] != '+' could not be checked.
Pointed out by cppcheck.

Change-Id: Ic4697dc9ffd04afcd92ef3ed65485e1fe3f32e76
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2950
Reviewed-by: leorize <leorize+oss@disroot.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-06-26 23:50:53 +00:00
Axel Dörfler
1487a24238 lsindex: Fixed wrong errno code to be shown
* When we want to inspect errno after readdir() (or fs_read_index_dir(),
  which is the same), we need to reset errno beforehand as documented
  in the OpenGroup Base.
* Minor coding style, and license header fixes.
* This fixes the wrong error code from #16301, but not the underlying
  issue.
2020-06-25 22:21:23 +02:00