It is not a good idea to have a thread get an address from the request
cache, while another thread is deleting said address as the cache has
grown too large. Add a lock around the cache access to make it safe.
Since it handles physical address it should really be this.
It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
Accelerant interface:
Introduce new hooks B_SET_BRIGHTNESS and B_GET_BRIGHTNESS. Brightness is
a float in the 0..1 range.
App_server:
Forward brightness things between BScreen and the accelerant.
intel_extreme:
Implement the hooks. Note that this only works for laptop panels, but
the driver will pretend to support it in other cases as well.
Screen preferences:
If the accelerant supports the B_GET_BRIGHTNESS hook, allow to set
brightness with a slider. Otherwise, the slidere is hidden and these
changes aren't visible.
This should have been done along with the time_t change, but I forgot
to check this then.
Technically this breaks ABI against BeOS, but:
1. BeOS used an int32, so we'd already slightly broken ABI here
2. Only one thing at HaikuArchives (VMwareAddons) and one recipe at HaikuPorts
(samba) uses this function at all.
If it turns out some critical BeOS app uses this, then I guess we can enclose
GCC2 guards around it, but since I can't find any evidence of that, I'm
pushing it without them for now.
All of its prior functionality has been moved into HaikuControlLook.
This paves the way for customizeable control looks, which I intend to implement
in the future as part of decorators.
This is being pushed now because libbe ABI was already broken due to the
Notifications changes, so this is riding that so we only have to do a mass
rebuild once.
Notifications preflet:
-Use sliders instead of text fields for width and timeout
-Remove icon size choice (mini icon looks horrible)
-Consolidate both "Enable" checkboxes into one
-Fix Revert button, remove Apply button, add Defaults button
-All changes to settings saved immediately
-Live example notification message shown when settings changes are made
-Add setting for individual apps to specify whether their notifications
should be muted
-Remove history list (to be implemented later)
BNotification class:
-BNotification records the signature and name of application that
created it
-New functions to get source application signature and name
Notification Server:
-Notification pop up view layout fixes and bold font size fix
-Remove notifications history from AppUsage class (will be saved in
cache instead)
-Remove vector of NotificationView objects which isn't needed
-Get source application info from notification object, not the received
message which is not reliable
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
It can give results such as "in 2 hours", "2 days ago", etc.
This is different from BDurationFormat which will just say "1 hour, 2
minute and 36 seconds"
* Sentence casing
* Localize notification texts in the package kit
* Have "Package daemon" as group name and "Warning" as title
* Use ::BPrivate in Bitmap.h to solve an ambiguity (as pointed out
by PulkoMandy). Though not needed for my changes any more, since
a the icon of the notifying app is now shown by default.
Fixes#13590.
Thus, BeOS compatibility is preserved (and there is no risk of
breaking GCC5<->GCC2 interoperation on hybrid builds.)
This commit only makes the actual change, the build fixes are
in the next commit.
- Strength is now set once, instead of at each comparison, to improve
performance and fix potential locking issues
- Add a way to enable "numeric" collation (aka "natural order")
* Issue: BTimeUnitFormat doesn't incorporate style formatting while
formatting a time unit. Format() does take style as an argument but the
style is not used anywhere. So currently the abbreviated style doesn't
work and by default the time unit is formatted to the full style.
* Fix: Move the style flag from BTimeUnitFormat::Format() to the
BTimeUnitFormat constructors and call the relevant icu::TimeUnitFormat
constructor. Map the Haiku defined style unit to the corresponding ICU
unit. Move the style flag from BDurationFormat::Format() to the
BDurationFormat constructors to map the changes in BTimeUnitFormat.
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes#13508
There is no DATA directory in BeOS, and its FindDir() doesn't implement
it. No need for a confusing backwards compatibility to something that
doesn't exist (had my hopes up, was going to move some non-executable
files from AddOns to Data in a program that works in BeOS and Haiku).
The removed enum label doesn't change the directory_which enum order
or count, as it was aliasing the value of another existing enum label
(B_SYSTEM_DATA_DIRECTORY).
Fixes#13470
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
BFont::Blocks is now implemented in ServerFont, via a call through the
app_server. It uses fontconfig to iterate through a charset of a font
and stores the defined blocks in a bitmap.
A new API was added, BFont::IncludesBlock, that will allow for arbitrary
testing of a given Unicode block. Since nothing is cached, searching
through an entire charset for a series of Unicode blocks can be quite
slow. In a given block there may be only 1 or 2 characters actually
defined so every character within a block needs to be checked until one
is found, which in a degenerate case will mean the entire block is
checked.
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
* This clarify the ownership of the source when using the experimental
API.
* The extractor/writer are simplified and don't have to care about
adapters.
* MediaStreamer is able to provide a generic BAdapterIO that is
suitable also for different uses than the codecs API itself.
The asynchronous listener had no reliable way to access HTTP result and
headers from the callbacks. As the callbacks are triggered
asynchronously, they can be run after the request has carried on and,
for example, followed an HTTP redirect, clearing its internal state.
The HeadersReceived callback now passes a reference to BUrlResult for
the request. There are two cases:
- Synchronous listener: passes a reference to the request's results
directly
- Asynchronous listener: archives a copy of the result into the
notification message, and passes a reference to the unarchived copy.
Unfortunately this comes with several ABI and API breakages:
- Change to the prototype of HeadersReceived()
- Change to the class hierarchy of BUrlResult (implements BArchivable)
All users of HTTP requests will need to be updated if they implemented
in HeadersReceived or used BUrlResult.
As discussed in 2008
(http://www.freelists.org/post/haiku-development/BString-on-GCC4,1),
this class was not efficient because of lack of inlining. Implement the
suggested solution of a SetCharAt method instead. Also add a CompareAt
which covers a specific use case in KeyboardLayout.cpp.
Adjust all places which were using this feature to safer APIs.
Also fixes a copypaste error in FormattingConventions.cpp.