Commit Graph

9395 Commits

Author SHA1 Message Date
Niels Sascha Reedijk
603e0bdf62 libnetapi.so: make headers of deprecated classes private
These classes have been moved to the public API too soon, and they need some
more time to mature before they can be declared stable.

Change-Id: I9c52a8e6cc103922abde7a6b911fe0c3e6bf5700
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3665
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-27 19:53:11 +00:00
Niels Sascha Reedijk
35d8d4d113 libnetapi.so: move deprecated classes out into a libnetservices directory
These classes have been moved to the public API too soon, and they need some
more time to mature before they can be declared stable.

In this first step the classes that are involved, are moved to a separate
folder. They will still be linked to libnetapi.so, so that binaries that
depend on them currently will not break.

Change-Id: I6c16f17573d819314a27936f065ebe675846f763
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3664
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-27 19:53:11 +00:00
Adrien Destugues
dd3b46ac1e Package Kit: smarter download resume
Pick the most advanced partial download to resume from if there are
multiple ones.

Fixes the remaining part of #16744.

Change-Id: I0ed7daf42e0346632918552e97d660b4946405cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3672
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2021-01-26 20:25:52 +00:00
X512
08e58a41e5 TextView: Select dropped text if focused
This is convenient and used in most text editors.

Change-Id: Ia39b9e6f16cc381a62e10b248033729179a0996c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2110
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2021-01-25 08:13:41 +00:00
Adrien Destugues
4cf4daf212 Locale Kit: move catalog add-ons loading to early initialization
The catalog loading has been done lazily since forever (this code was
imported from OpenTracker). It results in a race condition as explained
in #16670.

Moving the catalog loading earlier in the locale loading process avoids
this problem, since load_add_on is called before the locale roster lock
is used.

This should fix #16670.

Change-Id: If07054077f7dde41cb342a43af2abe8422239b05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3661
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2021-01-23 12:21:15 +00:00
Máximo Castañeda
67eeb4db48 MediaExtractor: go back to 3MB min cache size
Should allow us to at least play the same files we could play before.

Fixes #16738, though not its cause

Change-Id: I2d23011696b730a891c802e8c2bfc23afe0041cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3628
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-19 20:29:39 +00:00
Stephan Aßmus
bc1e082b56 BHttpRequest: Treat incomplete downloads as error
When BSocket::Read() returns 0, it was treated as
a finished transfer. This is OK when we don't know
the content length, but when we do, there is no reason
not to bubble up the error. Return B_IO_ERROR in this
case.

Change-Id: I68801dbbb85bcfd2e7aa68fd6a9ded6304e82b19
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3621
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-19 17:05:40 +00:00
Stephan Aßmus
7e677f6465 Package Kit: Delete downloads failing the checksum check
Change-Id: I3a7a914ea88e7b7b5bcc79160f46a9b4fcbba01b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3619
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-18 20:27:12 +00:00
Stephan Aßmus
60c165a53c BSecureSocket: Treat SSL-zero-return as B_IO_ERROR
Somehow B_CANCELED doesn't seem to convey the correct
meaning. Using B_IO_ERROR will also fit to the recent
changes in the Package Kit and will trigger a re-try of
package downloads.

Change-Id: I58c4d4faa705e6519e0ff9ec7c4654a6151e5486
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3635
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-16 16:32:32 +00:00
X512
111df1707b Tracker: add more string types to attributes view
Used in MIME database.

Change-Id: Ieaff506ea8be0fe7d57bfe76fd63439ef4952116
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3625
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-14 18:31:10 +00:00
Máximo Castañeda
7f9c675629 MediaExtractor: access chunk cache only when we have it
Change-Id: I533bb2e25b0756acaaa227cdd06c4067d4120066
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3622
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2021-01-10 22:07:16 +00:00
Adrien Destugues
7b661b559e BSecureSocket: fix read error handling
The current documentation
(https://www.openssl.org/docs/man1.1.1/man3/SSL_read.html) says that
SSL_read returning 0 should be handled as an error. So, let's do that.

Change-Id: I6781826ea700b6e597fd2d444fd96a1a5270c6cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3620
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2021-01-10 17:34:44 +00:00
Adrien Destugues
61282f9574 Tracker: fix invisible selection text in disabled windows
Regression introduced in hrev54742 which used DeskTextColor() on a
non-desktop view. The view color isn't set anywhere in that case and
does not match the background color, which led to drawing white text on
a white background.

Moreover, a second bug was stacked on that: the selection is drawn in
"reverse video" (using the document color for the text and document text
color for the background) only for active windows. For inactive ones, it
is drawn normally, and then a middle-grey rectangle is alpha blended on
top. Add a comment to clarify that and reintroduce the ckeck that had
been removed.

Also replace the hardcoded black for the selection background, so it
will be more easily visible for people using dark mode.

Fixes #16627.
2021-01-10 13:49:17 +01:00
Adrien Destugues
e3927d6ad4 Haiku control look: bring back the tab seams
They were accidentally removed in hrev54634 in an attempt to clean up
the code.

Reintroduce the old logic with some cleanup and improvements:
- There was a mixup of "tab side" vs "border". The constant values for
  the two are the same, so it still worked as designed, but it made the
  code harder to follow since it deals with both borders and tab sides.
- Define an isVertical boolean to decide if the tab view is vertical,
  avoiding repeated tests for specific tabview sides.

Fixes #16640.
2021-01-10 13:01:05 +01:00
Stephan Aßmus
8c812f2d63 BHttpRequest: Fix the cast and therefor GCC2 build
Change-Id: Ia0729a20d143721d395d5d50719e87b99b76bb05
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3614
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2021-01-09 15:56:08 +00:00
Adrien Destugues
f15516ff92 Package Kit: re-use downloads from unfinished transactions
There are three parts to this change:
- In FetchFileJob, if the request fails with a timeout or IO error
  (probably because of unstable connection) attempt to resume the
  download with a range request. No limit on number of retries
  currently, maybe we should add one.
- In PackageManager, before downloading a file, look around in other
  transaction directories in case it's already there. Partial and
  complete downloads are differentiated by an attribute which the
  fetch file job maintains. For complete downloads, no fetch job is
  scheduled, for partial downloads, the fetch job will request the
  remainder of the file.
- In BHttpRequest, the implementation of SetRangeStart() and
  SetRangeEnd() have been added, along with some refactoring to
  handle listener notifications consistently. This also fixed a
  bug where the final notification for download progress was not
  emitted for compressed data.

Fixes #12414.

Change-Id: I3e285741ed0e5651594a7c2e1c7170644a9d297d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3404
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-01-09 15:20:09 +00:00
Adrien Destugues
d753645e3f MediaExtractor: fix cache size computation for audio
Untested. If audio is not decoding well, try increasing the constant.

Change-Id: I151764e6bb3e69088904d33bfeb683bf0569bd23
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3605
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2021-01-08 14:28:41 +00:00
Alexander von Gluck IV
6b49a15b64 media_kit: Dynamic allocation of ChunkCache based on media
* The "default" of 3MiB wasn't enough for modern larger media
  formats, resulting in inability to play 4k video no matter
  how much horse power you threw at Haiku. (4k is ~8MiB)
* This dynamically calculates the ChunkCache based on the
  video framesize * 2.
* 4k video now plays smoothly on my Ryzen 1800x.

Change-Id: I65bf6bd6fa60ac3196ea70eeeb5e655d43c10bcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3598
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2021-01-03 20:51:37 +00:00
Máximo Castañeda
2e68fbd207 Fix wrap for AUDIO_INT
Floats don't have enough precision for all 32 bit integers. In
particular, near INT32_MAX their value is INT32_MAX + 1, which, when
converted back to int becomes INT32_MIN.

Change-Id: Ief3c1177b4f69baac13df5bac977882fea95ae01
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3511
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-30 13:35:14 +00:00
Máximo Castañeda
80a920f65d BSoundPlayer: check for NULL node
Fixes #16683

Change-Id: I81c252b6eeaeb35cc5f33a796a7242c0965c3f27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3546
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-23 19:57:32 +00:00
Alexander von Gluck IV
31fd7ccc19 kits/bluetooth: Improve knowledge of BT versions
* Drop spaces as well, any text alignment needs to
  happen in UI

Change-Id: I2258330baa51e82095e3f7432e60747abb639aa3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3538
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-21 14:57:10 +00:00
Máximo Castañeda
42b9734805 Set normal mouse mode on set_focus_follows_mouse(false)
Change-Id: Iae4300d7da5ada391c2d2dccff2b7de7f1b38245
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3509
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-21 14:29:15 +00:00
Adrien Destugues
015d6c1306 BMenuField: use anonymous namespace for internal class.
As suggested by korli, this is indeed a better way to hide internal
classes and make them completely unreachable from outside the cpp file
they are defined in.
2020-12-19 10:54:06 +01:00
Adrien Destugues
8a72ba1b54 Tracker: improve algorithm to decide desktop text color
Fixes #16673
2020-12-19 10:17:55 +01:00
Adrien Destugues
f7a0ebd7a5 BMenuField: Fix private ABI leakage
Problem introduced in hrev46195. The MouseDownFilter class may be
declared deep in the middle of a cpp file, yet without precautions, it
will end up being part of the ABI.

WonderBrush has a class with the same name, and on 64bit Haiku, a mixup
of the two would happen, leading to a crash because they don't have the
same size.

Move the class into BPrivate to avoid this.

Change-Id: I60b608edf3188816281332c972c654e3c57740b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3536
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Rene Gollent <rene@gollent.com>
2020-12-17 20:10:59 +00:00
Alexander von Gluck IV
638910607a libnetwork/BHttpRequest: Fix type mis-alignment breaking gcc2
Change-Id: I927d54758efec30bb35cd041ac5fc91a69299099
2020-12-17 08:39:17 -06:00
Alexander von Gluck IV
d36f7ca577 libnetwork/BHttpRequest: Actually report form file upload progress
* Solves #16671

Change-Id: If112d6e2319eb076968c4caf8fcd3b8746ed324f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3515
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-12-17 14:13:09 +00:00
X512
cdccd323b5 use common AutoDeleter types
Change-Id: I115e14b76f3ff049c5f7d9471efd3619a0038fcf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3483
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-12-13 19:14:13 +00:00
Murai Takashi
efc042ff48 Window: Fix dead assignment
Fix value stored to 'maxWidth' or 'maxHeight' is never read
when maxWidth > fMaxWidth or maxHeight > fMaxHeight.
Pointed out by Clang Static Analyzer.

Change-Id: I2bd0b8712d47e64298c0f915f24f7f1c87f4362e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3474
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-10 11:40:20 +00:00
X512
36aafa560b fix build after CObjectDeleter interface change
Change-Id: I76e217abcd13c22c4d68170e07333cdde4d7a891
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3461
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-10 11:39:49 +00:00
Adrien Destugues
369abf3be4 Have a minimum size for scrollbars
With small font sizes, the scrollbars don't need to get smaller than 14
pixels. So, don't allow the scaling to go below 1.
2020-12-09 21:57:31 +01:00
Adrien Destugues
5d1042057b Add Noto Sans Symbols2 to font fallbacks
Also use the correct symbol for the return key (we were using another
similar arrow because this one was not available in DejaVu Sans).

Fixes #14034.

Note that build/jam/repositories/HaikuPorts ships an old version of the
Noto package that does not include the Symbols2 font. It should be
updated. Adding this to the pile of lagging behind packages, alongside
icu, mawk/gawk, and tnftp. Can anyone take care of it?
2020-12-09 20:00:26 +01:00
Jérôme Duval
65b3fe452a GameKit: give up default template parameter for gcc2 2020-12-08 15:46:55 +01:00
Murai Takashi
2db8ba2c8d Menu: Fix dead store
Fix value stored to 'flags' is never read.
Pointed out by Clang Static Analyzer.

Change-Id: Ia154fbdd4dd5fb10716cf9079625ca65e2f58122
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3472
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-08 13:46:51 +00:00
Jérôme Duval
6336b86ab8 GameKit: gcc2 build fix 2020-12-08 14:39:56 +01:00
Máximo Castañeda
fb6ee7844d GameSoundBuffer: avoid buffer copy
Change-Id: Ibffe80ebe5e8205e853e09b6ebb9ba65b53d83e7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3475
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 12:33:22 +00:00
Máximo Castañeda
cfe72209cf U8 sound format
U8 sound has a nonzero value as its zero amplitude, so it needs to be
special-cased when mixing, applying gains and other transformations.

Change-Id: I5ad96b5f39d454bffad2449ac9f27b2ae61e2ccd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3470
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 12:33:22 +00:00
Máximo Castañeda
8e9d64f0d6 FileGameSound: fix stuck in pause when ramped
Change-Id: I346d7b93fa8507451ee46856ad6618acd6e2d609
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3469
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 04:32:56 +00:00
Máximo Castañeda
15de111dcf FileGameSound: fix buffer advance accounting
Change-Id: I15bb2b1e703cad955544a1151adc6a1277b077a8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3467
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-12-08 04:32:56 +00:00
Máximo Castañeda
8eafd6cd04 GameKit: use more than 1 sec precision ramping
Change-Id: I015f116239fad5dd48f7f4509db503dc8f60c0d0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3468
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-12-06 18:17:55 +00:00
Augustin Cavalier
10bc5b6e2f Tracker: Increase the readability threshhold to 50%.
nephele is working a more comprehensive fix to this code, but for now,
this seems to be sufficient for the time being.
2020-12-05 15:23:14 -05:00
John Scipione
30ecf636e0 Tracker: Scroll text to beginning on edit name
... so that the full file name is shown.

Center the file name in the edit box a bit better, the edit box is still
off compared to the non-editable file name by a pixel sometimes.

Use be_plain_font instead of getting the font from the PoseView since
the PoseView font is set to be_plain_font.

Fixes #16476

Change-Id: Ibda9341593163cdde898a83c98bf5ccea37126be
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3399
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-12-02 17:58:47 +00:00
Máximo Castañeda
64fc5a66b1 DefaultMediaTheme: fix Slider scale
Values are using a scale of 1000, but limits are set 0..100. Very
visible in media preferencies when using balance controls for stereo
connections in the mixer: the control is shown full right at first and
the moment you touch it and the gain is updated, you only get sound from
the left channel.

Probably the root cause of #15836 and #16070.

Change-Id: I31d3b6b11a57ca99a1cc8373d9fb003f21b192b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3445
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-30 20:06:16 +00:00
Pascal Abresch
7377c39855 Tracker: make desktop color selection try user color first
Change-Id: I47392bdafe8ecf1996886fd0a8324a114f4524fd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3407
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-11-29 16:23:59 +00:00
Pascal Abresch
7866835b41 Tracker: remove desktop check for text colors in poseview
Change-Id: I4db3cd5525242314bd7177dcdd25cd8ec0aa1f7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3406
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-11-29 16:23:59 +00:00
Murai Takashi
0404495f3b tracker: Fix PVS V595
Add NULL check for 'ContainerWindow()', since it might return NULL.

Change-Id: I0a9e7243c6d23be7559331dcd72e0675eb44809e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2161
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-27 07:19:56 +00:00
Pascal Abresch
ff21b4c370 HaikuControlLook: don't modify menu color before applying it
Change-Id: I31838d4c17d4616c2c166197596a93bf51785677
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3410
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-11-26 07:35:33 +00:00
John Scipione
1897036191 BTextView: ensure text rect width and height is > 0
Helps wth #16476 #16568

Change-Id: Idc8d399cf69776d26e492f568c9ef83bcd7a6686
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3413
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-26 07:27:19 +00:00
Máximo Castañeda
8c78892580 BFileGameSound: don't copy garbage after track end
Check for the end of track, as the stream is repositioned on the first
frame, the start of which we were copying to the buffer if there was
space left, whether we were looping or not.

Solves #16592

Change-Id: Ic49d1776577b71a4451775876597b9c9003e1d35
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3411
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-24 14:02:30 +00:00
Adrien Destugues
bc8445142d BSecureSocket: use openssl's default paths for certificates.
It is confusing to use different sets of certificates for BSecureSocket
based apps and ones using openssl directly. So, use the defaults in
BSecureSocket.

OpenSSL was modified to keep the user certificates in non-packaged so
this does not change the behavior for native apps (needs openssl 1.1.1g-3)

Change-Id: Ic398eec5efa9d036c3b810b7a3bb7142bdeb2d46
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3394
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-11-22 19:19:20 +00:00