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:
committed by
Alexandre Deckner
parent
0ba16dd4c1
commit
6463044ee7
@@ -34,11 +34,13 @@ class BButton;
|
|||||||
class BFile;
|
class BFile;
|
||||||
class BGroupLayout;
|
class BGroupLayout;
|
||||||
class BWebDownload;
|
class BWebDownload;
|
||||||
|
class SettingsMessage;
|
||||||
|
|
||||||
|
|
||||||
class DownloadWindow : public BWindow {
|
class DownloadWindow : public BWindow {
|
||||||
public:
|
public:
|
||||||
DownloadWindow(BRect frame, bool visible);
|
DownloadWindow(BRect frame, bool visible,
|
||||||
|
SettingsMessage* settings);
|
||||||
virtual ~DownloadWindow();
|
virtual ~DownloadWindow();
|
||||||
|
|
||||||
virtual void MessageReceived(BMessage* message);
|
virtual void MessageReceived(BMessage* message);
|
||||||
@@ -55,6 +57,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
BGroupLayout* fDownloadViewsLayout;
|
BGroupLayout* fDownloadViewsLayout;
|
||||||
BButton* fRemoveFinishedButton;
|
BButton* fRemoveFinishedButton;
|
||||||
|
SettingsMessage* fSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -475,6 +475,16 @@ SettingsMessage::_NotifyValueChanged(const char* name) const
|
|||||||
{
|
{
|
||||||
BMessage message(MSG_SETTINGS_VALUE_CHANGED);
|
BMessage message(MSG_SETTINGS_VALUE_CHANGED);
|
||||||
message.AddString("name", name);
|
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();
|
int32 count = fListeners.CountItems();
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
BMessenger* listener = reinterpret_cast<BMessenger*>(
|
BMessenger* listener = reinterpret_cast<BMessenger*>(
|
||||||
|
|||||||
Reference in New Issue
Block a user