This bug was introduced in hrev47498
The reason Tracker crashed was because OpenWithContainerWindow
had a NULL TargetModel() which we were trying to dereference.
Fix this by creating an empty model in OpenWithContainerWindow. Add an
ASSERT to check that the TargetModel() is not NULL in the future.
Another way to fix this bug would have been to check that TargetModel() wasn't
NULL each time before we use it. I didn't go with that solution because we
assume TargetModel() is not NULL in a lot of places so it would be a lot of work
to check them all. I think it's better to give OpenWithContainerWindow a dummy
model even though it doesn't make sense for it to have one just so that we don't
crash when we try to dereference the pointer.
* icon_size size => icon_size which (I've settled on which)
* fOrigBitmap => fOriginalBitmap
* resizeMask/resizeFlags => resizingMode (header and cpp match)
* error => result
* explicit NULL checks for pointers
* multi-line conditional ifs get {}'s
* rename result to more descriptive name when not status_t
BRoster::Launch() sends B_REFS_RECEIVED before B_READY_TO_RUN
if the application is not running, so, when B_REFS_RECEIVED looked for
the Desktop window it wasn't created yet since that happen in ReadyToRun().
By creating the Desktop window in the constructor instead it is available
in RefsReceived() so an extra Desktop windows isn't opened.
* Update doxygen docs a bit, especially returns.
* Some variable renaming for consistency and clarity, err/error => result.
* Remove some dead code that isn't coming back. (code moved to IconUtils)
* OpenType() returns a status_t, put it in a status_t, not a ssize_t.
and then later create a new ssize_t to hold the read bytes read
and use that, saves a lot of casting and confusion.
* Remove public method docs, they are in Haiku Book only.
* Format private method docs as doxygen.
* Other style fixes like explicit NULL checks.
* Remove dead code in GetIcon() that isn't coming back.
* Pointer style.
Also create Trash if does not exist but check the if the icon
attrs are set separately.
Only set the vector trash icon #ifdef __HAIKU__ does this
even matter anymore?
* Palette is set to Optimal which preserves colors of original
* Write transparent gifs is on which preserves transparency
* Transparent auto is on which automatically detects the transparent color
* default transparent color is 255, 255, 255 (aka white) if you select a
manual transparent color which seems like a more sane default than black.
This allows ShowImage and other programs to save transparent gifs without
removing transparency and without reducing the colors.
Instead of relying on the global protocol loop to call _ParseHeaders
once for each header, extract as much as possible from the current
buffer.
This saves memory, avoids useless operations on the socket and various
processing steps, and fixes#10245.
Also improve the handling of 0-size requests to make sure they terminate
properly.
* Tracker has support for this in its RefsReceived handler, which
results in simpler code than going through BRoster to open the folder.
* Avoids a race condition, possible confusion of Tracker windows with
the same title, and makes the code more readable (and working).
* Fixes#11008.
Thanks to Axeld for pointing the support in RefsReceived, which wasn't
used anywhere outside of Tracker, yet.
* Allow EXECUTE on the Folder property to open a window for the passed
ref and return a BMEssenger targetting that window.
* Allog GET on the Folder property to return a messenger to the matching
window, if one is already open.
* Make scripting support mandatory and remove the define allowing to
disable it.
* Avoids the ugly "button that opens another window" UI paradigm in
Tracker preferences.
* Makes it possible to revert changes to the automount settings as the
Tracker preferences window has a revert button.