Commit Graph

2745 Commits

Author SHA1 Message Date
Owen
d64c7746c7 Add B_TRANSLATE_MARK_CONTEXT to Catalog.h and tools/CollectingCatalog.h
Fixes #13656

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-08-07 06:55:28 +02:00
Humdinger
99e5e3fd08 Package daemon notifications
* 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.
2017-07-31 19:09:38 +02:00
Jérôme Duval
d9823ef5a0 PrintJob: make struct print_file_header packed.
* also struct _page_header_: on x86_64, these would align to 8 bytes, which the code
doesn't handle well.
* remove beos leftovers.
2017-07-31 17:11:53 +02:00
Augustin Cavalier
a1ceb00059 Remove even more Locale Kit cruft.
Not included in the build and not used.
2017-07-30 14:46:41 -04:00
Adrien Destugues
01c1bb6223 Remove more Locale Kit cruft.
BNumberFormat is the way to go for all of this. This code was not even
compiled in.
2017-07-30 19:25:16 +02:00
Jérôme Duval
13dbf47109 Revert "BView: use off_t instead of long."
This reverts commit ab3a87ed6e.
2017-07-24 08:48:28 +02:00
Adrien Destugues
037ea84ba5 BNumberFormat: add Parse() and GetSymbol(). 2017-07-23 11:40:25 +02:00
Adrien Destugues
6cbcfc1911 BNumberFormat: cache ICU formatters
For performance reasons, it is a good idea to keep the formatters
instanciated, instead of re-creating them each time we need to format a
number.
2017-07-23 10:24:02 +02:00
Adrien Destugues
0e4ad75e47 Remove more unneeded files from the Locale Kit
All of this is replaced by the single BNumberFormat class.
2017-07-23 09:15:42 +02:00
Adrien Destugues
b7cc4ccde6 Remove remaining include of FloatFormatParameters.h. 2017-07-22 19:47:07 +02:00
Adrien Destugues
1d6af34b9a LocaleKit: remove obsolete files.
Formatting floats is handled by BNumberFormat already.
2017-07-22 12:59:12 +02:00
Jérôme Duval
ab3a87ed6e BView: use off_t instead of long. 2017-07-21 18:57:57 +02:00
Jérôme Duval
952318fe76 Bump B_HAIKU_VERSION to B_HAIKU_VERSION_1_PRE_BETA_1. 2017-06-12 21:03:36 +02:00
Augustin Cavalier
39efd913c1 Switch to a 64-bit time_t everywhere except 32-bit x86.
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.
2017-06-06 17:38:17 -04:00
Adrien Destugues
2b204c565c Remove deprecated BCollatorAddOn and implementations.
Leftover from initial import of the locale kit from OpenTracker. We are
now using ICU for this, so specific add-ons for each language are not
needed.
2017-05-29 08:52:44 +02:00
Adrien Destugues
a19a18f553 Rework BCollator API
- 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")
2017-05-29 08:52:43 +02:00
Akshay Agarwal
f5c544b59a Fix style formatting issue in BTimeUnitFormat, update BDurationFormat accordingly.
* 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
2017-05-17 19:53:46 +02:00
Jérôme Duval
133e4131fe Added some support for GCC 8. 2017-05-13 11:37:22 +02:00
Alexander G. M. Smith
5e7964b0a9 Remove Spurious B_BEOS_DATA_DIRECTORY
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>
2017-05-08 22:17:53 +02:00
dsizzle
9b6b158b88 Implementation of BFont::Blocks
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>
2017-05-08 22:17:53 +02:00
Dario Casalinuovo
c0ef5b2b7c MediaFile: Little refactor to use the MediaStreamer class
* 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.
2017-05-04 14:08:07 +02:00
Adrien Destugues
b68cf9d6f6 elf.h: add more architectures.
Mostly I need EM_AVR to build avrdude on Haiku.
2017-04-11 18:59:06 +02:00
Alexander von Gluck IV
6516aed58b network preflet: Make InterfaceListItem dumber
* Allows us to use InterfaceListItem for non-physical
  interface things (like a VPN connection)
2017-04-05 18:46:10 +00:00
Fredrik Holmqvist
e5c95a01ff Use 64 bit addressing for ACPI on 32 bit builds.
32 bit builds with PAE are so much fun. It's like
64 bit without all the extra registers...
2017-03-28 21:34:42 +02:00
John Scipione
388ac82baa BString: Add IStartsWith() and IEndsWith() methods
Case-insensitive version of StartsWith() and EndsWith()
2017-02-21 18:03:03 -08:00
Adrien Destugues
f9e1854f19 libbnetapi: fix access to HTTP headers
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.
2017-01-30 20:27:52 +01:00
Kacper Kasper
2332ebfd52 ControlLook: Add side parameter to tab drawing functions.
* This allows drawing tabs on any side of the view.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2017-01-22 09:36:38 +01:00
Adrien Destugues
bdd02e0d9d BString: rename SetCharAt to SetByteAt
Makes it clear that it operates on bytes, not unicode codepoints.
Thanks to mmlr for remembering me of this subtlety.
2017-01-12 22:03:51 +01:00
Jérôme Duval
0c5219a1d6 Restore missing symbol _ZN7BStringixEi on x86 and x86_64.
* Vision and others were broken after 3eac8208df.
* this adds BStringRef in the backward compatibility section.
* fixes #13199.
2017-01-12 21:23:50 +01:00
Adrien Destugues
3eac8208df Remove BStringRef and users.
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.
2017-01-11 20:50:41 +01:00
Dario Casalinuovo
3ef4b20086 Make BMediaRecorder public
* Fills a functionality lack of the classic media_kit.
2017-01-10 21:34:20 +01:00
John Scipione
e1304871bb Revert "BWindow: CenterOnScreen a bit above center"
This reverts commit a5be1832cc.
2017-01-01 12:25:05 -08:00
John Scipione
a5be1832cc BWindow: CenterOnScreen a bit above center
BWindow docs: Document changes to CenterOnScreen()

https://68.media.tumblr.com/d8dff7a17b9d90b41e32c5a2a0312513/tumblr_oj2wg1tmKs1r0f0hfo1_1280.png

Will revert if not appreciated.
2016-12-31 18:06:55 -08:00
Adrien Destugues
2c26ad4b39 move BUrl to the support kit
It is used by the media kit, which created a dependency from libmedia to
libbnetapi to openssl.
It is not entirely specific to the network kit, there are some use cases
that don't involve network at all.
2016-12-29 16:38:53 +01:00
Rene Gollent
4ee47fe9e8 BListView: Cleanup, no functional change.
- Rename _FontChanged() to _UpdateItems() to more accurately reflect its
  purpose, as discussed on commits list. Adjust callers accordingly.
2016-12-25 16:16:43 -05:00
Adrien Destugues
fda0bf77fb Revert "repo rework: Re-add compatibility url field"
Revert "repo rework: Remove stubs; Breaks repo compat."
Revert "repo rework: Remove need for repos to be self-aware"

This reverts commit a2b2f4d642.
This reverts commit 602076ef82.
This reverts commit 5ffaf72c8a.

These changes break the build on Haiku and the ability to create repo
mirrors, for the lack of a replacement for the URL (an UUID was evoked
on the mailing lists, but not implemented).

We are due for a release soon, please don't break the build.
2016-12-10 12:55:56 +01:00
Alexander von Gluck IV
602076ef82 repo rework: Remove stubs; Breaks repo compat.
* These stubbs satisfied older Haiku releases that
  required the URL
* Users running nightly images will need to upgrade
  to hrev50723 - hrev50744 before upgrading further
* Getting this out of the way now before the beta
  comes out.
* New installations shouldn't suffer any problems.
2016-12-07 21:27:56 -06:00
Alexander von Gluck IV
5ffaf72c8a repo rework: Remove need for repos to be self-aware
* See #12917 for details.
* Squashed to one commit to make revert easy if we
  run into any issues.
* pkgman is now pre-attached to the 'current' repo
  version within nightly images so they can be updated
  by default.
* This shouldn't impact us keeping older sets of package
  versions by commit hash for building older hrevs.
* There are XXX stubs with "Kill me". These will need
  to be dropped after users are given sufficent time to
  upgrade. We're dropping a previously required field (url)
  so making this a slowish roll out.
* Makes the repos a lot less restrictive which should
  help PM package building automation be a bit easier.
* Once this stuff smooths out, we'll add UUID's to the
  repo definitions for duplicate repo detection.
2016-12-02 00:41:06 -06:00
Adrien Destugues
12431ebff4 listusb: dump video streams from UVC devices. 2016-11-02 15:26:04 +01:00
Adrien Destugues
e64640878a listusb: parse UVC devices
- Various cleanups to the USB-audio side, which is similar
- Add in the UVC (USB Video) specific info with parsing of some of the
  descriptors (most of the "control" part).
2016-11-02 15:26:04 +01:00
Adrien Destugues
b32f51ce49 elf.h: add ELFMAG* constants
Needed by libelf, when elf.h exists.
2016-11-01 10:30:54 +01:00
Adrien Destugues
ed31589c37 URL Disaptching/Async listeners: forward debug messages
This makes it possible for the Asynchronous listener to get the
messages. It can then process them in a more fancy way.

The default implementation will still log the messages to the console
(if debug is enabled), but it will do so from the Async listener for
asynchronous requests now. This means they will probably be logged from
the same thread, and show up in a more readable way.

This also makes it possible to listen to several requests and log them
in a nice way (in a status window or whatever).
2016-10-31 22:14:39 +01:00
Andrew Lindesay
cf65729463 Url: implement same URL parsing logic in C/C++ code
- Remove uses of group matching regular expression, not available on all
  build hosts,
- Parsing is faster than our old regexp engine.

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

- Fixes #13002
- Fixed some indentation (tabs vs space), please configure your editor
  properly.
2016-10-31 09:14:44 +01:00
Dario Casalinuovo
3588e74aef BMediaEventLooper: Return to simple lateness computation
* Remove enqueue_time again.
* Lateness seems generally useless. No way to get something useful
experimentally. The commit noise however was useful, the port wait is
behaving more in accordance with the lateness calculus.
* Fixes #12817 and possibly #12594.
2016-10-20 03:11:01 +02:00
Dario Casalinuovo
0c98ab27d3 BMediaFile: Add BUrl SetTo
* Also fix the server version of BUrl constructor
to use a const reference.
2016-10-20 02:26:25 +02:00
Kacper Kasper
dd074cc7dc Style fixes for Errors.h.
No functional change intended.
2016-10-04 18:44:58 +02:00
Adrien Destugues
c4da848565 BTextEncoding: even more style fixes. 2016-09-27 20:41:26 +02:00
Adrien Destugues
a71b10d760 BTextEncoding: fix naming and move to BPrivate namespace. 2016-09-27 20:38:58 +02:00
Adrien Destugues
32afcc5cc5 Style fix in Locale Kit headers.
As pointed out by Axel, the wrong style was used in these headers we
inherited from OpenTracker days.
2016-09-27 19:34:52 +02:00
Adrien Destugues
a95053ddb7 TextEncoding: Style fixes to header.
As pointed out by Axel.
2016-09-27 07:20:47 +02:00