Commit Graph

54904 Commits

Author SHA1 Message Date
Michael Lotz
eec73693e0 PicturePlayer: Rework to be more safe against corrupted data.
This introduces a more sane API (currently private) that allows for
safer and possibly more efficient implementations:

* It uses a struct of named and typed function pointers instead of just
  a void pointer array. This adds type safety to the callbacks so the
  compiler can figure out if things match up before subtle bugs get
  introduced.
* It provides bounds for all strings/buffers passed to the callbacks.
* It uses const references instead of implicitly copying arguments.
* It folds stroke_x/fill_x pairs into draw_x functions with a fill
  argument to reduce the amount of functions needed.
* It uses unsigned values where negative values make no sense.

The old API has been implemented on top of the new one using adapter
functions. It makes copies of all data passed to the callbacks which
effectively keeps the picture data from being modified. This matches
with the R5 behaviour.

This also reimplements the buffer parsing to be safe against corrupted
data by validating that the types actually fit in the provided sizes
and buffers (using a templated reader).

Since this class is used from the app_server with user provided data,
making it more safe is important even though it comes with a slight
overhead (replicating R5 behaviour, i.e. crashing the app_server when
corrupted data is fed, doesn't seem very appropriate here).
2015-09-05 16:09:31 +02:00
Adrien Destugues
5a87d490f5 Fix implementation of _res.
While not thread-safe, it should still be possible to use it in
non-threaded programs, or with locking on the application side.

The "thread-safe" implementation we got from NetBSD called abort(),
which is not a good solution. Restore the non-thread-safe
implementation, which should still work.

Fixes issues in openssh and mtr, and possibly other ported apps.
2015-09-05 12:17:46 +02:00
Humdinger
bf70e50b07 Updated Slime Volley package
Now with icon, app-signature, and settings saved in B_USER_SETTINGS_DIRECTORY.
2015-09-05 11:17:13 +02:00
autonielx
f3565aaab0 Update translations from Pootle 2015-09-05 06:40:57 +02:00
Alexander von Gluck IV
8248d96a06 AHCI: Begin simulating SCSI Inquiry with VPD data
* Needed for SCSI level access to trim maximum block sizes.
2015-09-04 19:30:34 -05:00
Rene Gollent
a1e25f862c Mail: Fix gcc4 build.
- Fix typo in forward declaration.
- Add missing include for snprintf.
- Add missing virtual destructor on QueryListener abstract class.
2015-09-04 16:57:06 -04:00
Axel Dörfler
9ed8f48498 Mail: show icons only setting works again.
* It will show the label as tool tip when the labels are hidden.
2015-09-04 17:33:51 +02:00
Axel Dörfler
6b8712663a BToolBar: made FindButton() public. 2015-09-04 17:33:46 +02:00
Axel Dörfler
50d381e862 Mail: use layout version of BMenuBar.
* Fixes layout issue: the minimal size was incorrect.
* Moved variable declaration to where it is actually used.
2015-09-04 17:33:41 +02:00
Axel Dörfler
31c65be109 Mail: fixed crash on resend.
* Seems to have been there for quite some time. Probably a good
  reason to remove that feature altogether.
2015-09-04 17:33:36 +02:00
Axel Dörfler
15c1056242 BMailSettings: removed debug message dump. 2015-09-04 17:33:32 +02:00
Axel Dörfler
62c1b01661 Mail: temporary workaround for the label placing issue.
* Does not work for all font sizes.
2015-09-04 17:33:27 +02:00
Axel Dörfler
4182c53bc4 Mail: change look of disabled text controls.
* Added HeaderTextControl that draws the text in black, and uses the
  panel background without a frame when it's disabled. Only the label
  is still drawn as disabled.
* Changed AddressTextControl to behave in the same way.
* The date view is now a HeaderTextControl, too.
* Unfortunately, the label is not vertically aligned with the contents.
2015-09-04 17:33:22 +02:00
Axel Dörfler
7bdee8beab BEmailMessage: added missing const, Date() returns time_t.
* Added missing const to some getter methods.
* Date() now tries to parse the date of the mail, and return it as
  a time_t; you can still retrieve the actual string via
  HeaderField("Date") if you have to.
* Mail now shows the time in the local time zone, and with the
  current locale.
2015-09-04 17:33:17 +02:00
Axel Dörfler
66078c7911 BMailComponent: made a few methods const. 2015-09-04 17:33:12 +02:00
Axel Dörfler
19d8cb703c BDate: added time_t constructor.
* This class is pretty much useless as it is.
2015-09-04 17:33:07 +02:00
Axel Dörfler
cc7e5aac40 Mail: fAccount text control is no longer used. 2015-09-04 17:33:03 +02:00
Axel Dörfler
8b1aaf348c Mail: properly disable prev/next buttons without Tracker.
* The prev/next buttons will only work when invoked via an actual
  mail file from Tracker.
2015-09-04 17:32:58 +02:00
Axel Dörfler
d891923650 BMenuField: use layout rect for the label.
* Instead of just laying it out as without the layout API.
2015-09-04 17:32:53 +02:00
Axel Dörfler
df946869a1 Mail: work in progress to use the layout API. 2015-09-04 17:32:48 +02:00
Axel Dörfler
e047b40a2f Interface Kit: use different spacing constants.
* While this breaks binary compatibility with earlier Haiku releases,
  use values that are less likely to clash with actual use cases.
* Specifically, using a negative spacing is one way to get rid of the
  border of BScrollViews, to put them into a window neatly.
* Also, BControlLook now uses a switch to resolve them.
2015-09-04 17:32:44 +02:00
Axel Dörfler
fa89878a70 Terminal: renamed some variables for clarity.
* Unless they really have no meaning beyond serving as an index, you
  should avoid naming your variables just i, j, k, l.
2015-09-03 21:30:43 +02:00
Axel Dörfler
52e43a20be Terminal: replaced positioning with BWindow::MoveOnScreen().
* The previous mechanism was pretty crude, and didn't work that well.
2015-09-03 21:30:40 +02:00
Axel Dörfler
ebf4cbe6e7 Incredibly smart BWindow::MoveOnScreen() method added.
* Makes sure that the window is as complete as possible on screen.
2015-09-03 21:30:37 +02:00
Axel Dörfler
b7d0120074 Terminal: Added "Save as defaults" back.
* It's still convenient to have.
* Furthermore, the distinction between when settings are stored is hard
  to grasp otherwise.
* Plus, adopting the current window size is now much more straight forward.
2015-09-03 21:30:34 +02:00
Humdinger
9a1b63b19f Update QuickLaunch package to v0.9.12
Changes in v0.9.12:

*	Make the "Window always on top" optional. Not everyone was pleased with
	that change of v0.9.11...
*	Also fix the formerly not usable file dialog when adding files/folders to
	ignore. It was hidden behind the always-on-top window.
*	Added Italian localization, thanks Barrett!
2015-09-03 19:20:59 +02:00
Automatic Committer
db3fda16ea Update pci.ids from pciids.sourceforge.net 2015-09-03 05:20:31 +02:00
Humdinger
0dd0c8a4ae Update Slime Volley game.
Wasn't installable before, the PROVIDES wasn't correct.
Hope it works now...
2015-09-02 13:59:51 +02:00
miqlas
c3dfa1d9d0 Solarized Dark and Light color scheme for Terminal
Signed-off-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2015-09-01 17:29:19 -05:00
Alexander von Gluck IV
0cd624b89c AHCI: Begin adding SCSI VPD query support. 2015-09-01 17:13:04 -05:00
Julian Harnath
71cc4d4998 Merge branch 'master' into app_server
Conflicts:
	src/kits/app/Roster.cpp
2015-09-01 20:07:21 +02:00
Dario Casalinuovo
38e3fbe389 BMediaRoster: Remove possibly confusing debug prints
* Thanks to Axel and Rene for reviewing!
2015-09-01 15:08:57 +02:00
Dario Casalinuovo
7d337b23b7 BMediaRoster: Reintroduce the undertaker class
* This has been necessary due to the undefined call order of
of static objects. Fixes #12315.
* The bug has been caused by the linker which free unused resources,
making the BMediaRoster to run in a zombie state. In this state
anything such as a message could make the looper to crash.
* The class is reintroduced with some differences though, we are
going to protect it from another thread calling Roster() while the
BMediaRoster is quitting and implement BMediaRosterEx::Quit.
* Unregister registrar notifications before we quit our thread. Avoid
to uninitialize anything from QuitRequested as it may cause problems.
2015-09-01 15:08:57 +02:00
Michael Lotz
a33d19b0a4 Update haikuwebkit packages to 1.4.12 on x86[_(gcc2|64)]. 2015-08-30 23:10:51 +02:00
Adrien Destugues
278af8e281 ffmpeg: check against correct version constants.
54.23.x is ffmpeg 0.11, which still has "CodecID" (and x>0).
2015-08-30 18:00:08 +02:00
Adrien Destugues
f618c89e17 ffmpeg: detect the library version the right way.
* Fixes the build by detecting the library version using the provided
constants, instead of guessing from the compiler version.
2015-08-30 17:33:00 +02:00
Adrien Destugues
9e5c694668 ffmpeg plugin: remove more deprecated functions.
These were all deprecated between releases 0.6 and 0.10 of ffmpeg,
except for one change (renaming of CodecID to AVCodecID) which we can
work around with a typedef. The deprecated functions were still
available in 0.11, but were removed later on after several years of
deprecation.

This makes it possible to build our plugin with any ffmpeg version
between 0.10 and 2.7, so we can now experiment with updating to 2.7 at
least for the gcc4 builds.
2015-08-30 16:36:08 +02:00
Adrien Destugues
0f7e19ce7e ffmpeg plugin: add support for MOD and other "tracked music"
* ffmpeg can handle these through ModPlug
* By default, ffmpoeg will not try these formats because the way to
detect them are a bit unsafe (4 bytes at a particular offset in the file
serve as an identifier). So, hint the sniffing by giving it a filename
of ".mod" to get modplug to be used. This does not affect sniffing in
the regular way for other formats.
* Add some common tracked music formats to the muxer table.
* Fix some tracing to use current (as of ffmpeg 0.10) function names and
because some variables were renamed.
2015-08-30 16:36:06 +02:00
Michael Lotz
cccf804d96 ahci: Replace use of bit field with shifts and masks.
It's a 32 bit register which needs properly aligned 32 bit writes. Using
a bit field does not guarantee that, so replace it with shifts and
masks. Should fix #12338.
2015-08-30 11:17:47 +02:00
Michael Lotz
d316ccc7e3 ahci: Whitespace and line length cleanup only. 2015-08-30 10:50:32 +02:00
Jessica Hamilton
8f3d6d192f Revert "BPrintJob: fixed crash."
This reverts commit 1805bbf29b.
2015-08-30 14:41:16 +12:00
Jessica Hamilton
d7a9cbde91 BAlert: don't center ourselves if we've already been positioned. 2015-08-30 14:39:36 +12:00
Jessica Hamilton
21c3286b62 BAlert: make SetShortcut() work again.
In hrev49481, the call to AddCommonFilter was accidentally
removed, preventing SetShortcut() from working. The filter
has also been updated to enumerate all buttons, rather than
a maximum of the first three.
2015-08-30 14:06:58 +12:00
Jessica Hamilton
a84dc7543a BAlert: move setting default button into AddButton().
This properly fixes the crash in #12271, introduced by
hrev49481.
2015-08-30 14:06:57 +12:00
Adrien Destugues
0717601a7f ffmpeg encoder: do not use deprecatred function
Replace avcodec_encode_audio with avcodec_encode_audio2. The latter
provides us with more information on the encoded data, so we can avoid
guessing things on our own. It also handles memory allocations on its
own, which fix some cases where we would provide a too small buffer.
2015-08-29 23:14:04 +02:00
Adrien Destugues
75d1eb3a59 assert.h: reintroduce headers guard for function declarations.
The POSIX standard requires us to allow assert.h to be included multiple
times with differnt values of NDEBUG. So we can't have a global header
guard on the files. However, we must also make sure that we don't
declare functions multiple times in that case. Re-introduce an header
guard on the part of the file where we declare functions, only.

Fixes lots of warnings when building Netsurf.
2015-08-29 23:14:03 +02:00
Michael Lotz
0a6d595951 Add system_time to the Jamfile, missed in hrev49598. 2015-08-29 19:33:27 +02:00
Michael Lotz
5ce7069d15 Add script that prints the uptime after waiting for all servers.
It waits for the message port of each application to become available
using waitfor and then waits for the application to actually reply
using hey. This establishes the criterion of the boot process being
complete as "all servers (and Tracker & Deskbar) are started and
respond to messages".
2015-08-29 19:15:47 +02:00
Michael Lotz
b11eb89c2d Add system_time bin command which just prints system_time().
This can be used by scripts to do verious performance measurements.
Specifically it can be used to measure the boot time since it represents
the uptime.
2015-08-29 19:15:47 +02:00
Dario Casalinuovo
48b2cb3771 BMediaRoster: Pass unhandled messages to the base class
* While it shouldn't be a big problem, the bebook states
that it's very important to do so.
2015-08-29 16:13:44 +02:00