selecting the current default input or the current default output doesn't change the setting anymore, and doesn't ask to restart the media server

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21759 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2007-07-30 21:53:01 +00:00
parent a9383a861c
commit 6df0b2d554
2 changed files with 23 additions and 1 deletions

View File

@ -231,6 +231,16 @@ SettingsItem::SettingsItem(dormant_node_info *info, BMessage *message,
}
status_t
SettingsItem::Invoke(BMessage *message)
{
if (IsMarked())
return B_OK;
return BMenuItem::Invoke(message);
}
Settings2Item::Settings2Item(dormant_node_info *info, media_input *input, BMessage *message,
char shortcut, uint32 modifiers)
: BMenuItem(input->name, message, shortcut, modifiers),
@ -240,8 +250,18 @@ Settings2Item::Settings2Item(dormant_node_info *info, media_input *input, BMessa
}
Settings2Item::~Settings2Item()
{
delete fInput;
}
status_t
Settings2Item::Invoke(BMessage *message)
{
if (IsMarked())
return B_OK;
return BMenuItem::Invoke(message);
}

View File

@ -41,6 +41,7 @@ class SettingsItem : public BMenuItem
SettingsItem(dormant_node_info *info, BMessage *message,
char shortcut = 0, uint32 modifiers = 0);
dormant_node_info *fInfo;
virtual status_t Invoke(BMessage *message = NULL);
};
class Settings2Item : public BMenuItem
@ -48,7 +49,8 @@ class Settings2Item : public BMenuItem
public:
Settings2Item(dormant_node_info *info, media_input *input, BMessage *message,
char shortcut = 0, uint32 modifiers = 0);
~Settings2Item();
virtual ~Settings2Item();
virtual status_t Invoke(BMessage *message = NULL);
dormant_node_info *fInfo;
media_input *fInput;
};