void SoundPropertyEditor::_onBrowseButton (GtkWidget* w, SoundPropertyEditor* self)
{
	// Use a SoundChooser dialog to get a selection from the user
	SoundChooser chooser;
	std::string selection = chooser.chooseSound();
	if (!selection.empty()) {
		// Apply the change to the entity
		self->_entity->setKeyValue(self->_key, selection);
	}
}
Example #2
0
void SoundPropertyEditor::_onBrowseButton(GtkWidget* w, 
										  SoundPropertyEditor* self)
{
	// Use a SoundChooser dialog to get a selection from the user
	SoundChooser chooser;
	const std::string& selection = chooser.chooseSound();

	// Selection will be empy if user clicked cancel or X
	if (!selection.empty())
	{
		// Apply the change to the entity
		self->setKeyValue(self->_key, selection);
	}
}