The BNetworkRoute class manages a route_entry and the sockaddr's
associated with it. It replaces the direct use of route_entry in the
BNetworkInterface API.
Using route_entry is fragile and inconvenient as it only holds pointers
to the sockaddr's. When getting a list of routes from the kernel, each
route_entry is set up so that its pointers point into the single flat
buffer that is passed around. Creating a copy of the route_entry and
then deleting the flat buffer makes the pointers in the copy stale.
Returning these route entries therefore always lead to a use-after-free
when they were eventually used.
BNetworkRoute also takes over the code and functionallity of getting
routes from RouteSupport. The corresponding method in BNetworkRoster is
replaced by a static method in BNetworkRoute.
Also distinguish between the default route and gateway of an interface.
GetDefaultRoute() now gets the default BNetworkRoute for the interface
while GetDefaultGateway() gets the associated gateway address within
that default route. Adjust network preferences panel to this change.
Note that we currently only seem to have per interface default routes
and not an actual global default route. This was already the case before
these changes and I did not further investigate what this means.
* Use user colors for selected menuItem in ProcessController
* Use user colors for selected listItem in FileTypes, Media, Printers
* Fixes the menuItem and listItem part of #10840.
The BColumnListView and other widgets need more thoughts.
* After start, the first item will now be selected.
* The InterfaceAddressView will no longer restrict its width, so
that the window doesn't have to be resized anymore when switching
to it.
* This implements ticket #11923.
* Ie. an add-on "Super duper service" in ~/config will override
one with the same name in /system (and non-packaged in packaged,
etc.).
* Fixed size of the scroller to ignore the content size vertically.
* DNS add-on does not yet support it, the rest does.
* However, there seems to be some problems with the net_server when
changing interfaces -- not just with revert.
* And call it from the DNS client -- this is the only add-on that does
not trigger a configuration or settings update, so we have to notify
the changes manually.
* Added BNetworkInterfaceListItem that can be used by interface protocol
add-ons to represent their functionality in the list view.
* It will automatically update itself on changes, and will show the
specified label, and address, if any, as well as indicate whether or
not the family has been disabled (which doesn't work perfectly yet,
as IFF_AUTO_CONFIGURED is on the interface level).
* Therefore, the interface list item will no longer show the address,
but the type of the device instead.
* Introduced the BNetworkConfigurationListener interface that is used
to broadcast network updates to.
* Network now monitors all network, and network settings changes, and
will notify all add-ons about those changes.
* Removed the global apply button. Instead, the static IP configuration
now got that button. All other changes will be instant.
* Completely superfluous and expensive for BListView items, and just
wrong for BOutlineListView items.
* Also increased the width of the item, as we must take the tree offset
into account ourselves (really, great API).
* The interfaces logic is within the main application, so is the
new interface view.
* Disabling/renegotiating does not work yet.
* Reveals a bug in some interface code; when you click on an ethernet
device first, there is no place for the wireless menu. When you then
press on a wireless device, it crashes in BMenuField code.
In the other direction, there is then an empty space.
* Fixed list item width reporting.
* Fletched out new add-on API.
* Moved InterfaceListItem from the interfaces add-on into the
application.
* Renamed NetworkSetup* to Network* respectively NetworkSettings*.
This reverts commit 31ea76548a.
Adrien, please try again without clobbering the otherwise nice
BNetworkInterface API!
Conflicts:
src/kits/network/getifaddrs.cpp
* Instead of the deprecated GroupLayoutBuilder.
* Ordered headers correctly, use headers directly instead of including
InterfaceKit.h.
* Also, guarded the profile sections in their ENABLE_PROFILES
definition.
* If changing the settings and manually reverting to the previous
values, the Revert button would stay enabled.
* Fixes#11783.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
* Previously this would work only in "current workspace" mode.
* Also avoid calling count_workspaces in a loop since its result is not
cached and it needs to ask app_server each time.
* Fixes#4231.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>
* BNetworkInterfaceAddress is moved to libnetwork. It is modified to not
use BNetworkAddress (which is in libbnetapi) and instead use sockaddr
and sockaddr_storage directly. All callers are adjusted to this.
* Some support code is shared between BNetworkInterface and
BNetworkInterfaceAddress, move it to libnetwork but in the BPrivate
namespace.
Servers only accept SSL connections, so the MX entry isn't enough to
autoconfigure. Moreover, hotmail.com MX still points to mx3.hotmail.com,
while outlook.com suggests to use pop3.live.com.
* Refactored new message retrieval a bit, so that the notification strings
aren't duplicated.
* The daemon now waits 30 seconds before doing the first mail check.
* When removing an account (all accounts would be removed when the app
was quit), AccountItem::ConfigPanel() was used to remove views.
* However, this member was only set when a new view was created, never when
it was removed. This could cause a crash on quit.
* Removed that member completely, as it was unnecessary, anyway.
* Fixed naming of AccountItem getters to lose their Get* prefix.
* This is part of a clean up of BMailSettings; storing the window
position might be implemented again later -- it just doesn't
belong there.
* Changed the logic when the daemon is set to auto start. It's now
always started if at least a single account exists.
* Instead of abusing BArchive::Archive() we now use a BMailSettingsView as
a base view for all filter/protocol settings that works with
BMailAddOnSettings.
* Cleanups in E-mail which is now completely layout friendly. But also still
crashes when changing the views.
* Made it use the layout API.
* Removed options that no longer apply (dial-up, for example).
* Cleanup.
* There are a few issues left, though, for example, the BTextView is not
correctly sized, and it currently crashes in the protocol panels.
As discussed in #11698, selecting an item in the list needs an update of
the selected color, but doesn't need a check for changes and status of
the "revert" button.
- The Backgrounds preferences app will now accept color drops.
- The Backgrounds app will update if a color drop to the desktop
has changed its color due to a direct color drop
Signed-off-by: Jerome Duval <jerome.duval@gmail.com>
Don't replace the ref with itself in the most common case where the
scanned file is not a symlink. Save a lot of useless memory copies and
ref flattening in BMessage.
* Factor out the notification sending in a single method
* Tweak the "progress" values so the progress bar goes from 0 to 100% in
order, and only once, during the restart
* Remove one notification that was needlessly sent twice
* Some other small cleanups
Final fix for #8171.
In some locales the title is longer than the space there is for it. Make
sure the boxes are wide enough for the title to display completely.
Fixes#11611.
* Fixes#10359.
* Thanks to Laurent Chea for investigating and identifying the problem.
His patch was not used because it makes more changes than needed.
* Some spacing was uneven leaving items uncentered
* Removed "slow/fast" labels from the sliders as they were not correct
(a delay is short/long, not slow/fast, same for acceleration) and not
very useful.
Signed-off-by: Adrien Destugues <pulkomandy@gmail.com>