Network: added BNetworkSettingsListener.
* Same as the configuration listener, just for SettingsUpdated(). * This is now broadcasted to all list items, too.
This commit is contained in:
parent
f7ccc9af85
commit
d26777c4e4
@ -42,7 +42,14 @@ public:
|
||||
};
|
||||
|
||||
|
||||
class BNetworkSettingsItem : public BNetworkConfigurationListener {
|
||||
class BNetworkSettingsListener {
|
||||
public:
|
||||
virtual void SettingsUpdated(uint32 type) = 0;
|
||||
};
|
||||
|
||||
|
||||
class BNetworkSettingsItem : public BNetworkConfigurationListener,
|
||||
BNetworkSettingsListener {
|
||||
public:
|
||||
BNetworkSettingsItem();
|
||||
virtual ~BNetworkSettingsItem();
|
||||
|
@ -477,6 +477,14 @@ NetworkWindow::_SelectItem(BListItem* listItem)
|
||||
void
|
||||
NetworkWindow::_BroadcastSettingsUpdate(uint32 type)
|
||||
{
|
||||
for (int32 index = 0; index < fListView->FullListCountItems(); index++) {
|
||||
BNetworkSettingsListener* listener
|
||||
= dynamic_cast<BNetworkSettingsListener*>(
|
||||
fListView->FullListItemAt(index));
|
||||
if (listener != NULL)
|
||||
listener->SettingsUpdated(type);
|
||||
}
|
||||
|
||||
SettingsMap::const_iterator iterator = fSettingsMap.begin();
|
||||
for (; iterator != fSettingsMap.end(); iterator++)
|
||||
iterator->second->SettingsUpdated(type);
|
||||
|
Loading…
Reference in New Issue
Block a user