* Move "Create" as default button to the right, "Cancel" to
the left.
* Fix ESC triggering "Cancel" instead of "Create".
* Use B_INFO_ALERT when asking to create a folder.
* Use "OK" instead of "Cancel" for acknowledgement.
Change-Id: I15ab52ea9abc9c977f757efd27fa0e2232cf74f6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5946
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Uses the same format as the Terminal settings file
* Adds an additional key, "Theme name", to settings for themes,
which needs to be present for a theme to be loaded, else it
will be skipped
* Loads themes from Terminal/Themes in the data and settings
directories, searching data first, then settings second,
allowing a theme to be tweaked by putting a copy in a
settings folder
Change-Id: I8cadf98151459c1ae6098c38481b16eb3f2cf952
also set the background flag
Change-Id: Ie198476d666a0cd290520d15534afa3a73cf8a1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5936
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This patch adds an API call to BFont, called LoadFont, that
takes a string path to a font file. The user fonts are managed
via a new class called AppFontManager that inherits from the base
class FontManagerBase but adds the methods to add and remove user
fonts from disk or memory. There is also a new method called UnloadFont
to remove a user font, but on exit of an app all user fonts should be
automatically cleaned up.
Global/system fonts are managed by the GlobalFontManager, which is
a new class that also inherits from the base class FontManagerBase,
replacing the old "FontManager" class.
A maximum of 128 user fonts may be loaded, and memory fonts
may not exceed 20MB.
There's also an overloaded version of LoadFont that accepts
an area_id and loads the font from memory. A size and offset may
optionally be provided to allow for an area that contains more
than just a font.
Change-Id: I6add42bdf0c0cefc0e2e2a4984fd848c3e7269e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4790
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Shortcuts was a bit overzealous while filtering out modifiers on
B_KEY_DOWN message handling.
This allows to enter keys regardless of the state of caps, scroll, or
num-lock modifiers.
Change-Id: Ie204f8e7938214ca68f45404026c7959216e0fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5943
Reviewed-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
This work-arounds the issue of the VirtualMemory preflet showing
RAM FS volumes as valid storage options for the swap file.
Removing B_FS_IS_PERSISTENT didn't work as I originally expected,
causing problems when attempting to write/delete entries on RAMFS
mounts after that.
Kudos to waddlesplash for the B_FS_IS_REMOVABLE alternative.
Change-Id: Id5ba1fa192b63b944cf59413a7f580ebb608e50d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5911
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The API allows a user to end parsing responses earlier if the response has a
client (4xx) or server (5xx) error code. The end user should still be notified
of this result, so that they can act.
Change-Id: I11f2ab296658f767b5b34e10badb54de27aab494
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5910
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* aborted transfers will release the notify semaphore when the cancel is notified.
* the allocated buffer would be freed on return, while the usb stack eventually copied
data in the buffer in our back, leading to KDL crashes, because the freed buffer would
be right reallocated for some kernel team structures.
* regression introduced by hrev55806, the transfers didn't need to be cancelled before.
Change-Id: Ifb6e941f71d05c37c36f878059c33883bb72a67c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5905
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
* We needed this previously due to our gcc2 compiled kernel.
* Now that our kernel is always latest gcc, we can move to the
c++20 syntax for inline assignment.
* Improves compatibility with clang, less GNU-specific stuff
Change-Id: Ib7272a0a52554a31e9a0e788fd3f031db9049795
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5898
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Contributes a lot of spam to syslog on non-x86
Change-Id: Ia22a1f6d167b9a9576cca6694dca99d853dad2d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5902
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
On 32bit x86 gcc11, allocations should be aligned to 16 bytes, but the
block header (which is stored before the allocations) contains two
pointers, which on a 32bit system results in 8 bytes. Add some padding
to make this header 16 bytes, guaranteeing that the data area is
actually aligned.
Fixes#18111.
Change-Id: Id23f8c0272d75090710f872b728852cd0fcb19ac
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5885
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This makes sure that apps get access to these variables regardless if
they are started from a shell or from GUI (double-click from Tracker,
desklink, etc).
Fixes#18130.
Change-Id: I82e2884e460fad7d6ec16e7b624c5cd2fcf807df
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5897
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
... even when the "Generate image thumbnails" setting is off.
This allows applications to generate thumbnails for 'non-media' files.
For example I use this in the ACE Amstrad CPC Emulator, to add a
thumbnail to emulator savestates (snapshots) with a screen capture of
the machine.
Change-Id: I95b0e4c64f5b1ffa779512755f70cfd9c1881661
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5768
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: nephele <nep@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
We need O_CLOEXEC here, not FD_CLOEXEC (which is equal to 0x1, which
in openflags is O_WRONLY and thus leads to the conflicts caught by
the previous commit.)
Fixeshaikuports/haikuports#7524.
(cherry picked from commit 59e09f7beb)
Change-Id: I5751822ac48ae7a865755494da241e4bfd34c45f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5853
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Otherwise we will have open modes that could have both and lead to
confusion in code that presumes only one will be set.
This catches the cause of some ported software (e.g. Wayland layer)
misbehaving with ramfs mounted in /var/shared_memory: the ramfs does not
properly handle both flags set, and due to another bug, they are for
shm_open'ed files.
(cherry picked from commit 9bc250e28d)
Change-Id: I9e98be89b6d4a2da90f74c048b4f762ca9cf8738
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5852
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This will allow proper operation of POSIX SHM API (shm_open etc.).
Now memory files are stored fully in memory and do not affect disk
storage (except swap if enabled).
Change-Id: Iae3ce1afa968df72e82198e598a273cbf7cb0269
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5802
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This saves 16 bytes in the class vs. the old size, but more importantly
allows us to avoid allocating VMCaches and wasting an entire page for
any attribute larger than 32 bytes; instead, attributes can be up to
1024 bytes before we allocate a full page for them.
Unfortunately small files cannot take advantage of this optimization
right now as the cache is always used for them. I added a TODO about
this.
we detect basically the cpu info before loading the microcode,
to be able to detect the vendor, and avoid any update on hypervisor.
I couldn't test because my cpu doesn't have any update available.
Change-Id: I6aea830158423b3ee13b640be8a788fc9041e23c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5859
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* RemoveReference() could delete us immediately, thus we must do
all important work before invoking it.
* Add assertions about fRefCount and remove a spurious add.
* Do not use Link but PublishVNode on the root, as we manually manage
when this object is published/deleted.
Fixes#18032.
* We do not want to set fNode in the constructor but let the invocation
of Link() take care of doing so instead.
* Link/Unlink manipulate linked-lists. Thus it is dangerous to use them
in tandem on the same Node object. Add a check for this.
* Minor cleanup.
No functional change as-is, but this is necessary with some experimental
patches I am testing which add a lot more assertions to DoublyLinkedList,
which thus require it to have constructors/destructors for the Link class.
Previously it was spread all around the tree, and was not defined
consistently for all boot objects (there were a number of boot modules
which did not define it, but did include headers which checked for it.)
Now, as it is handled in SetupBoot which is invoked for all boot objects,
it will be applied consistently throughout. We can thus drop the manual
additions of it from all Jamfiles.