* B_AUTO_UPDATE_SIZE_LIMITS only really makes sense for resizable
windows, and it only sets the minimum/maximum window size.
* ResizeToPreferred() resizes the window to its preferred size, and
also supports height-for-width layouts.
* Since the Media preferences are always watching for media
status, it's good to clean up the window when the media services
are not running. This avoid the user try to use controls where
services are down.
* The DHCP Client is the one configuring interfaces, so it makes no
sense to request address resolution for already configured interfaces
only.
* Fixes#12208
If I had used my head instead of blindly c&p'ing the suggested code
from Axel's message, I would have realized that Unset() unsets fStatus
too. Not a bright thing to do on my part...
* Media is now waiting for media_server to start if the window
is closed before to finish, this was proposed by stippi.
* Moved out anything related to notifications as they are now
managed by the media_kit.
* Solved some TODOs and minor issues too.
* Due to the needs to provide a peaceful UX, i moved out the
notifications mechanism from the Media preflet and i have
integrated it with the launch and shutdown functions of MediaDefs.h.
* This implied to introduce a new launch_media_server function
similar to the shutdown_media_server allowing to specify a custom
notification function too.
* Both functions then are reworked to send by default notifications
to the Deskbar, this was needed because in a lot of situations
the mechanism failed without correctly noticing the user.
* The one argument launch_media_server is considered to be deprecated,
the default argument is removed to mantain binary compatibility but
make new apps to automatically use the new one with just the default
arguments. This is needed due to conflicts in overloading.
* Improve notifications by indirectly extending localization
to old BeOS apps.
NetworkAddressTest passes (most) tests when you have network.
When no network interface (ie -net none in QEMU) tests take forever and
more tests fail.
When network interface exists but is disabled in Haiku, tests are fast but
more tests fail.
If the height had been reduced due to a very wide window being shown,
it was not reset to its full value when switching back to a more
narrow preview. Fix this by relayouting the window.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Relevant quote from IRC:
<pdziepak> i would expect all overloads of SetTo to return status_t
<pdziepak> actually, i don't think what i would expect from class with such interface
<pdziepak> bugs probably
* Fixes 10770.
* While more complex solutions are proposed, i think
of it as a way to get out of an eventual deadlock or
to protect from accident close.
* On a more deep analysis i figured out that other than being
a bad pratice quitting the BLooper explicitly was cause of
more problems, such as the regression after my patches which
led to have a zombie media_addon_server after media services
restart. This should hopefully place a final stone on the
BMediaRoster::Quit() issue as with the previous commit
i've removed every attempt to do this in the system. For
any application developer listening, this means that quitting
the BMediaRoster is highly discouraged, don't do it.
TeamDebugger:
- When we're notified that the target team has called exec(), take all
necessary steps to prepare. These include saving settings for the old
team, clearing out breakpoints, resetting signal dispositions, and
removing the old team's image list. Also set a flag indicating an exec
is pending for later processing.
- On image load notification, if the pending flag is set, check if the
new image is the app image, and if so update the team's name to
the new image, load that respective team's settings, and set a
temporary breakpoint in its main() so the user has a chance to
perform any additional desired actions before starting execution
in the new executable.
- When asked to load settings, post a message and do so in the window's
message loop. This avoids a lock order reversal when asked to do so
later as a result of exec() changing the target image out.
Team:
- Add listener hook and event type for rename events. These occur on exec()
since at this point we're running a different executable.
TeamWindow:
- Factor out code for generating window title into a helper, and use from both
window initialization and newly implemented rename listener hook.
- SetBreakpointAndRun() now takes an additional argument indicating if this
invocation is for a fresh run of a team or not, as continuing the thread's
execution needs to be done differently in the two cases.
ClearImages():
- Removes all existing images from the team's image list and notifies callers.
To be used in case of an exec().
ClearSignalDispositionMappings():
- Remove any existing custom signal disposition mappings. This is intended to
be used in preparation for loading new ones from a team after exec() is
called.
Refactor BResources::WriteResource to return early in case of errors,
instead of checking permanently if (error == B_OK). Makes the code more
readable and removes some useless checks.