BPoseView::NewFileFromTemplate does not want to copy the times. Fixes#11702.
We have to keep a 2-argument version of this function because it looks like
some third-party applications might call it (e.g. Dockbert), and even
though it's technically private API, it's easy enough to preserve binary
compatibility.
If the pose matches the current type-ahead filter, it will be added
by the node watcher anyway, so this just created duplicate poses
which messed up internal data structures. Fixes#11122.
InfoWindow now uses the font size to determine the window size and
placement of elements. Also uses system colors, including link
colors. Permissions view not font sensitive yet.
Signed-off-by: Augustin Cavalier <[email protected]>
Patch 0039 from looncraz, unmodified.
* It now uses a font that's 3/4 the size of the plain font; ie. there
shouldn't be any change with the default font size.
* Also cleaned up some weird layout code on the way.
If the view fails to lock because it is actually gone, we obviously
can't use it to return the container, so delete it directly in that
case.
Fixes#12072 and probably #11982 which would then be a duplicate.
* When pressing shift it will also extend the selection to the bottom
or the top of the page.
* It does not deselect anything yet, but Tracker's selection logic is
pretty questionable, anyway, and it's way too complicated to
implement this nicely as of now.
* This problem was present for the fonts with total height
greater than 19 and smaller than 20.
* Reduce distance between row with big fonts.
* Fixes#11615.
Commit ea8b1e14 changed OpenWithPoseView from using ShouldShowPose for
filtering poses to a BRefFilter. The introduced ref filter used the
iterator handed to the BPoseView::AddPosesTask which took ownership
of that iterator and deleted it as soon as it was done. Since actually
adding the poses as well as further filtering is asynchronous and
happens after the AddPosesTask completes, the iterator was used after
it was already deleted.
Introduce BPoseView::ReturnDirentIterator() that is called after the
AddPosesTask is complete. The default version deletes the iterator,
the OpenWithPoseView overrides it and does nothing, it deletes the
iterator in the destructor instead.
Also fix leaking the ref filter. The BPoseView does not take ownership
of the filter as it usually comes from a BFilePanel which is documented
to not take ownership.
Changing this many lines of code to add a single boolean preference
is absolutely insane. We need a new preference-tracking system, and
one that can be reused in other applications, too.
Fixes#9200.
* Style fixes to QueryContainerWindow.h
* Style fixes to ContainerWindow
* Style fixes to Model
* Style fixes to Tracker
* Style fixes to PoseView
- Most of the changes come from unindenting the code
This reverts commit de7aed2b56. It turns out
that this causes crashes when trying to navigate in directories with
type-ahead filtering enabled. (possibly related to the root cause of
Rename CopySelectionListToBListAsEntryRefs to CopySelectionListToEntryRefList
to reflect that it no longer copies to a BList but instead to a BObjectList<entry_ref>
When items were removed from fFilteredPoseList as opposed to fPoseList, the
items were not automatically deleted and thus leaked. By setting the BObjectList
to automatically delete them on removal (by setting the deleteIfOwned paramete
to true) we avoid this leak.
Sorry this commit is so big, but I couldn't figure out how to do this
incrementally without breaking things.
I wasn't able to just merge Aldeck's branch, as it was a partial refactor
of Tracker and didn't just rewrite the UI creation code to use layouts,
and the changes for PM (e.g. addon loading, virtual directories) made it
very hard to merge (it doesn't even compile after an automerge) so rather
than spending time on that, I decided it'd be better to recreate his work.
Miscellaneous notes:
- This partially cleans up BPoseView & subclasses and BContainerWindow &
subclasses -- none of the subclasses and child views abuse the parent's
state, child views, or layout now.
- BFilePanel and BDeskWindow are not on layouts, because:
* BFilePanel docs in the Be Book instructed developers that wanted to
modify BFilePanel's layout to just use FindView() and then move the
views around. Obviously making it use layouts will break all BeOS
apps that do this, and there are a lot of them (Pe, WonderBrush are
just two examples.) I've added a note to the TODO list for R2 to create
a layout-compatible API for this.
* Some replicants (Workspaces, for example) rely on manipulating
BDeskWindow's drawing state. This is incompatible with layouts, as
at least in the case of Workspaces, it breaks a layouted version
of BDeskWindow entirely.
- I noticed a lot of #ifdef BEOS_VERSION ... gunk in the code. Tracker
probably didn't build on BeOS just before this commit, and now it
won't for sure, so I intend to go through and clean that out in the
near future.
This commit also fixes:
- enhancement #4996 (make Tracker's navigator use vector icons)
- bug #3039 (resizing OpenWithWindow flashes the blue border)
- bug #3889 (OpenWithWindow redraw errors)
- a regression that was a side effect of "dynamic_cast<BDeskWindow*>(this)"
always returning NULL when run in the constructor. I just added a "bool
isDeskWindow" to BContainerWindow's constructor that is only set to true
by BDeskWindow.
- a copy&paste error in VirtualDirectoryPoseView that was passing "uint32
resizeMode" as "uint32 viewMode".
Thanks to Alexandre for his original branch (it was a very useful
reference), Axel (for some miscellaneous advice & encouragement),
Adrien & Humdinger (for user interface review), and Diver (for user
interface review & testing).
There doesn't seem to be anything ini the implementation that would
cause a problem, as long as you don't try to change this while the
window is already open.
... in situations where a NULL pointer dereference was vital to the
functioning of the method we use a stronger assert that throws an
exception on failure. This is accomplished by a new method in
Utilities.cpp, ThrowOnAssert().
None of these conditions should ever be true, if they are it means that
the code is written improperly and would have resulted in a NULL
dereference and undefined behavior (most likely a crash) before.
Most instances of ThrowOnAssert() either replace an ASSERT followed
by a dereference or an early return that covered the error.
Also remove _ThrowOnErrorWithMessage() which wasn't being used.
To prevent recoverable NULL pointer dereferences. Dereferencing a
NULL pointer is undefined behavior and should be avoided.
Unrecoverable NULL checks will be dealt with in the next commit.
instead or additionally to string.h, in preparation for functions move.
* moves str[n]casecmp() functions and others to strings.h.
* strings.h doesn't include string.h anymore.
* this solves #10949