67393 Commits

Author SHA1 Message Date
John Scipione
540ae21864 MediaPlayer: Delete playlist items use plain old delete
... fixing a TODO now that #7078 is fixed.

There are 2 remove playlist actions: 'Remove' and 'Move file to Trash'

* 'Remove' playlist shortcut: Cmd+Delete => Delete
  (This also works from the main window to remove the file you're
   currently focused on/listening to from the playlist.)
* 'Remove file from playlist' shortcut has been removed. We have
  decided not to Trash files from MediaPlayer's playlist anymore,
  you'll have to trash the files from a regular Tracker window.

The 'Remove' shortcut gets plain old delete as the author intended.

Change-Id: I3b1e19405e029d9c5f398cfd7a8dbab49fb21fc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7292
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Reviewed-by: John Scipione <jscipione@gmail.com>
2025-02-02 19:18:35 +00:00
John Scipione
1e2091ced5 Interface Kit: Add support for shortcuts w/o Command
Introduce B_NO_COMMAND_KEY modifier that is used when a
shortcut has no Command modifier, otherwise B_COMMAND_KEY
modifier is added.

This is conceptually different from B_NO_MODIFIERS in that it
allows other modifiers such as B_CONTROL_KEY, B_SHIFT_KEY and
B_OPTION_KEY to be added to a shortcut, but not B_COMMAND_KEY.

This option is required to remove B_COMMAND_KEY because the
Command modifier is assumed to be present on all shortcuts.
This allows us to break this assumption without breaking apps
written before this change and assume B_COMMAND_KEY to be
present even if it has not been explictly added.

Document B_NO_COMMAND_KEY in BMenuItem and BWindow docs.

Fixes #7078

Co-authored-by: X512 <danger_mail@list.ru>
Co-authored-by: Ryan Leavengood <leavengood@gmail.com>

Change-Id: If0e20cd848112898f4425ede8c17231dc50deb8a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7293
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2025-02-02 19:18:35 +00:00
Lt-Henry
a5f92820b7 pch_i2c: added support for amd i2c devices
* fixed fifo depth may overflow on uint8
* Created pci/acpi device list with its respective platform version. This will allow us to toggle specific platform registers

Change-Id: I6f4f63649eb62fbc9480e97ad0aa16125458ce7e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8888
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
hrev58588
2025-02-02 18:12:54 +00:00
Augustin Cavalier
370b0c014d FAT: Better isolation from host headers for the fat_shell.
Fixes the build on FreeBSD.
hrev58587
2025-02-01 16:48:38 -05:00
Augustin Cavalier
78dd36e7cb Some build fixes for FreeBSD.
* Drop endian.h; no longer needed as FreeBSD provides its own
   (and this conflicts with some other things later in the build.)

 * Needs libgnuregex; enable and adjust paths.

Doesn't fully work yet. The fixes in the next commit for fat_shell
plus some other build system tweaks are still needed.
2025-02-01 16:48:11 -05:00
John Scipione
69970cdd5b Tracker: Open file location on double click from Query fix
Regression from hrev58560.

Originally: `be_app->PostMessage(&message);`
In hrev58560 it was changed to: `Window()->PostMessage(&message);`
Now: `BMessenger(kTrackerSignature).SendMessage(&message);`

The distinction between original and now is for if Tracker is being
used as a kit, in practice this shouldn't make a difference.

hrev58560 was not correct though.

Fixes #19381

Change-Id: Ia48a8adcf2c9853e8309266369ccf7452c20a679
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8890
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58586
2025-02-01 21:36:11 +00:00
Jérôme Duval
3805924471 kernel: fix warning
warning: "user_strlcpy" redefined
Change-Id: I2a0a4307e1ca8904ced7eafb498f9ea94d538362
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8893
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58585
2025-02-01 20:21:26 +00:00
Jérôme Duval
cb5d195553 fs_shell: fix warning
warning: too many arguments for format [-Wformat-extra-args]
Change-Id: If35737dc2fe193923aa1d756cfd10ca6d820a09e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8892
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-02-01 20:21:26 +00:00
Jérôme Duval
f9af89e754 RemoteMessage.h: fix warning
error: 'rectCount' may be used uninitialized [-Werror=maybe-uninitialized]
Change-Id: Id899f6ef9c249861dbe286a71109c461501519b4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8891
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-02-01 20:21:26 +00:00
Autocomitter
622603f103 Update translations from Pootle hrev58584 2025-02-01 08:12:21 +00:00
John Scipione
56dce2b3d4 Tracker: Insert "Mount >" menu at the right location
Fixes #19388 a regression from hrev58560

Change-Id: Iec03b278aa88c5e544962130c6942c5497598b67
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8884
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58583
2025-01-30 05:06:48 +00:00
Augustin Cavalier
e33dbdc1a3 libroot: Import some more string functions from musl.
Also enable some optimizations on newer GCC.

Change-Id: Ideb92aae85e6f8f502af61145046ea1b4a514e8a
hrev58582
2025-01-29 20:54:19 -05:00
Augustin Cavalier
f294fe2a39 Reintroduce aligned-pointers optimization for strcmp.
It was initially added by tqh in ac827a2baa5e0c486b554cdee56c72624b499a40,
but was later removed in 39a81e5ac632d3356ebd4c0b40fb24aa3228833d
due to being rather broken.

This new version is loosely based on that design, but removes the
comparison logic out of the loop and lets the unaligned version
deal with the actual per-character comparison.

Saves around 0.1s out of 3.5s in the best case in a "jam -q HaikuDepot"
run with nothing to do (and that's only comparing with different
libroots on the same kernel; as this strcmp is used in the kernel as
well, we will benefit from this optimization there, too.)
hrev58581
2025-01-29 18:27:01 -05:00
Jim906
1c0da902ab userlandfs: Ensure room for requests in port
* Add a parameter to RequestAllocator::AllocateAddress and ::AllocateData
  that allows the client to specify a minimum amount of free space that
  must remain in the port buffer.
* Make use of the new parameter in some operations that can fail
  without it.

The Port buffer can be used to store data associated with a Request.
For some file system operations, further requests must be sent through
the port (by calling AllocateRequest) after reserving port buffer
space for data. Unlike AllocateAddress and AllocateData, which can
use an area if the data is larger than the port buffer capacity,
AllocateRequest can only allocate space in the port buffer. If data
previously allocated in the port buffer happens to be large enough to
fill it, then these further AllocateRequest calls will fail.

Change-Id: If03e0afdfbd9fbc36f0e1a04b5d0a20031932b91
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8866
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58580
2025-01-29 17:17:16 +00:00
Pascal Abresch
83e4b8867e storage: disk_device/DiskSystem: remove useless comments
Change-Id: I751ca483c5790817e31c8e513cd41267a8be664e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8876
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
hrev58579
2025-01-29 14:35:09 +00:00
Augustin Cavalier
6db0402021 kernel/vm: Commit missed change to VMVnodeCache. hrev58578 2025-01-28 18:47:04 -05:00
Augustin Cavalier
72162cc730 kernel/vm: Put name argument first in VMCache::Init.
This seems to make more logical sense.
hrev58577
2025-01-28 17:55:27 -05:00
Augustin Cavalier
46aa69c2f6 kernel/fs: Make sIOContextRootLock an rw_lock.
Most of the time we only need to read it, not modify it, so
this saves some contention.
hrev58576
2025-01-28 16:46:59 -05:00
Augustin Cavalier
fb3a70af79 kernel/vm: Give VMCaches better names.
This helps with debugging and reading scheduling reports.
2025-01-28 16:40:27 -05:00
Augustin Cavalier
382ddca7fc kernel/vm: Choose pre-map size based on cache fault count.
The GCC "cc1plus" binary is over 40MB, so pre-faulting at most 10MB
of it only helped so much. Now, we map 1 MB for every time the cache
has been faulted "in full". This should warm up quite rapidly during
compile jobs, and stabilize after that (with future faults mostly
being CoW.)

Only active (accessed+used) pages will get pre-mapped anyway, so if
on a long-running system the page daemon debuffs all the pages in a
cache, we would just iterate through all of them but not map any here.
If that overhead proves to be a problem in the future, we can optimize
for it then (probably by keeping track of how many pages are eligible
for pre-mapping in this way.)

This significantly reduces lock contention in compile jobs. Compiling
libroot with a generated directory on ramfs and -j4, best of 3 runs:

before:
real    0m43.017s
user    1m2.811s
sys     0m24.900s

after:
real    0m29.367s
user    1m0.321s
sys     0m13.373s
Change-Id: I441abf43803c8666cdc13c6d007bc04439698b0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8874
Reviewed-by: Michael Lotz <mmlr@mlotz.ch>
hrev58575
2025-01-28 21:23:38 +00:00
Augustin Cavalier
17c3890ce1 kernel/vm: Track fault and copy counts in VMCache.
This solves a TODO for reporting CoW counts in area_info, and paves
the way for adaptive handling of pre-faulting based on how many
faults a cache has handled.

Change-Id: I4ecd7cf46b794c51acac87184fef49ea5ce76743
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8873
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-28 21:23:38 +00:00
Augustin Cavalier
b2b3e71456 KPath: Remove memset after allocate.
We don't really need to clear these buffers, as they're basically
always used with user_strlcpy or precisely sized buffers, so there
should be no risk of "leaking" information to userland.
hrev58574
2025-01-28 12:30:52 -05:00
Dave Slusher
61d47c1e92 buffer truncation looking up MIME types
Per subsequent discussions, switching to BString::SetToFormat which completely
eliminates the need for allocating a fixed buffer and will avoid truncation.

Change-Id: Ic2a803594877a0a6fb1bc4eba937268351e6f45c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8837
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58573
2025-01-28 16:44:06 +00:00
Dave Slusher
36fac427b5 awk: fix regexp errors
As of awk version 5.0.0 the regexp library used switched to GNULIB.
This means that using \" is no longer escaping the quotation mark but only
matching a literal backslash followed by a quotation mark.

Another project that dealt with the same warning is here:
https://github.com/soimort/translate-shell/issues/285

Change-Id: If465b5966e448591acdae9e764c22bc2fce79f5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8836
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2025-01-28 16:44:06 +00:00
Pascal Abresch
c96e40d299 interface: fix oversight in comparison
Pointed out by Jérome Duval in https://review.haiku-os.org/c/haiku/+/8428

Change-Id: Ibbd3660616939bbc49514778d494e8e64d8dbf9f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8872
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58572
2025-01-28 04:06:53 +00:00
Augustin Cavalier
01164d98be configure: Improve error messages around Python detection.
Fixes #19383.
hrev58571
2025-01-27 22:16:16 -05:00
Pascal Abresch
a498115d52 Tracker: fix button color for Open/Save Dialog
Change-Id: Iaa320020ebea8dba6ab5852799fc35f60b23885f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8871
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
hrev58570
2025-01-28 03:10:21 +00:00
Pascal Abresch
222402172a pref/appearence: Rename several files
No functional change intended

Change-Id: I6ccc417098f5713e80348da767a914ceec5c8b4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8870
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2025-01-28 03:10:21 +00:00
Pascal Abresch
3d1f0f31ec pref/appearence: Remove old cursor code
Change-Id: I4b88e582f1241e99e3fcfdbf4242f9524309682b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8869
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
hrev58569
2025-01-28 02:52:05 +00:00
Augustin Cavalier
d836d5447a kernel/thread: Cache kernel stacks.
Instead of creating and destroying kernel stack areas on every thread
creation and destruction, use the object_cache's constructor/destructor
hooks to create areas when cached objects are created, and reuse them.

This avoids the last major cause of kernel map flushing during compile
jobs, however it's not as much of a performance improvement as I'd hoped,
seeming to be within the realm of noise (within a VM anyway.) On systems
like VirtualBox where ICIs are much more expensive, it may be a bigger
performance boost.
hrev58568
2025-01-27 16:39:23 -05:00
Augustin Cavalier
9744f981a5 README: Link to nipos' OpenGrok instance.
landonf's has been dead for some time.
hrev58567
2025-01-27 14:26:38 -05:00
Augustin Cavalier
b0c44c8d4a freebsd_network: Don't use depots for the large mbuf chunk caches. hrev58566 2025-01-27 12:53:11 -05:00
Augustin Cavalier
1be0d390db kernel/slab: Simplify arguments of create_object_cache().
* alignment, cookie, constructor, destructor are rarely used
   (in fact constructors/destructors are never used at present.)

 * Add flags argument, this is more commonly used.

This allows a lot of the invocations of create_object_cache_etc
to be changed to invocations of just create_object_cache, simplifying
the code significantly.
2025-01-27 12:51:12 -05:00
Augustin Cavalier
84fb1209cd drivers/network/pcnet: Only allocate a local softc in probe() if one isn't set. 2025-01-27 12:46:08 -05:00
Zachary Hall
1047530b8f screenmode: Allow retrieving screen brightness via CLI
* Add a new flag (-B, or --get-brightness), that changes the output
   from screen mode to screen output
 * This new flag is affected by the -s (short output) option for use
   in scripts
 * The wording for -s is changed to reflect the fact that it now
   affects the new flag

Change-Id: I81145f401952fc026673e05a5fc03d4e3352fd3c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8865
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58565
2025-01-27 17:24:03 +00:00
John Scipione
bd2d95cf90 InterfaceDefs: Reorder enums in ascending order, show gaps
Change-Id: I926d0f02e74ea97c302bc4d1794819b60be2874b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8864
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58564
2025-01-27 17:19:49 +00:00
Niklas Poslovski
b697f0ccc8 RTFTranslator: Add support for struck-out text
Change-Id: I900d305328513921068ad63a0e3345578bc61c04
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8862
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
hrev58563
2025-01-27 14:04:08 +00:00
PawanYr
c1b2086dfd Input: add touchpad speed, accel, and scroll settings
See #17265; adds speed and acceleration sliders, as well as a reverse
scroll option. Tested on a Dell XPS 15. Only affects touchpad prefs,
not mouse prefs

Also, fix issues where revert button wasn't being enabled sometimes
when it should have been.

Also, switch to using a BMessage to store touchpad settings in their
file.

(a previous version of this patch added only the scroll setting)

Change-Id: I4d5ed3fadfd5bae1f7b686c904959f6e168b84a0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8756
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
hrev58562
2025-01-26 22:47:31 +00:00
Niklas Poslovski
3e2f510808 StyledEdit: Add menu to strikeout text
Change-Id: I390b700db29a838baade1d8ab52983306a93e751
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8863
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
hrev58561
2025-01-26 18:59:35 +00:00
John Scipione
4624f9f260 Tracker: Add Cut/Copy/Paste items to context menus
Remove CUT_COPY_PASTE_IN_CONTEXT_MENU define entirely.

Change-Id: I457ee140c2bde7e5ab750528b3196adfe9eb7018
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6358
Reviewed-by: John Scipione <jscipione@gmail.com>
hrev58560
2025-01-26 18:29:22 +00:00
John Scipione
683100d673 Tracker: Live updating shiftable menu items
Live updating menu classes listen for B_MODIFIERS_CHANGED
messages and update the item label and shortcut on Shift
or Control.

-- File --
Create link => Create relative link
Move to Trash => Delete
Cut => Cut more
Copy => Copy more
Paste => Paste links
Identify => Force identify

-- Window --
Close => Close all
Open parent enable/disable on Control to open root window

-- Window => Arrange by/Desktop --
Clean up => Clean up all

Create TLiveMenu and TLivePopUpMenu classes that inherit from
BMenu and BPopUpMenu respectively.

Create TLiveFileMenu, TLivePosePopUpMenu, TLiveWindowMenu and
TLiveWindowPopUpMenu subclasses for the File and Window menu
and context menus respectively.

Create TLiveMixin to share methods between menus. Pass in parent
window and use window shortcuts to enable/disable "Open parent".

Change-Id: I5dfbd4d468fad02894f1f31aa08d1abf630a4b5d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2293
Reviewed-by: John Scipione <jscipione@gmail.com>
2025-01-26 18:29:22 +00:00
John Scipione
5b1284db40 BMenu: Inform parent menu when modifier keys change
BMenuWindow: Move submenus over recursively if layout changes.

Fixes #15782

Change-Id: I70e67c3514a3b850f5b5893170b9a34a9176363e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2324
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-26 18:29:22 +00:00
John Scipione
bc61d0aef5 Tracker: Show Open parent menu item on Trash
Change-Id: I754f1457db76f0c3511e4c8d4bf9b236591ccbe2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8703
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-26 18:29:22 +00:00
John Scipione
9df392ba32 Tracker: Treat root (aka Disks) like a volume
This yields the volume context menu on the Disks icon. Grab root
(Disks) icon before getting volume icon so Disks doesn't get the
generic volume icon. Don't add free space bar to Disks.

Add Mount menu to the Disks File menu and context menu. Mount
settings option has been removed as you can get to it from inside
the Mount menu instead.

SetupMountMenu() method is used to insert the Mount menu similar
to SetupOpenWith() and SetupNavMenus(). Add DetachMountMenu()
convenience method.

Fixes #5584

Change-Id: Ic9e272807a0a36b89cba7258b9937b09b2da32dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7151
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: John Scipione <jscipione@gmail.com>
2025-01-26 18:29:22 +00:00
John Scipione
e46d9f45b8 Tracker: Shortcuts refactor
Create TShortcuts class that builds shortcut menu items and updates
label, modifiers, enabled status and target. Not every Tracker
shortcut is present but ones used multiple times and many others are.
Update shortcuts in ContainerWindow, DeskWindow, FilePanelPriv,
QueryContainerWindow, VirtualDirectoryWindow and GetInfo HeaderView.

There are two versions of the TShortcuts class, one with a window and
one without. The without-window version is used in the GetInfo window,
everywhere else uses the "smart" window version.

This patch is organizational except fixing two small BeOS bugs:
* Edit query item is always between Open and Open with...
* Repopulate menus when you switch directories in file panels.

Enable "Open parent" item in spatial mode as well as navigation
mode unless in Root, Desktop (Query or Query template) or volume root
if not in "Show disks" mode. Hold down control to override.

BContainerWindow updates:
* Absorb Set...Item() methods into TShortcuts. Add
  UpdateMoveToTrashItem() for "Move to Trash"/"Delete" and many more.
* Absorb ShowContextMenu() improvements from Disks patch.
* Create AddIconSizeMenu() and eliminate duplicate shortcut handling.
  * Put icon size menu in radio mode and refactor item marking.

Replace "New folder" with "New >" menu automatically. Create member
vars and convenience methods to facilitate this. Simplifies building
menus, adding a "New folder" item will automatically be updated to
"New >" if templates are available (except in FilePanel and on the
minimal build you'll just get "New folder").

Refactor Arrange by and Attributes menus. Create support methods.
Create menu on add, populate on update. Do cleanup of detached menu
on Quit().

Refactor SetupOpenWithMenu(). SetupEditQueryItem() got a similar
refactor to be added and removed dynamically. Add FSIsQueriesDir()
to FSUtils used to detect queries directory for Edit query.
* "Edit query" goes between Open and "Open with..." (long story).

UpdateMenu() calls Shortcut()->Update() for all known shortcuts.

Optimize adding/removing dynamic menus so that they are created
and destroyed once and reused again and again.

AddFile...(),    fFile... and "FileContext" becomes
UpdatePose...(), fPose... and "PoseContext".

TTracker changes:
* Skip Desktop in OpenContainerWindow() we setup pose view earlier.
* Move DeskWindow init into DeskWindow constructor and call Init().

DeskWindow changes:
* Replace icon size menu with BContainerWindow::AddIconSizeMenu().
* Remove WindowContextMenu(), handle in BContainerWindow instead.

BPoseView changes:
* Rename kEditItem to kEditName -- better name. Save for Edit someday.
* Use BMessenger::SendMessage() instead of PostMessage(), safer.

BFilePanel updates:
Create the FilePanel menus fresh by overriding the AddMenus() method
instead of copying from BContainerWindow and deleting the items it
doesn't need. This allows us to omit most of the file panel checks.
Add UpdateFileMenu() to update the file menu on RepopulateMenus() and
MenusBeginning().
* Create an AddFavoritesMenu() method and use it to add the menu.
* Override RepopulateMenus() to update just the File and context menus.
* Create Update...Methods() overloading the BContainerWindow versions.
* SetTo() becomes SwitchDirectory()

Unify OpenParent() so that we can call BPoseView::OpenParent() and it
will call the container window or the file panel where appropriate.
Remove BPoseView::ParentIsRoot() and make CanOpenParent() work in both
cases. This means we don't have to check if you are in a file panel or
not when enabling/disabling the "Open parent" item and the Shortcuts
class can simply check CanOpenParent().

Call _inherited SwitchDirectory() to RepopulateMenus() on Root, Trash
and Volumes in FilePanel. This fixes a 25+ year old BeOS bug by
repopulating menus when you switch directories in file panels. Trash,
files in Trash and Root will get the appropriate menu options. For
example "Delete"/"Restore" instead of "Duplicate"/"Move to Trash".

Change-Id: Ic41b148cb6bcf14288cb5588038c13ea12426dc2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7197
Reviewed-by: John Scipione <jscipione@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2025-01-26 18:29:22 +00:00
Humdinger
e17a9b1ee0 Web+ Bookmark bar: Fixes, added "Show in Tracker"
"Show in Tracker" opens and selects a bookmark in Tracker. Useful
if "Rename" isn't good enough, when you need to edit the URL, Title,
or Keywords attributes.

Fixes a crash when trying to "Rename" a folder. Folders were added
without a message before, so trying to access them to FindRef() lead
to a crash.
Folders are now added with a message kFolderMsg which is also used
to identify them as folders (instead of checking if their message
is NULL as before).

It's not uncommon to have symlinks in the Bookmark bar. We now don't
traverse those to their origin when renaming or deleting, so only
the files in the "Bookmark bar" folder are affected, not the original
files.
Only when adding an item, we traverse a symlink for its icon.

Change-Id: I3f420995cf5c12930a1cf3a00bb4257d19c4d5a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8772
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
hrev58559
2025-01-26 08:46:58 +00:00
Augustin Cavalier
3b22516ed2 drivers/network/pcnet: Allocate a small softc on the stack in probe().
Fixes #19372.
hrev58558
2025-01-25 17:02:45 -05:00
Augustin Cavalier
63215dbd2d kernel/vm: Assert in vm_unreserve_memory that the amount is a multiple of PAGE_SIZE. hrev58557 2025-01-25 16:16:55 -05:00
Augustin Cavalier
832cb40da9 kernel/vm: Add PAGE_ALIGN in size computation in VMCache::Merge().
The same is already done in SetMinimalCommitment.
2025-01-25 16:15:42 -05:00
Augustin Cavalier
bd4d542bec kernel/user_debugger: Zero-initialize addressOffset.
On some optimization levels we get warnings/errors about it being
potentially uninitialized (but not at -O2, hence this wasn't a
problem in nightly builds.)
2025-01-25 16:00:36 -05:00