summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Swift/QtUI/QtHighlightEditor.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Swift/QtUI/QtHighlightEditor.cpp b/Swift/QtUI/QtHighlightEditor.cpp
index 06695ec..cb5f058 100644
--- a/Swift/QtUI/QtHighlightEditor.cpp
+++ b/Swift/QtUI/QtHighlightEditor.cpp
@@ -47,7 +47,7 @@ QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* pare
connect(ui_.defaultSoundRadio, SIGNAL(clicked()), SLOT(soundOtherSelect()));
connect(ui_.customSoundRadio, SIGNAL(clicked()), SLOT(soundCustomSelect()));
- /* replace the static lineedit control with the roster autocompleter */
+ /* replace the static line-edit control with the roster autocompleter */
ui_.dummySenderName->setVisible(false);
jid_ = new QtSuggestingJIDInput(this, settings);
ui_.senderName->addWidget(jid_);
@@ -72,6 +72,9 @@ QtHighlightEditor::QtHighlightEditor(QtSettingsProvider* settings, QWidget* pare
connect(ui_.defaultSoundRadio, SIGNAL(clicked()), SLOT(widgetClick()));
connect(ui_.customSoundRadio, SIGNAL(clicked()), SLOT(widgetClick()));
+ /* allow selection of a custom sound file */
+ connect(ui_.soundFileButton, SIGNAL(clicked()), SLOT(selectSoundFile()));
+
/* if these are not needed, then they should be removed */
ui_.moveUpButton->setVisible(false);
ui_.moveDownButton->setVisible(false);
@@ -352,7 +355,8 @@ void QtHighlightEditor::handleContactSuggestionRequested(const QString& text)
void QtHighlightEditor::selectSoundFile()
{
- /* TODO: bring up standard Qt file selector here */
+ QString path = QFileDialog::getOpenFileName(this, tr("Select sound file..."), QString(), "Sounds (*.wav)");
+ ui_.soundFile->setText(path);
}
void QtHighlightEditor::selectRow(int row)