Commit Graph
100 Commits
Author SHA1 Message Date
Adrien Destugues a911a53fa6 HIG: Fix missing closing tag. 2017-08-07 18:05:58 +02:00
Adrien Destugues 2459b6db4f CID 701865: missing break in switch. 2017-07-30 22:50:07 +02:00
Adrien Destugues 2093ede6bc CID 603359: missing break in switch/case. 2017-07-30 22:39:03 +02: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
Adrien Destugues 979a0b6a20 xhci: Fix fuplicate trace.
Makes reading the logs a little less confusing.
2017-07-30 15:06:05 +02:00
Adrien Destugues 6f1ae3c88f XHCI: fix tracing
- The XHCI version register is at offset 2, but we can't do a 32-bit
read at that address. Instead read at address 0 and shift. Fix a freeze
on my system (this register is currently used only for tracing, but I
noticed my USB controller implements version 0.96 and not 1.0 of the
spec, so maybe this will have to change). All other registers in the
capability area are already properly aligned.
- Usual printf type mismatch error in xhci.cpp.
2017-07-30 13:39:14 +02:00
Adrien Destugues 1b707a6822 fix libdsk provides
forgot to change the library version when updating the package.
2017-07-30 10:00:43 +02:00
Adrien Destugues f0f458ebea Remove glow from boot logo.
It looks better without it.
Note: beta and "development" images not adjusted. We don't have the
wonderbrush sources in the repo for these, apparently.
2017-07-29 12:27:50 +02:00
Adrien Destugues f40841ac86 BNetworkRequest: fix _GetLine on empty lines.
On an empty line terminated by \n, we would access the temporary buffer
(stack allocated) with an index of (uint32)-1. On 32bit machine this
would just read the byte before the array on the stack, but on 64bit it
would crash.

Check that the length is at least 1 before trying to access a character
in the array.

Fixes #13625.

Thanks to accessays for proofreading the code:
2017-07-28 21:59:19 +02:00
Adrien Destugues 615ef07db3 libnetapi: missing NULL check. 2017-07-28 21:08:54 +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 0597752447 Remove full date format from Tracker date columns
It is too similar to the long format and does not add much value.
And it creates some problems with using a locale format with another's
string.

Fixes #11343.
2017-07-22 19:23:42 +02:00
Adrien Destugues 1416521f10 Notifications: default to application icon.
It is possible to SetIcon(NULL) to remove it.
But in msot cases we want the application icon to be the default.

as discussed in #13590.
2017-07-22 16:11:25 +02:00
Adrien Destugues 1d6af34b9a LocaleKit: remove obsolete files.
Formatting floats is handled by BNumberFormat already.
2017-07-22 12:59:12 +02:00
Adrien Destugues e433b3cfc3 DiskUsage docs: update screenshots.
- Why were we using old BeOS screenshots here?
- Why is this not part of the user guide anyways?
2017-07-22 11:30:52 +02:00
Adrien Destugues 54de05d9d7 Fix error handling in PNG trnalsator
The default error handling code in libpng uses setjmp/longjmp. This is
annoying, because stack variables may be corrupt, unless they are
declared volatile.

Instead of declaring everytihng volatile, we can tell libpng to use
custom error functions, which will throw a C++ exception, making the
code more readable and less crashy.

Also handle the png_read_end function returning errors without failing
the whole decoding. This happens for example in the old diskusage
documentation screenshots, where this function fails after the image was
completely and correctly decoded. Ignoring the error lets ShowImage show
these pictures.

Fixes the crash reported in #6775.
2017-07-22 11:30:52 +02:00
Adrien Destugues ae2c5eeeab SerialConnect: handle cancelled file transfers.
The remote can cancel a file transfer by sending a CAN character.
Handle this by stopping the transfer and hiding the progress bar.
2017-07-16 16:11:47 +02:00
Adrien Destugues cd4d3a3010 SerialConnect: implement XMODEM-CRC
This is a common extension to XMODEM, which replaces the checksum with a
more resilient CRC.
The receiver must explicitly enable this, so if the receiver doesn't
handle it, the traditional checksum is still used. Hence, this is
backwards-compatible with XMODEM.
2017-07-16 16:00:10 +02:00
Adrien Destugues ce058fa0a9 SerialConnect: implement XMODEM send. 2017-07-16 10:21:22 +02:00
Adrien Destugues 971c5704d5 Nebula: 64bit fix.
The code is written with 32-bit in mind, but "long" isn't always that
size.

Should fix #13604.
2017-07-16 08:11:42 +02:00
Adrien Destugues 3701b2c381 Update mesa and llvm for x86_gcc2 2017-07-06 13:02:22 +02:00
Adrien Destugues 50e5994999 Fix libepoxy provides. 2017-07-05 13:08:49 +02:00
Adrien Destugues 021ffa56b9 Add libepoxy (and update dependencies) 2017-07-04 19:29:00 +02:00
Adrien Destugues 870ff72ee2 Update some packages for x86_gcc2
- hub: had an annoying problem preventing to run the script directly.
Now uses a proper "shebang" so it finds ruby.
- mako, setuptools: needed to build Mesa.
- neonlights: my favorite screensaver.
- python 3.6.
- advancemame, for arcade gaming on Haiku.
- sox and gnuplot, for various experiments.
2017-07-04 08:22:20 +02:00
Adrien Destugues ff5c2dc23b FileListener: does not need to be asynchronous.
The asynchronous listener is meant to be used when the functions are
meant to be called from the main thread (or another looper the listener
is explicitly atached to).

For this to work, the request should be attached to
listener->SynchronousListener(), which was not the case here. Assume it
is fine for the functions to be called from the HTTP thread directly
then (if I'm wrong, revert this and attach the synchronous listener to
the http request, however wihout further changes it will just move the
execution of the callbacks to the main thread, which may not be the
right place either).

This fixes a crash when exiting WebKit while playing a youtube video
(somehow the handler isn't cleanly deleted and removed from the main
looper there - going without a handler at all fixes this).
2017-06-28 22:19:18 +02:00
Adrien Destugues bb0d0ea2e3 pc_serial: cleanup, no functional changes
- Improve readability of code to detect serial debug
- Rename usb_serial_* functions to pc_serial_* (code was copied from the
  USB serial driver)
2017-06-25 07:54:02 +02:00
Adrien Destugues 36576214eb Remove __STDC_FORMAT/CONSTANT_MACROS
These were added in C99 to avoid interferring with C++, but then C++11
caught up with inttypes/h/stdint.h and removed the need for the macros.
They have disappeared from C11 as a result, and also from current glibc
implementation (https://sourceware.org/bugzilla/show_bug.cgi?id=15366)

So it seems reasonably safe to do the same, and it will save people
having to enable access to these macros explicitly when writing C++.
2017-06-04 17:29:29 +02:00
Adrien Destugues 4edf3ea9c1 ffmpeg: Fix decoding of GBRP colorspace
It turns out the first plane is blue, not green. Yes, this does not
match with the colorspace name...
2017-05-30 21:55:02 +02:00
Adrien Destugues 50f36c92b5 MediaPlayer: fix a memory leak in SRT character set decoding 2017-05-30 20:41:03 +02:00
Adrien Destugues 15afaf0bcc MediaPlayer: detect and convert encoding in subtitles.
The SRT file format unfortunately does not specify a text encoding (in
fact, there isn't even really a specification for it). Just loading the
bytes and assuming UTF-8 does not work so well, so we now try to detect
the encoding from the first line of text found.

Fixes #9668

(sometimes watching a movie is all an adventure!)
2017-05-29 21:51:08 +02:00
Adrien Destugues 982fc0c222 ffmpeg: implement conversion for the GBRP pixel format
ffmpeg decodes some videos in this format: separate planes for G, R and
B values of the pixels. It does not manage to perform the conversion on
its own (we would need to use swscale for that), so provide our own
converter (the code is trivial anyways).
2017-05-29 21:51:08 +02:00
Adrien Destugues 756c36e7ee Rotate permission labels in Tracker InfoWindow
This allows to fit a lot more text in the same horizontal space, so we
can fit the label in various locales, without spreading the checkboxes
further apart.

Fixes #6987
2017-05-29 15:27:49 +02:00
Adrien Destugues fd9afd8ac6 Missing localizations in tracker info window.
Patches from Karvjorm in #6987 (but not directly related to that ticket)
2017-05-29 14:32:36 +02:00
Adrien Destugues 3ec7701779 NaturalCompare: implement using locale kit
The non-locale aware version is kept in src/build/libshared for use on
the host system and in packagefs (kernel add-on). In both cases, ICU is
not available.

Fixes #8192
2017-05-29 14:04:44 +02: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
Adrien Destugues e8ded73c85 Restore PLL limits for old 85x devices.
These went lost in driver refactoring, and the limits for 9xx were used
instead.

Should help with #13535.
2017-05-28 17:54:48 +02:00
Adrien Destugues 2a70d7d0e1 Delete fonts preferences.
It was merged into Appearance.
2017-05-16 19:10:58 +02:00
Adrien Destugues 026b9812f2 Make the Haiku package depend on libfontconfig.
It is now used by app_server.
2017-05-10 21:01:49 +02:00
Adrien Destugues ec407447c9 Build fix.
SetCopyright != SetCopyrights.
2017-04-30 14:36:05 +02:00
Adrien Destugues 4e09cc66e2 DataTranslations: try to fix x86_64 build. 2017-04-30 12:00:13 +02:00
Adrien Destugues 0702f3b191 DataTranslations: fix formatting of localized text
The about window relied on two sets of strings to be translated exactly
the same way and used lengths from one set to do things in the other.

Several translations got this wrong, and as a reult, the bold text in
the window was not at the expected places.

Fix by having only one set of translated strings, and build the dialog
from it.

Fixes #10559.
2017-04-30 11:00:08 +02:00
Adrien Destugues b5aaac027e GPT: lower our identify score if only one header is present.
GPT should have its partition table both at the start and end of the
disk. Our GPT partitionning system is able to cope with just one of the
two being available. However this has the unwanted effect that when
erasing only the start of the disk, it is still recognized with its old
GPT scheme.

To avoid this, lower the score of GPT if it finds only one of the two
headers, allowing MBR and BFS to get more priority in that case.

Should fix #12290, #13434.
2017-04-22 09:45:17 +02:00
Adrien Destugues 302f451214 pcnet: _XOPEN_SOURCE. 2017-04-14 21:04:45 +02:00
Adrien Destugues 71d017f1f0 More _XOPEN_SOURCE :/ 2017-04-14 20:44:32 +02:00
Adrien Destugues fd6603d99a Yet another missing _XOPEN_SOURCE. 2017-04-14 20:19:15 +02:00
Adrien Destugues c9d506a65e Another missing _XOPEN_SOURCE define... 2017-04-14 19:00:13 +02:00
Adrien Destugues 5bb8320035 Fix a few more uses of PAGE_SIZE 2017-04-14 07:23:23 +02:00
Adrien Destugues 6caa391f67 Fix another use of PAGE_SIZE
Not detected when building locally, probably I should have done a clean
build.
2017-04-14 07:18:38 +02:00
Adrien Destugues 743088d40b Fix users of PAGE_SIZE
- Replaced by B_PAGE_SIZE where possible
- Enabled the _XOPEN_SOURCE feature define otherwise
2017-04-13 21:32:08 +02:00
Adrien Destugues 56403b6373 limits.h: define PAGE_SIZE only if XSI is requested
limits.h is part of the C standard, but POSIX and XSI extend it with
various defines. We should not add these unless the application requests
support for them.

In this case, PAGE_SIZE should only be defined if XSI support is
requested by defining _XOPEN_SOURCE. Note that PAGESIZE (plain POSIX for
the same thing) and B_PAGE_SIZE are alternatives that remain available.
2017-04-13 21:14:41 +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
Adrien Destugues fd8d1d5656 launch_daemon: fix check for existing directory
BEntry.InitCheck returns B_OK even if the leaf does not exist. So the
code in launch daemon to create directories (/tmp and
/var/shared_memory) was never run.

Fixes #12760.
2017-04-10 21:56:31 +02:00
Adrien Destugues 34ac7f7ac3 BListView: manage horizontal scrollbar
BListView automatically sets the vertical scrollbar range already. Do
the same for the horizontal scrollbar.

Also fix BOutlineListView to compute the preferred size taking into
account the items outline levels (it needs a little more space).

This fixes the horizontal scrollbars in Locale preferences, second part
of #6747.
2017-04-09 12:03:33 +02:00
Adrien Destugues 99edf9d9ed Remove another overzealous assert.
Fixes playing "swinging.mp4" from our demo video package.
2017-04-08 19:08:34 +02:00
Adrien Destugues 459188a437 Do not fail when the display mode is sanitized
The goal of sanitize_display_mode is to create a mode that the hardware
can use. The code was doing that, but if any change was required to the
initial mode, it threw the result away.

Now accept the sanitized mode, and log it for debugging purposes.

This should fix #12927
2017-04-08 13:30:34 +02:00
Adrien Destugues 2c953daef7 Fix build also for secondary arch
Use a variable not affected by MultiArchBuildSetup, so we use the new
libwebp when gcc2 is the main arch, even when building for secondary.
2017-04-08 13:29:49 +02:00
Adrien Destugues ac0cb4e046 Fix build after libwebp update.
The update is only for gcc2 for now. This needs to be adjusted once the
other archs make the switch too.
2017-04-08 12:09:13 +02:00
Adrien Destugues 1f09ef45b6 Update libwebp to current version. 2017-04-08 11:30:25 +02:00
Adrien Destugues 2f6aa1c7cc locale: -m option should print character sets, only.
Required by mosh testsuite.
2017-04-08 08:45:29 +02:00
Adrien Destugues fbd8cde183 ffmpeg: remove overzealous assert.
Fixes #12370.
2017-04-07 21:38:55 +02:00
Adrien Destugues d5bff72ed8 Fix use after free.
As pointed by Marcus, FindString returns a pointer to the internal data
of the BMessage, so the message must stay in scope as long as we use the
pointer.

Thanks for reviewing!
2017-04-02 08:23:01 +02:00
Adrien Destugues 737e508de0 ffmpeg: give a little hint about the file type.
ffmpeg, especially older versions, is not very good at detecting file
types and relies on us giving it a file extension for a better guess.

Use our MIME sniffing to have a first try at detecting the file we are
about to play, and pass this information to ffmpeg.

Fixes #13150.
2017-04-01 19:11:02 +02:00
Adrien Destugues 6bbb8b3022 Build fix. 2017-03-30 18:40:34 +02:00
Adrien Destugues 7099f6549c openjpeg: update to fix libpng dependency 2017-03-26 11:25:49 +02:00
Adrien Destugues 471813967b Update ca_root_certificates
Any way to automate this like for PCI and USB ids?
2017-03-26 10:36:02 +02:00
Adrien Destugues a4834579f8 Add test for BNetworkAddress::Equals
Shows that #12247 is invalid.
2017-03-25 15:49:44 +01:00
Adrien Destugues 2616691f31 Add tnftp package for x86_gcc2.
This will replace our old fork in Haiku sources, once it is available
also for x86_64 and x86.
2017-03-25 10:54:54 +01:00
Adrien Destugues 34fbc56b3f Complete the transition to Noto as the default font.
- Both Noto and Noto Sans CJK JP are now used as font fallbacks,
  allowing to cover a rather large range of characters. This also makes
  it possible to mix the two fonts easily.
- Remove VL-Gothic from packages and from AboutSystem
- Add Noto fonts to the dependencies of the Haiku package.

This provides a similar look for all languages as discussed on the
mailing list.
2017-03-05 12:58:17 +01:00
Adrien Destugues 77a91e3e31 Haiku Sticker png preview and SVG sources
Better stored here, than in the mess in website/static/files.
2017-02-25 10:00:57 +01:00
Adrien Destugues ab4bd5d3ce Update many packages.
Fix various minor problems (stray .la files, etc) and sync with the
release branch as much as possible.
2017-02-11 23:27:25 +01:00
Adrien Destugues 83be289d7c netresolv: Remove rcsid
fixes gcc6 complaining about unused global variable.
2017-02-11 20:50:13 +01:00
PulkoMandy 100775b790 Fix build on Linux
Stub out some translation macros for host build, so the now localized
package solver can be built there.
2017-02-11 14:15:38 +01:00
Adrien Destugues b33ee35d3f various package updates and additions. 2017-02-09 22:14:26 +01:00
PulkoMandy 551b87cb9c sync more packages with release branch. 2017-02-07 22:56:28 +01:00
Adrien Destugues 38d20cc901 Fix NetSurf package again.
This version installs at the proper place and has a working deskbar
syslink.
2017-02-05 10:05:43 +01:00
Adrien Destugues 029008185a Fix NetSurf for BString ABI changes. 2017-02-05 07:53:46 +01:00
Adrien Destugues 438b4cc8b0 scummvm: update to fix libpng dependency
Scummvm authors met us at FOSDEM and were not too happy to find out the
package was not installable!
2017-02-05 07:27:09 +01:00
Adrien Destugues d63ed5844d People: revert window spacing changes
Revert changes from d0ac609964

The People window include a dark grey stripe, which must be next to the
window border with no spacing. The spacing was properly done inside the
main view.

Thanks to Diver for noticing the issue.
2017-01-15 14:59:54 +01:00
Adrien Destugues 86e8c37605 usb_modeswitch: apply changes suggested by korli
Didn't notice them in the ticket comments.
2017-01-15 12:53:48 +01:00
Adrien Destugues 7118f1582e ScreenSaver: redraw background of "active corner" screen in more cases.
Fixes #10027
2017-01-15 12:48:09 +01:00
Adrien Destugues fd7a786b06 qt5: update to 5.6, a package which can be installed. 2017-01-14 17:10:19 +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
Adrien Destugues 7556ae845b Fix unit tests for BString API change. 2017-01-11 21:54:31 +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
Adrien Destugues f36df2f6fc Update sdl_image and dfu_util to fix dependencies. 2017-01-08 23:25:38 +01:00
PulkoMandy ba7f14caec Add and update some more packages from the buildbots. 2017-01-08 15:34:59 +01:00
Adrien Destugues 564aac4209 Add a 1360x768 mode to the "well known modelines"
- This is the native resolution of two of my displays here
- I am bored of manually setting it with screenmode -m
- Also fix the 1366x768 modeline which was 100Hz instead of the
  advertised 60Hz.
2017-01-07 17:38:21 +01:00
Adrien Destugues 5d56964421 AVFormatReader: take the frame size into account
In ffmpeg, an audio frame may be made of multiple samples. We don't
really support that in our plug-in, and assume the frame rate and sample
rate are the same thing.

Adjust the reported frame count by multiplying ffmpeg's frame count by
its frame size (which is the number of samples per frame).

This fixes audio not working or stopping after a short time in
MediaPlayer, which uses the frame count this way.
2017-01-06 22:51:37 +01:00
Adrien Destugues 7894dfde26 Update sqlite
Fixes subversion complaining that it was built against a newer version.
2017-01-03 19:58:50 +01:00
Adrien Destugues 74d5847f99 Add some explanation to the CD image
This page could be made to look a little better, but at least mention
it is expected to not see much files on the ISO part of the anyboot
image.
2017-01-01 12:44:40 +01:00
Adrien Destugues 6e02aa9d1c NotificationWindow: fix memory leak
Thanks to mt for analysis of the problem. Fixed in a different way from
the original patch.

Fixes #13135.
2017-01-01 11:17:56 +01:00
Adrien Destugues 1942b3b1ee Missing include.
Make gcc5 happy.
2016-12-30 17:50:06 +01:00
Adrien Destugues 0d7ac5eb20 Accidentally left tracing enabled. 2016-12-30 17:47:30 +01:00
Adrien Destugues f621b750f6 BSoundFile: implement most of it.
Based on the amazing work of puckipedia, this gets BePac Deluxe to play
fine on Haiku (complete with sound effects and music).

This is based on his original patch, but the irrelevent parts (working
around bugs in ffmpeg that were fixed since then) are removed.

Fixes #9939.
2016-12-30 17:32:48 +01:00
Adrien Destugues 3a530660d0 ffmpeg: use stream frame count, if provided.
Not sure why that was commented out. Computing the frame count back from
the frame duration and stream duration can be inaccurate (especially for
long frame durations and/or short streams). It is important that the
stream ends exactly when expected. If it ends earlier than the announced
frame count, an app may be stuck forever waiting for the end, or would
interpret it as a read error. If it is too long, a buffer overflow may
occur.
2016-12-30 17:30:41 +01:00
Adrien Destugues b480a593f2 ffmpeg: declare support for AIFF files in the MuxerTable.
There used to be endianness problems, but they have been fixed long ago.
It is important for some legacy apps, that these are properly recognized
as B_AIFF_FORMAT_TYPE.
2016-12-30 17:29:44 +01:00