Commit Graph

9272 Commits

Author SHA1 Message Date
X512
47102c0742 Interface Kit: introduce B_TRANSPARENT_BACKGROUND flag
BeOS didn't support transparent views. As documented in the Be Book,
SetViewColor(B_TRANSPARENT_COLOR) only effect is to not fill the
invalidated areas with the view color before calling Draw() (it avoids
flickering, especially when combined with B_FULL_UPDATE_ON_RESIZE).

A previous change made B_TRANSPARENT_COLOR actually make the view
transparent (that is, additionally to the above, the underlying view is
drawn before the transparent children), but it creates compatibility
issues.

In order to keep the API compatible with BeOS, the new behavior is now
enabled explicitly using the B_TRANSPARENT_VIEW flag. This also opens
for future developments like allowing a view color with an alpha
channel (not supported yet).

Adjust programs that require transparent views.

Fixes #15744, #15745.
Helps with #15645.

Change-Id: I529574ea23db0a23579521b263bc8d572775e35a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2275
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-16 00:59:37 +00:00
Niels Sascha Reedijk
5cfca119fb HaikuBook: Add documentation for BCardLayout
This adds documentation for BCardView, BCardLayout and BLayoutBuilder::Cards.
There is also a bit of cleanup for the BSplitView documentation.

It also makes explicit when a developer passes an invalid argument to
BCardLayout::SetVisibleItem(), by making that a debugger() call.

Change-Id: I17ac52cc773bb76c4f81beaa76f72af62a9e10f4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2460
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-14 08:00:13 +00:00
Niels Sascha Reedijk
4b918abdb0 Package Kit: internationalize strings that may be displayed to the user
This fixes #14525.

Change-Id: I25810a4e12caed7aa47717e278591b1716b6198c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2329
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
2020-04-13 09:00:10 +00:00
Alexander von Gluck IV
19733b44fa kits/bluetooth: Style cleanup, add additional vendors
Change-Id: I33ac709fe1dc759bf9b98fe94bd1820278ef33d4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2471
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-04-12 19:41:57 +00:00
John Scipione
1482b250a7 IK: Update scroll bars for alternative control look
Scroll bars should look and work identically to before on
HaikuControlLook.

Add DrawScrollBarButton() and DrawScrollBarThumb() and
DrawScrollBarBorder() methods. These methods are used to draw scroll
bars in a generic way so that they can be drawn differently by alternative
control look's (e.g. BeControlLook). Also it gives us back drawing of
scroll bar knobs.  However the knob setting is not exposed in the
interface in this commit.

These methods are in addition to the 2 existing DrawScrollBarBackground()
methods that draw the scroll bar background. One draws the area above and
below the thumb and the other is called by the first to actually draw the
area.

The rest of the drawing besides the backgrounds was being done in
BScrollBar before. To draw the scroll bar arrows and thumb we were recyling
other ControlLook methods, while this worked well enough on HaikuControlLook
it wasn't flexible enough for alternative control looks.

DrawScrollBarButton() is used to draw the four scroll buttons and is
typically (so far) used in combination with DrawArrowShape().

DrawScrollBarThumb() draws the scroll bar thumb.

DrawScrollBarBorder() draws a 1px border around the entire scroll bar,
potentially B_KEYBOARD_NAVIGATION_COLOR if focused (although this is
feature not currently used.)

Draw unscrollable scroll bars as if they were disabled including the
buttons with their arrow shapes, background, and thumb.

Add FBC backwords compatibility macros in ControlLook.cpp

Change-Id: I9237c5ce45d17d674785111d51de951e5686306b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/351
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-11 16:57:54 +00:00
X512
67597f4204 Interface kit: fix regression introduced in hrev53944
In hrev53944 selection is cleared if text view lose focus, but it
don't work properly in StyledEdit, causing clearing selection when
menu is opened. Clear selection on lose focus is needed for text controls,
so when you click on another text control, previosly focused text
control should clear selection. This behavior is working in BeOS, so
some investigation is required.

Fixes #15810.

Change-Id: Ie104fc1d7e76c2cd2b97d3a0462856fe70cccbbf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2355
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
2020-04-11 16:55:53 +00:00
Jérôme Duval
fedaf76622 HttpRequest: fix gcc2 build after f4fce2fd2e 2020-04-10 13:50:55 +02:00
X512
f4fce2fd2e HttpRequest: use off_t for reply content size
Fixes #15850.

Change-Id: Ic5d64ecba92306cbe798c94ac8e4a7626125e09b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2464
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-04-08 14:16:46 +00:00
Adrien Destugues
61557c8240 BListView: do not spawn a thread on every mouse click.
That's a bad idea. The drag and drop tracking could get confused enough
to crash app_server (possibly because of calling InitiateDrag multiple
times?)

Fixes #14983.
2020-04-04 11:50:07 +02:00
X512
f7db27344f Keymap: remove iterator change inside for loop, no functional change
Pointed by clang.

Change-Id: I3aaad5b1e03385358ccb729251fa31d35108f389
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2392
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-03-23 01:30:23 +00:00
X512
8152128002 Fix clang warning "mismatched-tags"
Change-Id: I00f26e27d8ac24a46b528ea7ed47b92c2967ff2e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2390
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-23 01:30:23 +00:00
Augustin Cavalier
8eaf4427f0 Tracker: Refactor IconCache to use BOpenHashTable.
This removes the last usage of the old OpenTracker OpenHashTable,
and so it can now be removed.

Change-Id: I7a7bceef1d3fc74c7fdfa7b079e53576452703dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2339
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-13 12:39:43 +00:00
Niels Sascha Reedijk
1751209031 Fix error in string.
Reported by a translator. Thanks!
2020-03-10 21:52:14 +00:00
John Scipione
ddb8a39005 BWindow: Adjust default zoom for new mini-mode
Treat bottom left, bottom right, and top left mini-mode like
horizontal mode and go full screen in top right mini-mode.

Change-Id: I55c4c0875b5696e6c193a72d96f309c3b058bf9c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2254
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-09 12:11:21 +00:00
Augustin Cavalier
1ba9396139 Tracker: Replace the deprecated std::hash_set with our HashSet.
Change-Id: I7d29f0c905a3ab1a20f6eca252ff1f168218c23f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2322
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-08 08:26:27 +00:00
Augustin Cavalier
996c9bf0dd Tracker: Use ObjectDeleter instead of the deprecated std::auto_ptr.
Change-Id: I5d358076065fefa39df923e4554599b716d9883b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2321
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-08 08:26:27 +00:00
X512
1c9c772967 Interface Kit: make BTextControl behave like BeOS
Contents of BTextControl should be not selected if text is directly clicked.
Selection should be removed if BTextView lose focus.

Change-Id: Ifba914c2ada4fc1aac88205f69a64a4356009469
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2109
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-03-07 18:48:32 +00:00
X512
9b33a309da Interface Kit: fix menu resizing when scrolling is enabled
BMenuWindow::Attach/DetachScrollers can be called when scrollers are
already attached/detached and it should handle this case properly.

Call BMenuWindow::DetachScrollers when scrolling is not needed anymore.

Fixes #8513.

Change-Id: I1f70b63d75106cf33ab1f72d34e221a54b45a75e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2310
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-07 17:33:25 +00:00
John Scipione
2e08685b99 BMenu: Rename FrameMoved and FrameResized variable names
No functional change. lowercase_with_underscore file names are not
in-line with Haiku's style guidelines.

Change-Id: I254c975ee60168963ca4039a61dc428c05e0e6ba
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2306
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-03 10:56:05 +00:00
Niels Sascha Reedijk
02e45e32ae HaikuBook: Initial documentation for BNotification
The implementation file contained some documentation. This has been moved
to the Haiku Book (and is rewritten in most cases). The documentation gives
some insight on how the notification_server works.

Change-Id: I82bafcf57101d4882bdf07e7f731df9cd8adc861
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2299
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-03-02 22:10:04 +00:00
Augustin Cavalier
ab319eb798 BRegion: Do not "cheaply convert" to the internal format.
_ConvertToInternal does the same thing, and should get inlined
under normal circumstances, so just use it.

No functional change (intended).

Change-Id: Ic4fc9daeb33ab33967d795065a077f282e844f6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2297
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-01 18:20:56 +00:00
Augustin Cavalier
f816ef57aa BRegion: Remove unneeded inline "documentation."
All this (and more) is in Region.dox already.

Change-Id: I94ff154cc78cda87d82941deb30f73cac39c3409
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2295
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
2020-03-01 18:20:56 +00:00
X512
fa60e7a684 BMenu: remove delay when opening submenu with mouse
Fixes #11703.

Change-Id: Iae01eeffee27ecde5bb333c85b8c3cb411f1bd00
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2274
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-27 00:51:48 +00:00
Murai Takashi
3548a2eb71 tracker: Fix PVS V595
Fix 'fFile' pointer was utilized at line 327
before it was verified against NULL.

Change-Id: I8214bce9a99d783b3c53a7b8c5696b0b0dfc3490
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1440
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 05:06:14 +00:00
X512
17a91a9886 BMenu: fix menu navigation area
Change-Id: If9326ebc99978627d9dfb1eaff67912f0114f292
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2071
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-25 04:41:22 +00:00
Alexander von Gluck IV
04f1baa771 EFI: Make our haiku_loader architecture agnostic
* This is the bulk of the work. Anything else should be
  minor cleanups and tweaking.
* riscv64 isn't a viable EFI platform yet.. just acting
  as a stand-in to test a non-x86 EFI haiku_loader

Change-Id: Ib03de81e2b562e693987b86d7b4318209fb1c792
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2256
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-21 14:29:22 +00:00
X512
6bff918400 Tracker: fix window focus behaviour
* Also fix LongAndDragTrackingFilter
Fixes #15605

Change-Id: I98c5f3ca435e54c98515ebe2fccbbfd5d08c1a25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2081
Reviewed-by: Sergei Reznikov <diver@gelios.net>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-17 17:29:13 +00:00
Jérôme Duval
9c9a810c41 Media Kit: BBufferCache: if not reclaimed, only mark the buffer for deletion
hrev53379 clears the buffer cache for disconnected clients, and also delete buffers.
This is too early (see #15263, media_addon_server crash), and should only happen
after the buffer is recycled. This can be resolved by abusing the fFlags field of
BBuffer to mark the buffer for deletion, and mark the buffer to be reclaimed.
Some BBuffers don't reside in the SharedBufferList, so we have to mark them as to
be reclaimed. For those in the SharedBufferList, call a new RemoveBuffer(), which
can check whether the buffer is still to be reclaimed. For reclaimed BBuffers,
delete them right away, others can be marked for deletion.
fixes #15606 #15263, possibly #15433

Change-Id: I66e94138e7e10a40d4c48e2ac042f816c79f5aab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2245
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: X512 <danger_mail@list.ru>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-16 08:38:49 +00:00
Jérôme Duval
27fee67244 Media Kit: let launch_daemon know that media_server will quit
'Restart media services' in Media Preferences works better.

Change-Id: Ifbffdbd81ee851ae3e7d3dfd14f3d5f41ac155ce
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2240
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2020-02-14 14:24:13 +00:00
Adrien Destugues
8854b89737 PaneSwitch: fix a layout issue with large font sizes
This is used in Find window and also in Installer.

Remove some unused code (I think leftovers from Tracker InfoWindow
refactoring).

Change-Id: Ic0dd07e06c11b3839adbe5b8ef9598a5b16171a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2234
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-02-09 20:52:27 +00:00
Adrien Destugues
0e280da525 SecureSocket: fix non-blocking reads
OpenSSL says we should retry when a non-blocking read finds no data is
pending. But in that case we should not retry immediately, because the
operation should be non-blocking.
2020-02-08 22:21:27 +01:00
Augustin Cavalier
2b19786285 Tracker: Remove unused variable.
Fixes the build (due to a -Werror).
2020-02-08 12:34:00 -05:00
Olivier Coursière
4c8c060bc4 Make the FilePermissionView font size aware
Change-Id: Ibf100e1068a4807dca34c827acdd195e7effd535
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2196
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-02-08 16:38:09 +00:00
X512
b3de8bea44 Package Kit: convert HTTP error code only on BHttpRequest
Other request types exists such as BFileRequest.

Fixes #15675.

Change-Id: Ib2e07fad4dd9f682d2b9fc0cdbf0ca60ecd3adfb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2200
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: François Revol <revol@free.fr>
2020-02-05 14:55:45 +00:00
Ryan Leavengood
e10de1ecf5 Visually align shortcuts in menus
In a menu, we use the right side both for submenu arrows and shortcuts.
As a result, when an entry has both a shortcut and a submenu, its
shortcut is not aligned with others, and this does not look so nice.

The spacing for the arrow appears only if there is a submenu in any of
the items in the parent menu.

Change-Id: If91fdcdad36abb0141fb05d1f59141f89540c1db
Reviewed-on: https://review.haiku-os.org/c/haiku/+/355
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-04 23:06:54 +00:00
François Revol
0ef0921d99 Package Kit: Return proper errors in FetchFileJob
This should give more meaningful errors in pkgman
(not so sure, feel free to tweak the mapping),
and also avoid running the next job if fetching failed.

Change-Id: If76968f705ff25f7ecf1a5f91d88a02040d24665
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2186
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2020-02-04 02:18:09 +00:00
Adrien Destugues
8769583f90 Build fix. 2020-02-03 22:19:22 +01:00
Adrien Destugues
3bea15adca BSecureSocket: retry reads after interrupted syscalls.
SSL_AUTO_RETRY does not cover this case (it only covers SSL errors, not
underlying socket ones), so we still need to retry reads manually here.

Fixes #14638.
2020-02-03 21:47:08 +01:00
Jaroslaw Pelczar
cbdb30f467 arm64: Add more random scripts to get stuff to compile
Signed-off-by: Jaroslaw Pelczar <jarek@jpelczar.com>
Change-Id: Ie043af5b7471f626a1ffe100848151c832dcc439
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1853
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2020-01-25 08:50:51 +00:00
Murai Takashi
992ae400ec Fix catching by value
Pointed out by LGTM.
Change-Id: I223655c728305f6f45b3738553da5b7d7a69e8c8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2134
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-21 19:26:22 +00:00
Kyle Ambroff-Kao
654135466f support/BPath: Flatten should work on empty BPath
BPath::Flatten() on an empty path returns B_OK in BeOS R5, just
writing an empty entry_ref to the povided buffer. The Haiku
implementation has some additional validation that causes B_NO_INIT to
be returned instead.

This patch attempts to recreate the same behavior of BeOS in this
situation.

* Don't check for initialization in BPath::Flatten(). Instead,
  just write an empty entry_ref to the provided buffer if the BPath is
  empty.
* Fix estimation of expected size when testing the return value of
  BPath::FlattenedSize().
* Clean up warning by removing unecessary forward-declaration of
  CppUnit::Test.

Change-Id: I88880cbb298bdcb594c9c8fef48314165c49e9e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2115
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2020-01-21 09:36:42 +00:00
Kyle Ambroff-Kao
7037b5d9bc support/Archivable: Reset errno in validate_instantiation()
validate_instantiation(BMessage*, const char*) sets errno for invalid
input, or if the requested class is not found, but it doesn't reset
errno to B_OK if validation succeeds.

I verified that in BeOS R5, errno is set to B_OK if
validate_instantiation succeeds.

This fixes BHandler::Instantiate2 and BHandler::Instantiate3 tests.

Change-Id: I531777e6ba47e9635da2da1fc8c8103bb233b0f3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2136
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-21 08:46:20 +00:00
X512
59b700d086 Interface Kit: remove more workarounds for BDragger
This workarounds are no longer needed after hrev53713.

Change-Id: I7b809c79bd9d2345a991f0d2360f79876d10cd6b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2132
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-19 18:25:22 +00:00
X512
c4a686d8d1 Interface kit: fix displaying draggers when they were initially hidden
IsHidden(this) should be used instead of IsHidden() because IsHidden() return
true if window is hidden (at moment of creation for example).

Fixes #15646.

Change-Id: I08c8bacd634139dd62fb239e16cb80f512e4be6d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2128
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2020-01-19 18:22:41 +00:00
X512
52ac76ce34 Interface Kit: fix BDragger background drawing
Change-Id: I1ce8eca127e14af0652ef38fedcbbf588f1567fd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2092
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2020-01-16 13:23:57 +00:00
X512
db7c4791bb Interface Kit: read reply before calling hooks.
Part of #15548.

Change-Id: I074d36717ef1e2fad4e8bc215448fa72f797ed7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2099
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2020-01-11 18:54:36 +00:00
Humdinger
a00b7c2f18 DoCatalogs for VirtualDirectoryWindow
Fixes #15601
2020-01-04 16:59:13 +01:00
Adrien Destugues
755a88de68 Actual build fix. 2019-12-31 17:20:01 +01:00
Adrien Destugues
c67336bf3f Build fix. 2019-12-31 16:38:48 +01:00
Adrien Destugues
d57174ea94 BLanguage: check locale validity in SetTo.
Fixes #15514
2019-12-31 14:26:32 +01:00
Kyle Ambroff-Kao
fbc30e9145 support/String: Revert 6c67c7d63 to fix double-free
6c67c7d63 was attempting to fix a leak caught by a static analysis
tool, but it actually just introduced a double-free bug. Running
`UnitTester BString` will result in a crash.

The original code was correct because, in the event that realloc()
fails in BString::_Resize(), the value of fPrivateData is still
retained. It will be freed by the destructor of BString only if
fPrivateData is not shared by another BString instance, since BStrings
are copy-on-write.

Note that while the change in 6c67c7d63 caused tests to fail, that
doesn't mean those tests are ideal. They only trigger
BString::_Resize() to fail because they depend on implementation
details of hoard2 which limits allocations via malloc() to
1GB. Most malloc() implementations will allow allocations of arbitrary
sizes using anonymous mappings (mmap on Linux, or create_area() in
Haiku). This is a much bigger change, so for now I'm just adding some
comments so that we can revisit these tests if we make a change to the
allocator.

Change-Id: I208c1c7a76b6b4409d237b911c62bb3198e49dab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2060
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-31 11:03:59 +00:00
Adrien Destugues
d9e196c7f5 DefaultMediaTheme: move controls to a namespace
They have generic names and are likely to conflict with other things. In
particular, there is another BPrivate::TitleView in BColumnListView,
which results in weird behavior (and me wasting days debugging things
and scratching my head) when one links libmedia before libcolumnlistview
and the wrong one ends up being called.
2019-12-26 22:54:54 +01:00
Adrien Destugues
4766e7fe56 Tracker InfoWindow: collapse borders and make resizable
Fixes #15344.

Change-Id: I3560137248babb88e9475efb775675decb4d1181
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2050
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-22 20:59:26 +00:00
Jérôme Duval
b073975e18 media: fix 64-bit debug build
Change-Id: Ie8c19fc5f067da9973cc52ec4c787a4ad36e390c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2044
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:33:11 +00:00
Jérôme Duval
feeb4b5d93 RosterPrivate: add IsShutDownInProgress()
enable to check whether a shutdown process is in progress.

Change-Id: I8efdddb3caa80e9fd188f202b6e92a888a7608e5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2042
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-12-21 20:32:31 +00:00
X512
bb501d4c74 BTextView and BListView: fix scripting
fix #15539

Change-Id: I5139b91214e19b35af1ead203c070837b7a15bd9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2017
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
2019-12-16 09:51:16 +00:00
Adrien Destugues
baa739985b FileGameSound: remove superfluous parentheses.
Pointed out by Axel on haiku-commits.
2019-12-11 13:24:39 +01:00
Kacper Kasper
c67dde0f2c app_server: Add tiled bitmap drawing routines
Change-Id: I9a7bd967f2cc95d815a66707b764cf5e33b3f8ed
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1962
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-09 12:22:28 +00:00
Adrien Destugues
69f814cded BFileGameSound: allow initializing from a BDataIO
There is no reason to not allow this, and it makes it possible to load
data from eg. a BResource instead of a file, which is very useful.

Remove some unused members in the class and dead code, and fix style
issues.

Change-Id: I94cbd0c13c469ea80f55028cf33dfde2de4365ef
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2001
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-12-09 12:00:17 +00:00
Murai Takashi
2a49e094a6 Tracker kit: Fix memory leak
Like moveList and copyList, duplicateList could be deleted here.
Pointed out by Clang static analyzer.

Change-Id: Ic80181af960bc8eb759449ea5719e9a439a877a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1996
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-07 09:32:09 +00:00
Adrien Destugues
4236826da6 BGeolocation: build fix 2019-12-04 17:42:53 +01:00
Adrien Destugues
edc5a2174e BGeolocation: add position to country mapping
Using the geonames.org API, so we will need an API key for it (similar
to the one used for MLS, deployed by the buildbot)

The unit tests uses the "demo" user, which is restricted to 20000 API
call credits and often expired. But we cannot use our secret key here as
it would need to be available to anyone running the test. If we ever get
to automate running the tests on a buildserver we could probably make it
use the secret username known by our buildbot instead.

Change-Id: Ia16880db82555ce85505ad28e1c623f692f46be0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1873
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-12-03 08:01:14 +00:00
Adrien Destugues
70cdd7d4f5 BCountry: add SetTo and InitCheck.
Change-Id: I5fbc2a1c0e735d6edeb23672017bb64d1b3f4390
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1872
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-12-02 12:32:15 +00:00
John Scipione
ea5c088d09 Tracker: fix fall back to bitmap icon
We can convert a bitmap icon to B_RGBA32 and scale it at the same
time if we pass in the right size to IconUtils. Don't error out,
force the icon_size to be either B_LARGE_ICON or B_MINI_ICON,
grab the bitmap at that size then convert and scale it.

Implement a second fallback. If the scaling and converting fails
then use ImportBits to convert the icon from B_CMAP8 to B_RGBA32
then center it without scaling.

Fill with transparent before drawing bitmap to prevent artifacting.

Fixes #9554

Change-Id: I827589236fa4f1521e3139ec29b7d60d51d2f879
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1960
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-11-22 23:25:51 +00:00
John Scipione
fb3493dfef BControlLook: Move tab frame drawing into DrawTabFrame()
The tab frame is drawn behind the tabs.

Create a new DrawTabFrame method in BControlLook and HaikuControlLook
that draws the tab frame background.

Until now we've been reusing the DrawInactiveTab method to draw the tab frame
in BTabView. While this works on HaikuControlLook, it doesn't work on other
ControlLook's (such as BeControlLook) that draw their tab frame differently.

Add FBC method to preserve binary compatibility on gcc2 and gcc4.

Move DrawTabFrame method to where _ReservedControlLook1 was in header.

Set rect to area of tab frame in TabView instead of doing the
calculation in HaikuControlLook so that others may benefit.

Change-Id: I513e238914f6d680f495659b6ec902df15555015
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1936
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-11-22 23:24:05 +00:00
Axel Dörfler
f1271b6454 BPath: Removed superfluous term 2019-11-19 17:35:19 +01:00
Adrien Destugues
9c89ceb807 BTextView: missing archiving of HideTyping()
This was not stored in BeOS, but that looks like an oversight on their
part and adding it is unlikely to break anything.

Change-Id: I5dbaeb85adf97afc5040a3ecc1bff264af0b0b57
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1888
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-11-06 07:36:20 +00:00
Humdinger
894c9f268c Localizing "Attributes" tab of InfoWindow
Change-Id: I38bacade1f7e9648e7ef80ca39cc197410e7114f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1923
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-10-20 16:51:03 +00:00
Adrien Destugues
083314c2cb Create the port pool in MediaRosterUndertaker
Follow up to #15135, which created a regression, apps would crash if
using the port pool before creating a BMediaRoster instance. Now the
port pool is entirely managed by the MediaRosterUndertaker, which is
less confusing.

Fixes the media_addon_server crash on shutdown for me as well, but I
don't remember why (I had studied the code and came to the conclusion
that this should fix it, but I don't remember the reasoning).

Fixes #15263, and regressions for apps using the port pool before they
instanciate the BMediaRoster.

Change-Id: I887dbc590d8ee9de391b6eae0206944bfe99325f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1897
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-10-05 21:09:43 +00:00
Kacper Kasper
14c3e38739 Discard column info in Debugger
* With them Debugger doesn't allow setting breakpoints inside functions.
* Workaround for #15159. Further explanation by anevilyak is also there.

Change-Id: I661b7dcb28a4c02f671b85cb5c26fa0bd5a53078
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1892
Reviewed-by: Rene Gollent <rene@gollent.com>
2019-09-28 01:27:42 +00:00
Adrien Destugues
07838f4cd3 BTextView: preserve ViewUIColor when unarchiving
When unarchiving, we can rely on BView to properly restore the colors,
and we should not alter them. So move the code doing that outside of
_InitObject, and into all non-unarchiving constructors instead.

Change-Id: I98050c69bb3b8edf6e77ad0498e2dade5eaadb1d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1887
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-27 22:53:42 +00:00
Adrien Destugues
23d6916acd Tracker InfoWindow: cleanup of size string invalidation code
Should fix #15351.
2019-09-23 20:25:33 +02:00
Adrien Destugues
79e2e1b971 Fix accidental code removal in tracker infowindow refactoring
Should fix #15322 and #15352
2019-09-23 20:08:46 +02:00
Murai Takashi
04a1ee9750 libnetapi: Fix 'new[]' array freed with 'delete'
sMutexBuf is allocated by new[] in SSL::SSL(), but freed by delete.
Pointed by LGTM.

Change-Id: Ic16501883be4e3b7ca5fe24e1585b6e14ae3ff36
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1883
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
2019-09-21 16:09:51 +00:00
Adrien Destugues
d761df9f70 BMessage: fix NULL pointer dereference in out of memory condition.
Change-Id: I75ba6e5069cda8a92fd88bf7d1e999232359e73c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1864
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-14 20:06:18 +00:00
Humdinger
4015b5877f Mail: Fix 'Leave as 'New'
When closing an unread email via "Close | Leave as 'New'", it's
still set to MAIL:status "Read".
IComparing the BString read from the MAIL:status attribute returns
"0" for a match, which the if-statement turns to false...

Change-Id: I4c3846fd39a6056e4bed8388e41dbf4929798799
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1865
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-14 20:05:52 +00:00
Mikael Konradsson
e5d533fda5 OutLineListView: adjust color of expander arrow when using dark color scheme
Change-Id: I7de7a460111556b7f40565ed0a6110c1f7660a25
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1847
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-09-14 05:08:06 +00:00
Simon South
75e5739772 BWindow: Do not invoke BView handlers directly
When dispatching a message to a BView, pass the message on to the view's
MessageReceived() method rather than invoking one of its handlers (e.g.
KeyDown() or MouseDown()) directly.

This commit moves the existing handler-invoking logic from
BWindow::DispatchMessage() into BView::MessageReceived(), preserving the
existing functionality.

Fixes #15254.

Change-Id: I230c0781df13e54e08573a5a31d7550520c060d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1723
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2019-09-01 03:06:36 +00:00
CodeforEvolution
9e54316c52 Fix the build of test_app_server on 64bit
So many Jamfiles to search through...runs also, but there
are lots of graphical glitches

Change-Id: Ibf9e64566a5b8c5742792ac9b1b0f9ccc6693c8d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1753
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-09-01 03:04:52 +00:00
Adrien Destugues
60b52ce0bc HashMapCatalog: handle more standard escpae sequences.
Fixes #14705
2019-08-31 18:51:02 +02:00
Adrien Destugues
b4e2eff2f6 DebugWindow: improve layout
Fixes #15155.
2019-08-31 18:26:23 +02:00
Adrien Destugues
5f996be3c6 InfoWindow: more window sizing improvements
Fixes #15310 and other problem mentioned in comments threrein.
2019-08-31 17:18:22 +02:00
Adrien Destugues
72ce594753 InfoWindow: allow some resizing of attribute columns
Fixes #15319
2019-08-31 17:18:22 +02:00
Augustin Cavalier
47a21c5c89 s/Haiku License/MIT License/g.
They are the same thing.
2019-08-30 18:16:02 -04:00
Mikael Konradsson
aabebc302e Interface Kit: Fix some hard-coded colors.
* Fix hardcoded black color in SeparatorView that caused invisible or
   hard to read labels if you had a dark panel color. E.g MediaPrefs
 * DrawBorder in HaikuControl didn't care about dark mode. Added check
   for light/dark and changed the Tinting accordingly. We should probably
   do the same for FancyBorder style as well.

Change-Id: I065211e56b0db5acd05ea287d6cacf75786f306f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1751
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-30 14:28:32 +00:00
Adrien Destugues
03d334bbdf build fixes.
sys/types.h cannot incliude endian.h because that creates circular
include dependencies.

Add proper multiarch grist to libcolumnlistview.
2019-08-27 20:51:51 +02:00
Adrien Destugues
ab56137e24 IconCache: remove incorrect ASSERT()
The code does just fine both if entry is NULL and if it doesn't have an
icon. However, if entry is NULL, this assert calls a method on it, which
is a bad idea.

Change-Id: I80b314db373970d99eb008aeaec6254d14c39ca7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1749
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-08-27 06:55:47 +00:00
Augustin Cavalier
19f8517fc3 Tracker: Link against the right libcolumnlistview. 2019-08-26 22:13:34 -04:00
Adrien Destugues
84dc116351 Tracker InfoWindow: add a tab with file attributes
Now there is no need to resort to listattr and catattr to see the
attributes of a file. You can get them easily, from the GUI.

Limitations:
- No editing support
- Only a few well-known types are handled
- No support for attributes with array of values or otherwise unexpected
  size
- Special handling for B_TIME_FORMAT which is annoyingly of a different
  size between 32 and 64bit systems, making the attribute format
  slightly incompatible.

The window is a bit small to show all the information, so the "Type"
column is put off-view on the right, one can scroll to it if needed.

Vertically there is space for only 4 to 5 entries. It was suggested that
we could merge the permissions and information tabs, making the new
first tab higher, and thus adding more space to this one as well.

Change-Id: I75d192314bc60378c2f058547485cb9c30263485
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1748
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-26 23:38:18 +00:00
Adrien Destugues
9bb8d3a40a Tracker InfoWindow: fix regressions
- Misplaced popup window for showing truncated paths in full (#15301)
- Crash when using Alt + E to edit the filename (#15302)
- "Link To" information for symlinks does not fit in window (#15303)

Change-Id: I72416ab4473e0b01c33817b9364eb9e9e59172e1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1747
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-26 23:38:18 +00:00
Adrien Destugues
2140520f96 Tracker InfoWindow: layoutify, use tabs
- Use layout kit to make a few things simpler
- Separate the view showing the header (icon/name) and the one showing
  the extra details, making two simpler files instead of a complex one
- Fix some layouting issues
- The permissions are now in a second tab, allowing to add a third one
  with other things (more on that later)

screenshot: http://pulkomandy.tk/drop/fileinfo.png

Change-Id: Ief80815eba749723664f40f1317f8aa4cf692162
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1745
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2019-08-25 19:17:14 +00:00
Adrien Destugues
ebb30434c9 Tracker: move AttributeView to own file and rename
Change-Id: I046eb9aa0fef792e9e940d0a6dfd887ede2fa996
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1744
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-25 19:17:14 +00:00
Adrien Destugues
79d1a09c19 Adjust SEARCH_SOURCE also for the DoCatalogs invokation. 2019-08-25 20:19:11 +02:00
Adrien Destugues
97218560be Tracker: move InfoWindow to a subdirectory.
I'm going to split it into even more files, and it's easier to track
what's part of it this way.

Change-Id: I09c302da38ce96f0077c5f53fd17c08cdd6c22c9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1743
Reviewed-by: Ryan Leavengood <leavengood@gmail.com>
2019-08-25 17:41:45 +00:00
Adrien Destugues
4eaa1f35e5 BRoster: preserve symlink as "app" if given one
Symlink name or attributes may be relevant to the launched app, so it's
important that we pass the unresolved symlink as argv[0] when running
it.

Change-Id: Ie1d73bc4e9d5c3d0476f205ce635aafd9203e553
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1739
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 16:28:45 +00:00
Adrien Destugues
6faf979da7 BRoster: Fix infinite loop when trying to launch app with missing libraries.
Fixes #14986.

Change-Id: I727fde0c475f0684567a46be5af616cad56a9b4c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1738
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-08-24 16:28:45 +00:00
X512
8043df7a45 Fix BMenuBar width in Tracker 2019-08-23 22:19:27 -04:00
X512
f146f74b42 Fix BMenuBar width 2019-08-23 22:14:05 -04:00
Augustin Cavalier
a830ec9a1c BSecureSocket: Don't continue with an untrusted certificate by default.
It has been multiple years since this comment was written; all relevant
apps have added their own hooks around this, so we should now be
"secure by default."

Also spotted by a random Hacker News commenter.
2019-08-23 17:56:09 -04:00
Augustin Cavalier
8d63a9060e BSecureSocket: Pass the hostname to the X509 layer to validate it.
Now SSL certificates with the wrong hostname actually fail to validate.
While I'm at it, remove the usage of BString and just check [0] directly.

Spotted by a random commenter on Hacker News.
2019-08-23 17:51:59 -04:00