This file was imported from glibx and uses __USE_GNU as defined by
glibc(s features.h. Our implementation of features.h is simpler, just
defining _DEFAULT_SOURCE directly and that's what we use in other
headers.
As a result, using GNU extensions to regex.h required defining __USE_GNU
directly in applications (for example in TraX).
Fixes#11818
Change-Id: I11e4cf2e88c330cf58083852c4b33aedb8a3a9ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7238
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
We bypass device logic in datalink_send_routed_data() in the case
of RTF_LOCAL, so if we don't update the stats there, they'll never
get updated. Furthermore, there's places packets can be dropped
inside the device reader thread. So, we might as well consolidate
the stats-updating logic and get it out of drivers.
(The only remaining case where drivers need to update stats is when
they drop a packet in receive(), as the stack can't tell when an error
from receive() is due to a dropped packet or not.)
Fixes a potential leak on packet drops in the device reader thread,
and fixes loopback statistics for TCP/UDP/etc.
... but extending vertically above and below the list view.
https://www.haiku-os.org/legacy-docs/bebook/BListView_Overview.html
"BListView provides an autoscroll feature: There's an invisible area
about 25 pixels high both above and below the list view; if the user
clicks inside the list view and then drags into this autoscroll area,
the contents of the list will scroll in the direction of the mouse."
Instead of 25px scroll vertically without limit because scrolling
speeds up as you move the mouse cursor further away.
Change-Id: I52296beb2b0173fc5c909255163e8725e99c2b6c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7244
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
... and others and double check for valid items on MouseMoved().
Bail out if drag item is invalid instead of deselecting.
Make sure that the item is valid before deselecting it.
Fixes#18707#18716
Change-Id: Ic115f713f2aef7dfebafd23bc3107106b9128b8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7243
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Create TrackerDefaults.h to share default setting values between
TrackerSettings.cpp and SettingsView.cpp instead of duplicating
the default value in both places.
There is now one source of truth if we ever want to change a
setting it won't cause regressions to the Defaults and Revert
button state.
TODO Does not yet include Disk auto-mount settings.
Add HideDotFiles to the defaultable list for Windows settings
and make its default false (was true in some places).
Fix issues with the Defaults button not enabling Enable type-
ahead filtering and Generate image thumbnails as it should.
Move default color constants to TrackerDefaults.h, remove TODO.
Rename kSpaceBarAlpha to kDefaultSpaceBarAlpha matching rest.
Create RGBTOHEX(c) macro to convert rgb_color to a (hex) number
for HexScalarValue to set the default space bar colors.
Saving these old hex values in the commit message:
UsedSpaceColor: 0xc000cb00
FreeSpaceColor: 0xc0ffffff
WarningSpaceColor: 0xc0cb0000
Reorder setting to match display order.
I've gone way over 80 in TrackerSettings and SettingsViews due
to long variable names.
Change-Id: Iafd6dfc5e738562d73967558e1f151fc7fed5866
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7196
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
After this change `POKE_UNMAP_MEMORY` ioctl will became redurant and
an alias for `delete_area()`. Areas will be automatically deleted
on team exit.
Change-Id: I336b49c2281abf064e1bf28d908c7b2c5afd4df0
Largely based on a_brief_introduction_to_our_source_repository_layout.html
from the website, revised and updated. I will delete the one from the
website and put a redirect to here once this is merged.
Change-Id: I06657bbea4c16df7bff1f2357cffd2ec8a63c65a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7236
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Fix _DuplicateKeys() conflict check for Caps Lock to ignore right side.
- Create kUnset constant set to 0 so it's clear what's going on.
- Create kDisabled constant set to -1 for that case.
- Declare loop variables one time out of loop scope, uint => int for -1.
Fix _MarkMenuItem() warnings icon check. We should get a yellow warning
icon if your left and right modifiers don't match (except on Caps Lock).
Create an _UpdateStatus() method that calls the other methods we need.
Reverse the placement of the Revert and Cancel buttons. Cancel goes just
to the left of the OK button and Revert goes all the way left.
Restore _HideShowStatusIcons(), this is used to push the menu fields
over when there is no conflict. _ToggleStatusIcon() convenience method.
The key role is called "Caps Lock" not just Caps. Method and variable
names are fine, but the " Lock" part is important in the label. Also use
"Caps Lock key" instead of just "Caps Lock" for the menu field value.
We use " key" at the end for the other cases to differentiate them from
the role label.
Minor nitpicks:
- Change comment variable name to label. I understand that it says
B_TRANSLATE_COMMENT, but it's a label, the comment is for i18n.
- Fix same method declaration style, and in header.
- Add 2 new lines after pragma instead of 1
Change-Id: I194e69486310a249d0ef2d5d5977ae69954e9a27
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7179
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Multi-select lists may also auto-scroll on drag now as well.
Document ScrollTo(index). Give Scrolling its own section.
Change-Id: I36284a28376a01bafd23ddb30162fc786fb41521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7213
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
means B_DEVICE_TYPE, B_DEVICE_SUB_TYPE, B_DEVICE_INTERFACE.
_CLS is rare, it means I don't own devices with this attribute.
from the spec: _CLS:
Class Code – supplies OSPM with the PCI-defined class, subclass and programming interface for a device. Optional.
Change-Id: I4f7b7ed66cbe6b4ff4511cb13df2af218350a5d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7210
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
The launch daemon tests consist of two parts: one unit test and one
set of "libbe_test" executables. These share some sources from the
launch daemon source directory, but use different compiler flags.
Due to the way we generate object files, the .o files for both variants
end up overwriting each other since they are generated in the same
directory.
There is also some confusion on compiler flags, since some flags are
applied globally to the directory and confuse one or the other of the
two targets.
To avoid this, move the test binaries to a subdirectory separate from
the unit tests.
Change-Id: I28058abf7a4d4356bc56ef7a67430a277b979532
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6875
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
* context->extradata seems to be set to fExtraData or fInputFormat.MetaData().
Both are managed by us, so set context->extradata to NULL before freeing.
* avcodec_close() shouldn't use according to the documentation:
"Use avcodec_free_context() to destroy a codec context (either open or closed).
Opening and closing a codec context multiple times is not supported anymore – use multiple codec contexts instead."
* fix#18713
Change-Id: I820deefcffea52a39fcb7587153d40dc03c85024
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7208
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reduce stamping artifacts when application slowly responds to redraw requests.
This fixes and reintroduces logic previously removed in hrev53711.
Previous logic was incorrect as it didn't take the possibility of multiple
invalidations of different kinds (expose, update request) into account.
Now separate update and expose regions are maintained and only expose region
is cleared immediately.
Change-Id: I0fd98cb1b45ccec285154e8c0d8e3a1400d156d7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6067
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
The folder name "Bookmark bar" should never be translated.
If it is, the folder won't be found, the bookmark bar never shown and
the menu item "Show bookmark bar" always disabled.
Change-Id: I0fb5bc6d4027c7fa957205c1da72c2fabd9e122e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7204
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Create SysInfoDragger class and override its MessageReceived() method
to redraw the target view when draggers are shown or hidden.
Check that fDragger->AreDraggersDrawn() is turned on before drawing
the border in the SysInfoView::Draw() method.
Change-Id: I8de1acafe52319ae0f4ed1d91eec2e9c0ad2cb9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7191
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
... you have lying around on your Desktop that did not get updated
correctly based on changes that have been made since the replicant
feature was introduced.
Do not archive class members in Archive(). Remove SysInfoView
archive constructor. Recreate replicants fresh. No saving to lists
and restoring.
Maintain bottom right corner whenever replicant is resized by
creating _ResizeBy() and _ResizeTo() methods. Since we're starting
over with replicants, this only happens when the uptime wraps.
Fix box height issues, was a bit too tall.
Change-Id: I464fc09a6f86bc88dc09007c9356d2faac340e77
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7189
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
In hrev55767, a previous patch added the needed code for Haiku to control the display brightness. However, we didn't tell the video card BIOS about it, and so the card could also control the brightness by itself.
This disables BIOS based brightness control and lets Haiku take over cleanly.
Change-Id: Ie0e8f7e653c2d4773c463d21246f2ccc6ec8f441
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7116
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* use of a shared bitmap buffer in OutlineView and TitleView
* dynamically increase of the bitmap buffer after adding a column or a row
Change-Id: I4feddf636fb1446c29e60353b8f70fc084833731
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7176
Reviewed-by: John Scipione <jscipione@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Stefano Ceccherini <stefano.ceccherini@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
When adding new paragraphs or otherwise editing a document from outside
the view, the layout needs to be recomputed and the view invalidated.
Otherwise, the changed text is not shown.
Change-Id: Id3c60d8b510443f71ebbc805b7b7ca5b35220fd5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7131
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Specific text spans can be assigned a cursor and BMessage to send when
they are clicked. This allows for implementing hyperlinks, specific
popup menus, and clickable text of any type.
With some extra work it can also be used to implement spell checking
suggestions, buttons, and so on.
Change-Id: I390e0c44656da76a950c432bdd934bd51af49baf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7130
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
The TextView has planned support for fancy underlines (double underline,
squiggly, and possibly different colors than the text). However, it does
not implement any rendering for these yet. Until that is added, have at
least the basic case (single line underline the same color as the text)
by using BFont B_UNDERSCORE_FACE flag.
Change-Id: I26875e51efb1050cbabb2287307516c4cea077cf
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7129
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
We already use their value, let's use the name too.
Change-Id: I5afbd69923ae3b5e702dfb935a709c3069de5365
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7146
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: François Revol <revol@free.fr>
No horizontal (or vertical) scrolling allowed if the text rect is
inside the view rect in x (or y).
This fixes issues with right-aligned text views getting scrolled
within bounds becoming left-aligned text views. Prevent scrolling
so that this cannot happen unless text is outside the view.
You can still get DeskCalc to be in a scrolled over no-longer-
right-aligned state by scrolling and resizing repeatedly, but
it's better than before and it is at least fixable. This is most
likely a bug in DeskCalc.
This also fixes issues not being able to scroll all the way right
after scrolling left dragging with the mouse.
Do not set any limits in _PerformAutoScroll(), all limits are set
by the code that does the keyboard handling. Set x and y and call
_ScrollBy();
Update limits set in _ScrollBy() to accommodate both keyboard
and mouse (taking from mouse and using on keyboard as well).
This unifies keyboard and mouse scroll limits in x and y.
Change-Id: I0dd24ce03f9b95651bcee4e190564b77f0343863
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7161
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
... exception to sentence case rule, also Scroll Lock and Num Lock.
Capitalize Right/Left Shift, Control, Option and Command as well.
Change-Id: I65b85eb580fe8cd06664b1bc230ac6aef15d6487
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7182
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
private convenience methods to calculate the text view width and
height with insets and the text rect width and height without
insets respectively.
Also add _ViewRect() and _TextRect() methods for completeness,
but they are not currently used.
Change-Id: I0582bc93a0a3a6820bbb2262a1d726457309ab9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7162
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
The old depot / repository "url" was renamed as
"identifier" some years ago. This field seemed
to remain as "url" and is now corrected.
Change-Id: Icd1390745311030e3fd57b852de91ed69b326496
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7190
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>