Commit Graph

56751 Commits

Author SHA1 Message Date
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
Jessica Hamilton
92b9c8649b MultibyteToWchar: correctly handle UTF-16 surrogate pairs.
* Whilst in WcharToMultibyte, we correctly convert our UTF-32
  wchar characters to multibyte, the same wasn't done in
  MultibyteToWchar. Now, if we detect a leading surrogate,
  we'll re-read the multibyte sequence with space for a UTF-16
  pair, which allows U16_GET to correctly convert the UTF-16
  byte sequence into the needed UTF-32 codepoint.

Fixes #13184.
2017-01-12 06:39:55 +13:00
Jessica Hamilton
d2423e4b3c ICUCtypeData.cpp: format string fixes for tracing. 2017-01-12 03:33:11 +13:00
Jessica Hamilton
079ab7f0b1 ICU add-on: validate mbState->converter before attempting to close.
This resolves crashes in gawk with multibyte support.

Fixes #12515, #13103.
2017-01-12 03:33:04 +13:00
Kacper Kasper
4d83a710f5 makefile-engine: Fix catkey generation.
Fixes #13146.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-01-10 17:21:39 -05:00
Murai Takashi
7cfdd9242c h2generic.cpp: fix use after free.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2017-01-10 17:17:41 -05:00
Dario Casalinuovo
e6004b7729 MediaClient: Move WIP min/max functions into BMediaConnection 2017-01-10 22:54:53 +01:00
Dario Casalinuovo
e7aa210bca MediaClient: IsRunning() status is set at handle time 2017-01-10 22:44:16 +01:00
Dario Casalinuovo
3dbb4ff62d Fix SoundRecorder build 2017-01-10 22:36:20 +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
Humdinger
a325242d7f Fix CodyCam layout
Fixes #13174.

* Add the layout to a BView and add that to the BBox.
* Make the window correctly resize (horizontally only).
2017-01-10 16:22:13 +01:00
Humdinger
5e1e245be8 Updated NetPulse package 2017-01-10 10:52:00 +01:00
Axel Dörfler
44c76b26e8 bfs: Made updating the boot block more secure.
* It now also checks the length/offset indepdently from each other,
  so that they cannot benefit from integer overflow.
* This fixes bug #12943.
2017-01-10 09:07:21 +01:00
John Scipione
d5b6133b93 App Server: style fixes
80 char limit
spaces => tabs
fix spelling/grammar problems in comment
2017-01-09 23:11:34 -08:00
John Scipione
b1967b1012 Revert "Deskbar: Scale cut-off leaf icon in horizontal mode"
This reverts commit 066137eb05.

Reverting while I figure out what is causing Deskbar to crash.
2017-01-09 02:32:56 -08:00
John Scipione
2154128845 Revert "Deskbar: Avoid leaking leaf bitmap's memory"
This reverts commit 223ea4329f.
2017-01-09 02:31:38 -08:00
John Scipione
da6286856f Revert "Deskbar: Inital FetchIcon() in AttachedToWindow()"
This reverts commit 52e243a7d1.
2017-01-09 02:31:32 -08:00
John Scipione
cce67d76ad Revert "Deskbar: Call parent AttachedToWindow() first"
This reverts commit bea76b8aa1.
2017-01-09 02:31:23 -08:00
Adrien Destugues
f36df2f6fc Update sdl_image and dfu_util to fix dependencies. 2017-01-08 23:25:38 +01:00
Tsimblist
5f8edc9c51 Fix for ticket #12978 - Tracker GetInfo window layout problem
Signed-off-by: Axel Dörfler <axeld@pinc-software.de>
2017-01-08 23:20:57 +01:00
John Scipione
bea76b8aa1 Deskbar: Call parent AttachedToWindow() first
must have connection to App Server before FetchIcon()

Hopefully fixes #13172
2017-01-08 13:08:25 -08:00
Humdinger
ee7da1af0a Mail and Notification prefs: use B_WIDTH_FROM_WIDEST
Spotted by Diver: missing B_WIDTH_FROM_WIDEST for the BTabViews
resulted in labels being vut off with bigger font settings.
2017-01-08 20:47:19 +01:00
John Scipione
52e243a7d1 Deskbar: Inital FetchIcon() in AttachedToWindow()
This ensures that we have a connection to App Server at the
time we are fetching the icon.

Hopefully fixes #13172
2017-01-08 11:02:59 -08:00
John Scipione
223ea4329f Deskbar: Avoid leaking leaf bitmap's memory
In the vector case we are creating a bitmap, in the non-vector
case we are grabbing the bitmap from a resource.

The vector case we have to create a bitmap to rasterize.
The non-vector case we just grab the bitmap pointer.

We have to create new bitmaps from the vector icon at
different sizes, when we do that we were leaking the memory
occupied by the previous icon.

So make and use SetIcon() setter method which deletes the old
bitmap before setting the new one. In the non-vector case this
means we need to make a copy of the bitmap we grab from the
resources that we can safely delete.

Also delete bitmap on destructor.

For all other TBarMenuTitle's (meaning the team menu item),
we are grabbing a bitmap from resource, so don't delete the
bitmap as it is owned by resource set, we just use the pointer.
2017-01-08 11:00:53 -08:00
PulkoMandy
ba7f14caec Add and update some more packages from the buildbots. 2017-01-08 15:34:59 +01:00
Humdinger
4e2842425b Updated Web+ bookmarks
Removed the links to other software sites. They're much easier to
manage on a website. Linked to the new site instead:

https://www.haiku-os.org/community/software
2017-01-08 14:18:11 +01:00
John Scipione
066137eb05 Deskbar: Scale cut-off leaf icon in horizontal mode
Fixes #8505 restoring the aesthetic integrity of the cut-off leaf.

Add vertically & horizontally centered, whole vector icon to rdef.

Reformat BarMenuTitle.h rename header guard from BARMENUTITLEH to
BAR_MENU_TITLE_H.

Created TDeskbarMenuTitle subclass which deals with Deskbar menu
item stuff like getting the icon from vector data and pushing the
leaf down a few pixels to cut off the leaf (maintaining its aesthetic
integrity).

Made TBarMenuTitle methods virtual. Remove unused expando constructor
parameter and private variable.

Add a TODO to scale the bitmap if we can't find any vector icon data.
With non-vector bitmap it behaves same as before this commit in
horizontal mode.

Adjust kMinimumTrayWidth to restore Deskbar's minimum width to its
classic value since days of yore, 143px. This, perhaps not coincidently,
is exactly the amount fit 7 replicant icons. Update constants in the
code to reflect this reality. Adjustable width coming soon.

replace dynamic_cast<TBarApp*>(be_app) with a static_cast in 1 place.
2017-01-08 02:39:39 -08:00
Jessica Hamilton
3d870da3cb UEFI: leave runtime memory identity mapped.
* We don't have kernel/userspace access to UEFI at this point
  either, and with some firmware, if we don't keep the
  runtime memory identity mapped, then the loader dies. This
  will fix booting on such machines, and shouldn't have any
  impact on already working machines.
2017-01-08 21:43:53 +13:00
Humdinger
d7f781302d Fixed build... 2017-01-08 08:53:24 +01:00
Humdinger
d193fb9437 HaikuDepot prefs: Add ellipsis to menu item
As Diver pointed out, the "Manage repositories" opens a window and
should therefore be suffixed with an ellipsis.
2017-01-08 08:48:18 +01:00
Augustin Cavalier
1aacfd6940 Repositories: Use std::min and std::max to fix the x86_64 build. 2017-01-07 14:33:50 -05:00
Augustin Cavalier
07558eb152 build: Add the Repositories preflet to the regular image. 2017-01-07 13:59:20 -05:00
Brian Hill
5bf2b6eb74 Add the new Repositories preflet.
Also includes changes to HaikuDepot to change wording and add the menu item
to open the Repositories preflet.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Closes #13147.
2017-01-07 13:50:45 -05: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
Humdinger
5ddc54f27e Updated gcc2 packages for links and lynx.
As reported by drjohnnyfever on the forums:
"Lynx needs an older version of OpenSSL and Links is looking for the old
libpng."
2017-01-07 17:18:54 +01:00
Jessica Hamilton
6b4cbec040 UEFI: identify the boot partition to check that it's valid.
* Also modified EFI::Header to return the efi_table_header so
  that we can compare it to boot device partition table.
2017-01-07 21:26:25 +13:00
Jessica Hamilton
42e718f041 UEFI: improve boot support in devices.cpp
* Maintain a list of all MESSAGING_DEVICE_PATH and
  MEDIA_DEVICE_PATH handles, so we can avoid adding devices
  multiple times.
* Split up platform_add_boot_device() into separate functions
  for better readability (add_cd_devices, add_boot_device_for_image,
  etc.).
2017-01-07 21:26:23 +13:00
Jessica Hamilton
35b38c392e loader: get_boot_file_system() iterate over all devices found.
* This is useful for UEFI, as we can then add the device that
  contains the UEFI loader, as well as all CD devices. As a
  result, if the device with the UEFI loader doesn't contain
  a bootable BFS partition, it will then attempt the same for
  CD devices.
2017-01-07 21:25:23 +13:00
Jessica Hamilton
445b080ea3 UEFI: support selecting video resolution & vesa settings file. 2017-01-07 15:39:35 +13:00
John Scipione
c574ad267d Haiku Book: Make wider matching Userguide
I like the narrower width better, but, templates are too wide to fit.

See for example:
https://api.haiku-os.org/classBLayoutBuilder_1_1Group.html#abc185e5d9c43241664889b3b7f8df641
2017-01-06 16:10:29 -08: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
Fredrik Holmqvist
1d8306654a Rewrote device handling in EFI boot-loader
This allows me to find and boot disks and cds(*)
platform_add_boot_device tries to find the disk of the EFI partition
As on other platforms if boot disk isn't found platform_add_block_devices
will be called.
platform_add_block_devices will find all block devices that arn't partitions as
they are handled by Haiku already.
Currently first found suitable partition will be selected.

TODO:
 * pass in partition UUID's as boot-loader arg to setup boot for
any partition.
 * Better cd detection
 * Better disk_identifier

*) vfs_boot.cpp is very restrictive when it comes to booting cds.
It either do very Anyboot check where boot partition should be at offset 0,
which isn't true for EFI. In my case it's not even on that disk.
Or it only allow data session partition types.
This is currently failing as the Anyboot partition type is BFS.
2017-01-06 19:43:08 +01:00
Fredrik Holmqvist
57b59d47c5 memset was done twice 2017-01-06 19:39:58 +01:00
Jessica Hamilton
c337460525 binutils: update x86_64 to include PE targets 2017-01-07 05:24:24 +00:00
Humdinger
09ee925c56 Small change to Printer prefs strings
Talked with Vidrep, and he's right:
Apps already have a "Page setup" menu item, opening a window titled
"Page setup". Having a picture button in there that's labeled "Page setup",
too, isn't cool.
So, let's name that and its opening window "Paper setup", even if it's not
always 100% accurate. The PDFWriter e.g. has a compression and version
setting in there...
2017-01-06 08:11:37 +01:00
Augustin Cavalier
02b11c1982 LegacyPackageInstaller: Fix strnlen/strncmp usage.
I should have my "License to C" revoked...
2017-01-05 16:51:21 -05:00
Humdinger
5f050a9e7a Change strings in Printer prefs
Per tests by Vidrep, makes the GUI slightly more consistent.
Plus additional sentence casing.
2017-01-05 18:26:00 +01:00
Augustin Cavalier
bdf0ed4231 LegacyPackageInstaller: Ignore files which do not end in ".pdb".
The LegacyPackageInstaller's data folder is (and has always been)
"~/config/packages", which is of course the same directory that Haiku's
(relatively) new package management system uses. We don't want the
"administrative" folder and any HPKGs in that directory to show up in
the "installed legacy packages" list, so ignore them.
2017-01-05 12:06:30 -05:00
Jessica Hamilton
e6efd8f21c gawk: downgrade to 4.1.0 to fix build issues on x86_64 Haiku hosts. 2017-01-05 22:33:44 +00:00