They only described things that the function names and parameters
already indicated. As per the Coding Guidelines, such excessive
commenting is to be removed.
Also fix some other (minor) code style issues while at it.
"LGTM" code scanning was bought out and merged into GitHub Actions.
The code scanning setup there has a different mechanism for configuration,
and so this file is not useful anymore.
The filesystem name returned by read_fs_info will be correct (i.e.
returning "ext3" or "ext4" as appropriate), but some things just list
the filesystem driver's name, which can cause confusion.
Change-Id: Ic4acf497fc5db5c167131aeb323b45eeb78594d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7126
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
... and a few minor feature updates.
Create a CanEditName method on PoseView because we were using
subtly different checks in different places to see if allowed
to edit the name or not.
Tint background color of the Edit name text box on read-only
to indicate that the file name cannot be edited (only copied).
Create ReadOnlyTint() method in Utilities and use it here and
in PoseView to set the background color. Eliminate BackTint()
method from PoseView which served a similar purpose.
Add CanMoveToTrashOrDuplicate() convenience method.
Move To Trash, Delete and Duplicate options use same check.
Context menu of selection in file panel gets Duplicate option,
window context menu never did so don't try to enable it there.
Change-Id: I7a82d00ea10f22a7885c2e898a809e1abe9a6b30
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7122
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
If 0 items are selected, check the window's volume instead.
If 1 item is selected, check if the parent's volume is read-only.
If multiple items are selected, consider the entire selection to
be read-only if any item's parent directory in the selection is
on a read-only volume.
You aren't allowed to for example Cut a selection that has an
item on a read-only volume as the Cut operation would not be able
to succeed. However, if all items in the selection are not on a
read-only volume then you may Cut.
For non-query windows assume all selected item's are on the same
volume and only check the first item when multiple are selected.
Fixes#18661
Change-Id: Ib898e54b62558c66aad65d33afd080480e312565
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7120
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: John Scipione <jscipione@gmail.com>
This removes the burden of determining whether to and then
actually sending SIGPIPE from the protocol modules, meaning
the MSG_NOSIGNAL flag can now be implemented entirely in
the socket module and not even passed further down the chain.
Change-Id: I9ba976c4aff60d533cb4b390bbba1560c0de423f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7124
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes WebKitGTK spinning endlessly and spawning lots of
short-lived worker processes following the addition of
flag checks and EOPNOTSUPP to the various socket modules.
Change-Id: I6d944b4d0235eea9e8a9333645fcb531805f340f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7123
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Its declarations were moved from another header to this file
in 2008, with a comment in the commit message and a TODO here
questioning whether it was needed for anything. In the 15 years
since then, nothing has used it.
Waiting for state changes correctly checked MSG_DONTWAIT,
but the overall data timeout only did in ReadData, not
SendData. This corrects that and makes the implementation
more consistent overall.
The image was placed 1 pixel to the right, resulting in a grey
vertical line appearing to the left of the image.
Fixes#18679
Change-Id: I02b1cb6bc898c48ff73ae114b2cda368ea636de7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7118
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This change will reduce the quantity of small requests
to increment the character assembly buffer when parsing
JSON.
Change-Id: I0998f6fb403bf6dc4736585bb69a103f3976a448
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7115
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Change-Id: Idf7ab6d2aa2b4f8cb4893053b531d2eae7418427
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6608
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Improve the mechanics for JSON parsing by reusing
text buffers during the parse.
Change-Id: I7fb2cae31e6558a5a0c63fd02e1fc6fec4f9e4b3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7106
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
The keyboard is initialized after the mouse. When there is no mouse,
this timeout delays keyboard initialization noticeably (especially if
there is a mouse port multiplexer with several ports).
Change-Id: Icd4a7c28f6afca062d829df88bd15e88225d4bc0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7112
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Same logic as in the TCP protocol module.
This fixes a regression from hrev57383: curl now works
again. (Perhaps it shouldn't be called a "regression",
though, but instead an uncovered bug / missing feature.)
Fixes#18666.
Fixes the "bug" part of #18653 (however the flags still need to
actually be implemented.)
Change-Id: Icd296af8b409416317ba3d02735504729949fd08
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7109
Reviewed-by: Niels Sascha Reedijk <niels.reedijk@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
after a0131eaae2884fdced27158c3d34732d1656aca9 mxcsr was possibly also incorrect.
fpu control and mxcsr will be restored with fxrstor/xrstor.
no need to clear pending exceptions on #MF
fix#18656 (and #18624 after reverting).
Change-Id: I7dd5e2e4610747c5b82abd6c67e302d264b4be92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7104
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
As investigated and suggested by jackburton in ticket #14693:
outTranslator wasn't initialized correctly (due to type mismatch
on 64 bit platform).
Also set the image's file name as default in the save dialog.
Fixes#14693
Change-Id: I741e3616b935315a707ea3949a330d41d577fd91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7102
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Besides the entry_ref to an existing Person file as argv, also
accept a BMessage containing values for attributes and set those
in the new window.
The specifier name in the BMessage needs to be the same as the
attribute name used by the People app, e.g. "META:email".
Needed to let the Mail app create a new Person file with the email
address already filled in.
Fixes#14766
Change-Id: I637200b08d5c1b7cf52d7cf3f56dab93ce1a6ec5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7085
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
If a Person file with the selected email address doesn't exist yet,
launch the People app with a BMessage "M_LAUNCH_PEOPLE" that triggers
the People app to create a new Person file.
The message includes "META:email" and "META:name" for email address
and contact name. The contact name may be empty, if it wasn't included
in the mail's from/to/cc etc. field.
Don't show error alert, if People was already running.
Fixes#14766
Change-Id: Id4f7ae50aa1ea283974f2fa067ac9e199f369db5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7084
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reduce the number of small reads into a file
for JSON parse by buffering the data.
Change-Id: Iae8030a72daec358968cd2edf5f95510194a2f68
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7096
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This change will move the loading of packages' file size
to a latter phase as HaikuDepot starts up as a separate
step. This way it can only load sizing for those packages
which do not have a size from HaikuDepot Server -- which
should be very few. This gives a circa 10-15% performance
improvement on the phase where the local HPKR catalogue
of packages is populated.
Change-Id: I52055ecaa79f9819e70b469134e5b94636f02b13
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7095
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Doesn't remove the rating BFS attribute from the file, just sets it to "0".
ShowImage: Move "Ratings" menu into a new "Attributes" menu, similar to
MediaPlayer.
Change-Id: I831166d88be9d18f1d302a423aa43929b7a1b255
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7092
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>