Commit Graph

44229 Commits

Author SHA1 Message Date
Adrien Destugues
2521f8ea39 Convert BufferTest to cppunit. 2014-10-22 11:11:55 +02:00
Adrien Destugues
55935df47d Convert AreaTest to cppunit. 2014-10-22 10:26:37 +02:00
Adrien Destugues
d21b5a07e6 AreaTest: style fixes. 2014-10-22 10:12:24 +02:00
Adrien Destugues
015a928b88 Notifications: use a single settings file.
There were 3 setting files, each an archived BMessage. Now there is only
one with all the data inside.
* Rework the SettingsPane class to save and load settings from a
message, rather than having each panel pick a file path on its own
* Move saving the app filters to the preference app, rather than the
server (so it's done at the same place as other settings)
* Rework loading prefs in the server so the settings message is read
from the file once and all settings are loaded from it.

This turns out to be more changes than I anticipated.
Fixes #9424.
2014-10-21 18:53:06 +02:00
Jérôme Duval
5ce63aed59 XHCI USB: Add port routing for Intel BayTrail USB device.
* from FreeBSD.
2014-10-21 18:20:26 +02:00
Adrien Destugues
9bf4e99477 BUrl: IDNA ToUnicode and ToASCII conversions.
* Since DNS are normally restricted to ASCII, the use of UTF-8 in domain
names is implemented using a "punycode" encoding.
* The request to the DNS server must be sent with the ASCII
representation of the domain name, however the Unicode one should be
used for user-visible parts.
* ICU provides an implementation of the conversion, which we use here.
* Conversion is currently done in-place and modifies the BUrl object
(this is similar to UrlEncode/UrlDecode).
* Adjust existing IDN test to make use of these methods. It's passing
now.
2014-10-21 14:43:13 +02:00
Adrien Destugues
d341a585ae Add more tests for BMessageFormat.
* Negative and null values, big values, thousands separators (in
different languages), string with no format, non-printable and non-utf8
charcaters, format not using # for the number.
2014-10-21 12:21:50 +02:00
Adrien Destugues
c06fd79574 Chart: fix endianness swap.
* This is most likely dead code currently (it is used only when the
framebuffer is big endian, and the the cpu is little endian)
* Fixes a warning.
* Can't confirm if B_SWAP_INT32 is really supposed to swap the value
in-place, or if this is a bug in Chart. Probably the latter.
2014-10-21 11:53:22 +02:00
Adrien Destugues
06f436b3ac Use strict mode when url-decoding file requests.
We don't want '+' to become a space here.
Fixes #11109.
2014-10-21 11:31:48 +02:00
Adrien Destugues
6da9451eba UrlTest: cleanup IDN tests. 2014-10-21 11:31:47 +02:00
Jessica Hamilton
812301e1fe libpcap: remove explicit dependency for scanner.c
* jam has been updated in btrev43095, which will now
  track multiple generated files from a single action
  correctly
* this also partially undoes the change introduced in
  hrev48061
2014-10-21 21:04:05 +13:00
Jessica Hamilton
724f1f573e tcpdump/libpcap: correctly declare dependency between lex/yacc
* Previously, debugging jam, it would output a warning along the
  lines of 'warning: using independent target ... grammar.c'. To
  fix the dependency, it needs to be declared from object file
  to the generated source file.
* With the correct dependency (scanner.o on grammar.c), this
  warning is eliminated, and the dependency graph shown is now
  correct
* This should address #4091
2014-10-21 12:57:20 +00:00
Michael Lotz
24e159e1ac btreeTest: Revive test for BPlusTree implementation.
* Update pseudo cache with minimal set of block cache API.
* Update Inode, Journal and Volume stubs to current API.
* Add stubs for remaining VFS functions.
* Extend tests to also call BPlusTree::Validate() and bail on errors.
* Change duplicate tests to fill in the same value. While this isn't
  strictly allowed, the tree validation can't work unless the values
  match up.
* Lots of coding style cleanup, but much more should still be done...

The tests run through without errors.
2014-10-21 00:24:45 +02:00
Michael Lotz
9656eef895 libkernelland_emu: Fix wrong return in ModuleList::AddModule(). 2014-10-21 00:08:48 +02:00
Michael Lotz
04ed6105f1 libkernelland_emu: Fix missing using namespace std for GCC4. 2014-10-21 00:07:16 +02:00
Michael Lotz
893367cf30 libkernelland_emu: Sync _rw_lock_{read|write}_unlock API.
The threadsLocked parameter was removed from the kernel API.
2014-10-21 00:04:24 +02:00
Michael Lotz
4101aaedc7 libkernelland_emu: Remove deleted scheduler.cpp from build.
The file was removed in hrev47484, but the Jamfile wasn't updated.
2014-10-21 00:00:54 +02:00
Michael Lotz
33d9fb8663 BFS: Fix check of key compare in BPlusTree::_ValidateChildren().
In ba32021824 the key comparison was fixed
to use a compatible version. Since then the check can actually return
results other than -1. The check done on the result was too strict
however. The child nodes may never contain keys that are larger than the
keys they are reached by. But the last key of a child node may be equal
to the one in the parent. This change fixes the check to take this
special case into account.

Fixes #11026 and #11289. The issue was unproblematic in so far that it
was only hit during a filesystem check and, since BPlusTree does not
yet attempt to correct corrupted trees, did not result in any actual
actions.
2014-10-20 22:47:56 +02:00
Adrien Destugues
bb2a5b4db5 DateTimeFormat: set the locale to the pattern generator.
Unfortunately this isn't enough to fix the bug shown by the test just
added.
2014-10-20 17:24:50 +02:00
Adrien Destugues
980b1bd045 Add more tests for the DateTimePatternGenerator
There are unexpected results in some cases, with the clock switching to
12 hours format even though the locale is set to use 24 hours.
2014-10-20 17:23:24 +02:00
Adrien Destugues
b5440720ae ScreenSaverSelector: fix drawing of "stop" icon
* Use B_SUBPIXEL_PRECISE and remove incorrect rounding
* Drawing the bar of the stop sign just 1 pixel off was really ugly.
2014-10-20 09:05:57 +02:00
Adrien Destugues
3a3bc0c149 radeon_hd: fix 64bit warnings 2014-10-19 12:51:54 +00:00
Adrien Destugues
b10790de44 Radeon: fix warnings on 64bit. 2014-10-19 12:51:53 +00:00
Adrien Destugues
dc234e798d NVidia: 64bit fixes. 2014-10-19 12:51:52 +00:00
Adrien Destugues
c8113d4d63 Matrox: fix 64bit warnings. 2014-10-19 12:51:51 +00:00
Adrien Destugues
13af65c402 intel_extreme: fix warnings on 64bit. 2014-10-19 12:51:51 +00:00
Adrien Destugues
40afabe6a3 PoorMan: use B_WIDTH_FROM_WIDEST BTabView
Avoids truncation of the tab titles with Russian locale.
2014-10-19 13:16:11 +02:00
Adrien Destugues
89397bab16 MessageFormat: use language and ignore formatting conventions.
The formatting conventions shouldn't change the rules used for singular/plural.
2014-10-19 11:49:56 +02:00
Adrien Destugues
fc1d09374e MessageFormat: Add test for Russian and fix Polish ones. 2014-10-19 11:49:55 +02:00
Jessica Hamilton
8e145c66d7 qrencode addon: use KDL-specific qrencode library
Fixes #11351
2014-10-19 22:41:31 +00:00
Stephan Aßmus
08f2b2b232 HaikuDepot: Restrict max width of links in package view 2014-10-18 22:52:00 +02:00
Adrien Destugues
0eb5978482 BMenu: don't invalidate layout when changing marked item
* The layout does not need to change. The label may change in
SetLabelFromMarked mode, but this only affects the layout of the parent
menu.
* This would crash when programatically changing the menu marked item
while the menu is open.
2014-10-18 22:28:08 +02:00
Michael Lotz
368dd37798 runtime_loader: Fix missing include of util/kernel_cpp.h.
Due to the missing include, the builtin new and delete operators were
used in those two files instead of the ones from the include used
everywhere else in the runtime_loader.
2014-10-18 21:58:08 +02:00
Michael Lotz
8ea3e9126d Typo: Fix doubled "not" in comment. 2014-10-18 19:32:33 +02:00
Michael Lotz
cf302a3861 Appearance: Increase max font size to 24 and add 16 to the list.
The list went up to 24 already, but was capped by the previous max size
of 18. Adding 16 to the arbitrary list of font sizes closes the rather
large gap between font sizes 14 and 18 that were already in the list.
Providing a slider or text field for the font size would probably be
better in the long run.
2014-10-18 19:23:51 +02:00
Michael Lotz
8635eef042 freebsd_network: Check non-packaged data dir for firmware.
When loading firmware, check the system non-packaged data dir first,
then the system data directory (as before). This allows loading of
firmware that doesn't reside in the system package.
2014-10-18 18:48:19 +02:00
Adrien Destugues
0c90c6d7e5 MediaConverter: style fixes. 2014-10-18 18:29:05 +02:00
Adrien Destugues
37daf9367a Update ffmpeg supported encoders list
* Add FLAC, which works
* Remove raw audio, ogg and AC3, as they are crashing the current ffmpeg
version.

Now it's possible to use MediaConvert to convert to FLAC, at least. For
other formats we will need to either fix ffmpeg, or write encoders using
the respective libraries (musepack, libvorbis, ...) for each format we
want to support.

Note that there are also some problems at the reading side, so using
MediaConvert, the output will be truncated and about 2 seconds of audio
will be missing at the end of the file in several cases. When this
happens, the input file is not removed from the list. Watch out for this
and don't delete the source files until you're very sure the output is
correct!
2014-10-18 18:27:29 +02:00
Adrien Destugues
3c5f0e6b53 Musepack: fix build. 2014-10-18 18:27:27 +02:00
Adrien Destugues
80891f9253 Remove Canna input method.
It is outsourced now.
2014-10-18 11:14:22 +02:00
Adrien Destugues
4f978fe4db BNetBuffer: add some error checks.
The allocation of fImpl can fail, and some methods used it without
checking. Return an error code (or NULL or 0) instead of crashing in
these cases.

Also InitCheck the fInputBuffer in BHttpRequest before trying to use it.

Fixes #11350.
2014-10-18 10:15:06 +02:00
Automatic Committer
55bfc6f011 Update pci.ids from pciids.sourceforge.net 2014-10-16 05:20:20 +02:00
Axel Dörfler
bf97f54d17 PowerStatus: removed unused uninitialized variable.
* Might help with #11329; I can't test this right now.
2014-10-15 23:30:19 +02:00
Adrien Destugues
1c0b6a4293 SecureSocket: disable SSL versions 2 and 3
There are known vulnerabilities in those. Everyone should be using TLS
by now.
2014-10-15 16:17:09 +02:00
Adrien Destugues
10191d82c2 Revert "Temporary build fix for OpenEXR."
This reverts commit 1431a56f33.
This has been fixed in a better way in the gcc2 package.
2014-10-15 11:29:04 +02:00
Adrien Destugues
77342b3ad8 Chart: clear view when switiching to BDirectWindow
Even when BDirectWindow is used, the back buffer data can be copied to
the front buffer. This happens when resizing or moving the window, and
when moving the cursor above it.

Since Charts does not touch the whole window when redrawing (it only
erases previous stars and draws new ones) this led to the last frame
drawn on the back buffer to stay visible until stars erased it.

Clearing the back buffer view with the current "sapce color" makes this
much less visible.

Fixes #96.
2014-10-15 09:22:41 +02:00
Adrien Destugues
1431a56f33 Temporary build fix for OpenEXR.
* It seems hex floats are not allowed in C++.
* I will fix this more cleanly, but it needs another rebuild of the gcc2
package. Until then, this lets haiku compile.
2014-10-14 23:28:36 +02:00
Oliver Tappe
839fef77e1 Import pci.ids and usb.ids into repository.
* They will be updated by a cron job once per day.

This improves the reproducability of non-current builds, as the ID-files
will no longer change over time.
2014-10-14 22:42:55 +02:00
Adrien Destugues
25c0dd66c5 utf16 XML: forgot the ? 2014-10-14 11:16:52 +02:00
Adrien Destugues
aff9c2526f Web+: advertise support for XML and WebP
* XML files can be viewed if they have XSLT stylesheets.
* WebP will be decoded in the next haikuwebkit release.
2014-10-14 11:11:50 +02:00
Adrien Destugues
a510fce212 Detect utf-16 encoded XML files.
* Increase sniffing rule priority to 0.251, otherwise files are detected
as text/plain (for anything lower than 0.25)
* Add sniffing pattern for utf-16 xml.
2014-10-14 11:07:29 +02:00
Adrien Destugues
9c0027a40d Fix sniffer rule for MHTML files.
* Fixes issues with mhtml files in WebKit testsuite.
2014-10-14 10:34:45 +02:00
Adrien Destugues
10c7810268 Detect SVG images missing the <?xml/> tag.
* If the file starts with "<svg", it's likely an SVG image.
* Fixes another misdetected file in WebKit testsuite.
2014-10-14 10:22:42 +02:00
Jessica Hamilton
b6cf71dc87 x86 hybrid: add provides for lib:libstdc++ in x86_gcc2
* this provides parity with the gcc_x86_syslibs packages, so
  that special handling isn't required for the gcc4hybrid
  builds when a recipe depends on libstdc++ (e.g. haikuwebkit)
2014-10-14 14:42:00 +00:00
Adrien Destugues
2baa894c76 icons screensaver: double free when in RandomSaver
RandomSaver apparently calls StopSaver two times, and Icons was having a
double free in that case.

Fixes #10957.
2014-10-13 17:20:50 +02:00
Adrien Destugues
a3cdc7c588 Gravity and GLife: fix crash on start.
Locking the GL context from a GLView subclass constructor can't work, as
it isn't ready yet. Move the initial setup to AttachedToWindow instead.

Fixes #8898, #10469.
2014-10-13 15:29:46 +02:00
Adrien Destugues
a1262bbf33 GL screensavers fail to load Mesa renderer add-on
The screensaver add-ons are properly linked against libGL. The libGL
code tries to load the swrast add-on. But this fails because the
BGLRenderer constructor (which is provided by libGL) is not found.

It seems that when loading an add-on, libraries linked to by other
add-ons (and not the app itself) are not searched to resolve symbols. To
avoid this issue, we now link ScreenSaver and screen_blanker to libGL,
so the GL renderer add-on can find it.

Fixes #10206
2014-10-13 15:06:47 +02:00
Adrien Destugues
64bda0cc91 Add missing error check in BMessageFormat
* Avoids a crash when an invalid format pattern is used
* Add tests exercising this with various badly formatted patterns.
2014-10-13 09:07:53 +02:00
Stephan Aßmus
96ebc1d602 HaikuDepot: React to B_SELECT_ALL in custom text view 2014-10-12 23:41:27 +02:00
Stephan Aßmus
639756547d HaikuDepot: Move worker thread init into method
... and call it from the second version of the MainWindow constructor.
2014-10-12 23:21:54 +02:00
Stephan Aßmus
027e51ae7d HaikuDepot: Log more errors to stderr.
These errors do not necessarily need to be reported to the user via alerts.
They are more of an indication that HaikuDepot needs to be smarter when
figuring out what package actions to present at all.
2014-10-12 23:21:52 +02:00
Stephan Aßmus
1783f96af9 HaikuDepot: Show alert when scheduling package action failed 2014-10-12 23:21:49 +02:00
Adrien Destugues
c8b83b1708 Make disabling BOptionPopUp actually work
* Patch by ttcoder
* Fixes #10735
2014-10-12 16:54:27 +02:00
Adrien Destugues
b7aac5d21e Fix BDragger drawing when parent doesn't draw.
BDragger use some tricks to draw as a partially transparent view, it
calls the parent Draw method, then draws a partially transparent bitmap
over the resulting drawing.

This only works if the parent does somthing in the dragger area. In case
it doesn't, first fill the dragger with the parent view color, so there
is at least "something" in those pixels.

Fixes #5906.
2014-10-12 16:42:22 +02:00
Adrien Destugues
1bf53ffcfc Remove leftover printf and fix build. 2014-10-12 16:21:22 +02:00
Adrien Destugues
bdb4ae32fd Fix unarchiving of BScrollView with layout
* We archive views using "managed" archives, and the children are not
attached in the BView(BMessage*) constructor, but later. So it's not
possible to find the target and scrollbars in the constructor of
BScrollView.
* Make BScrollView override AllUnarchived and find the target and
scrollbars again there. The code is slightly different as there is no
guarantee that the first child will be the target in that case. The
existing code in the constructor is preserved for non-managed archives.
2014-10-12 16:02:34 +02:00
Adrien Destugues
d6bd833865 Fix ICU message syntax
This apparently led to a crash in ICU, reported on the mailing list.
2014-10-12 11:43:16 +02:00
Adrien Destugues
4cada3807c BDragger: add layout-aware constructor.
Somehow no one needed this yet.
2014-10-11 11:18:56 +02:00
Stephan Aßmus
2fb1b897bc HaikuDepot: Revert change regarding publisher name
It is now again the first string from the copyrights list, unless there is
no copyrights list, in which case the vendor string is used.
2014-10-10 22:51:19 +02:00
Stephan Aßmus
6d519fd175 HaikuDepot: WIP to open .hpkg files.
* When opening .hpkg files, shows just the PackageInfoView in a smaller
   window.
 * PackageInfo constructor with BPackageInfo argument
 * Default pkg icon has a single instance only. Before, there would be another
   instance for each repository refresh.

TODO:
 * Install button on single package view is non functional
 * Probably needs to do someting different when opening .hpkg from an
   installed packages folder (show the regular list and focus that package?).
 * The filter view and list view are still constructed for the single package
   mode.
 * ...
2014-10-10 22:42:07 +02:00
Michael Lotz
bb9112df02 Cleanup: Remove doubled semicolon and a trailing whitespace. 2014-10-10 20:38:04 +02:00
Humdinger
694ed94b14 Removed GRUB 1.x hints from Installer's 'EULA' window
Pretty much everyone should be using GRUB 2 by now.
2014-10-10 17:10:47 +02:00
Adrien Destugues
2c6835f93e Remove in-tree bash.
* This is now outsourced.
* Should clean a lot of our coverity warnings.
2014-10-10 16:32:04 +02:00
Adrien Destugues
e962d1552d Don't use unsafe strcpy. 2014-10-10 11:58:32 +02:00
Michael Lotz
d98a3e026c package kit: Fix corruption of last package chunk on update.
PackageFileHeapWriter::_UnwriteLastPartialChunk() used ReadData() to
extract the last partial chunk into the pending buffer. This indirectly
calls PackageFileHeapWriter::ReadAndDecompressChunk(), which assumes
data past the last full chunk to come from the pending data buffer.

Since the pending data buffer is not filled in at that point, the call
to ReadAndDecompressChunk() simply did nothing, leaving the object with
a correctly sized but completely nulled pending data buffer. The last
partial chunk of a package would therefore always get corrupted when
updating a package.

Fixes #11306 that provided a reduced test case that happened to corrupt
the only chunk of a package, nulling the .PackageInfo and therefore
making the error more obvious as subsequent parsing of the info failed.
2014-10-09 23:41:39 +02:00
Adrien Destugues
d41ee54e6a Fix corrupted text in poorman slider
UpdateText must return a pointer to a fixed buffer, whcih BString.String
isn't, if the sctring is modified.

Copy the data to a char* we can use as a fixed position buffer.
2014-10-09 21:28:18 +02:00
Adrien Destugues
26b0a53d12 Add parsing support to BTimeFormat. 2014-10-09 13:35:23 +02:00
Adrien Destugues
e0f81db657 re-add the _BMCItem_ class for binary compatibility.
This was removed in hrev17147, because our implementation of BMenuItem
does not uses it anymore. However, we must keep it in order to properly
unarchive BMenuFields that were archived in BeOS.

One application that was crashing because of this is VNCViewer.
2014-10-08 17:45:20 +02:00
Adrien Destugues
4b947a07d3 More BMessageFormat rework.
I'm stopping this now, I heard we want to leave those as GCI tasks.
2014-10-08 17:26:12 +02:00
Adrien Destugues
961fdd8cc3 BMessageFormat: parse the pattern at construction
* Instead of parsing the pattern everytime Format() is called, parse it
only once when the object is created.
* Adjust all callers to make use of the feature and reuse the instance
as much as possible. This also allows calling B_TRANSLATE only once
instead of everytime the formatting needs to be done. We use either a
static instance (when the message pattern is constant) or a field (when
it is not known to be constant).
* Since the BMessageFormat instances are now reused, add locking to
avoid race conditions (ICU itself is thread safe, but the format pattern
is recreated when the locale is changed)
2014-10-08 15:12:48 +02:00
Adrien Destugues
0e7fcd84af PoorMan: use BMessageFormat. 2014-10-08 13:38:32 +02:00
Adrien Destugues
be93029899 More uses of BMessageFormat. 2014-10-08 13:17:17 +02:00
Adrien Destugues
baf0ed6a7b Time preferences: Another too wide tab label 2014-10-08 13:17:02 +02:00
Adrien Destugues
df8bc913d2 Locale preferences: use B_WIDTH_FROM_WIDEST tabs.
The russian translation of "Formatting" does not fit in
B_WIDTH_AS_USUAL with the default font size.
2014-10-08 13:16:44 +02:00
Adrien Destugues
824cb460ac DateTimeFormat: handle custom 24 hours clock.
The "j" format pattern selects a 12 or 24 hours clock automatically
depending on the locale, but it doesn't work when the format is forced
in the locale preflet or through the BFormattingConventions API. So we
manually pick either K or H depending on that setting.
2014-10-08 11:36:52 +02:00
Adrien Destugues
7fe7ce6748 Another use of BMessageFormat for plural support.
Spotted by Diver. Thanks!
2014-10-08 10:54:00 +02:00
Stephan Aßmus
a3dfc57d04 HaikuDepot: Enable caching of info retrieved from web-app 2014-10-07 22:32:42 +02:00
Adrien Destugues
892f3b8b9a DateTimeFormat: use the proper format for timezone.
V used to mean the same as z, but was repurposed to someone else. So
actually use z which is what we want.

Fixes #11325.
2014-10-07 22:02:27 +02:00
Stephan Aßmus
cdb2290fe9 HaikuDepot: Logic reversal with marking username field
Fixed flipping the boolean passed to MarkAsInvalid() for the user name field,
which only recently became apparent.
2014-10-07 21:35:09 +02:00
Adrien Destugues
97d07c8af2 Add API for parsing dates. 2014-10-07 17:40:18 +02:00
Adrien Destugues
090a0d7686 Add an API to get month names. 2014-10-07 16:08:22 +02:00
Adrien Destugues
3051660362 Use BDateTimeFormat for deskbar clock
* don't try to cook a custom format by appending strings, and instead
let BDateTimeFormat decide on the appropriate format to use.
2014-10-07 13:07:44 +02:00
Adrien Destugues
b16923f79f Add tests for BDateTimeFormat with custom formats. 2014-10-07 13:07:06 +02:00
Adrien Destugues
4a3a474224 Reimplement BDateTimeFormat using ICU support
* Avoid hardcoding the format to "date, time"
* Allows using DateTimePatternGenerator to create custom formats from a
set of fields.
2014-10-07 13:06:40 +02:00
Adrien Destugues
7fb9021509 Fix singular for Processor count. 2014-10-07 10:12:02 +02:00
Adrien Destugues
53382a8aa7 Start making use of BMessageFormat. 2014-10-07 10:05:40 +02:00
Adrien Destugues
0da7796e6c Add BMessageFormat class.
This can be used to format complex messages properly. It moves the
complexity of handling plural forms, gender, and anything else needed
into the localizable string, rather than hardcoding it in the code.

This moves the difficulty of handling these things properly to people
doing translations, rather than relying on developers to do it.

Fixes #10755, but our localization must now be updated to make use of
the feature.
2014-10-07 08:51:23 +02:00
Adrien Destugues
699ddf447c DateFormatTest: fix after ICU upgrade
* Timezone names have changed. Test the medium time format which doesn't
include them, as we aren't forcing a specific one.
* French date format also changed to use 4 digit year name.
2014-10-07 08:49:45 +02:00
Adrien Destugues
9ab98a21a5 Fix build.
Obviously libstackandtile must alos be built for the main arch.
2014-10-06 19:07:32 +02:00
Adrien Destugues
fe86832391 Put liblinprog after libstackandtile
Otherwise some symbols go missing...
2014-10-06 17:43:21 +02:00