Add the value to the notification message as well.

git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@339 94f232f2-1747-11df-bad5-a5bfde151594
This commit is contained in:
stippi 2010-03-22 18:10:49 +00:00 committed by Alexandre Deckner
parent 0ba16dd4c1
commit 6463044ee7
2 changed files with 14 additions and 1 deletions

View File

@ -34,11 +34,13 @@ class BButton;
class BFile;
class BGroupLayout;
class BWebDownload;
class SettingsMessage;
class DownloadWindow : public BWindow {
public:
DownloadWindow(BRect frame, bool visible);
DownloadWindow(BRect frame, bool visible,
SettingsMessage* settings);
virtual ~DownloadWindow();
virtual void MessageReceived(BMessage* message);
@ -55,6 +57,7 @@ private:
private:
BGroupLayout* fDownloadViewsLayout;
BButton* fRemoveFinishedButton;
SettingsMessage* fSettings;
};

View File

@ -475,6 +475,16 @@ SettingsMessage::_NotifyValueChanged(const char* name) const
{
BMessage message(MSG_SETTINGS_VALUE_CHANGED);
message.AddString("name", name);
// Add the value of that name to the notification.
type_code type;
if (GetInfo(name, &type) == B_OK) {
const void* data;
ssize_t numBytes;
if (FindData(name, type, &data, &numBytes) == B_OK)
message.AddData("value", type, data, numBytes);
}
int32 count = fListeners.CountItems();
for (int32 i = 0; i < count; i++) {
BMessenger* listener = reinterpret_cast<BMessenger*>(