summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2017-03-01 16:19:03 (GMT)
committerTobias Markmann <tm@ayena.de>2017-03-01 16:19:03 (GMT)
commit1eac9453d347dea9a1d6490ff6a538291f5d3999 (patch)
tree0fc2ba5bdc4903f5ea93c0c06ef365dce2c5bafe
parentb6fd152bf02199cf0a287af6031d75ccb8ae6117 (diff)
downloadswift-1eac9453d347dea9a1d6490ff6a538291f5d3999.zip
swift-1eac9453d347dea9a1d6490ff6a538291f5d3999.tar.bz2
Remove support for selecting custom notification sounds
Test-Information: Tested on macOS 10.12.3 with Qt 5.7.1 that the custom sound menu item was gone. Change-Id: I75186d1a3b74db751fbdd5aaf54402f23f74661b
-rw-r--r--Swift/QtUI/QtHighlightNotificationConfigDialog.cpp2
-rw-r--r--Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp10
2 files changed, 1 insertions, 11 deletions
diff --git a/Swift/QtUI/QtHighlightNotificationConfigDialog.cpp b/Swift/QtUI/QtHighlightNotificationConfigDialog.cpp
index c4e64ab..19274a2 100644
--- a/Swift/QtUI/QtHighlightNotificationConfigDialog.cpp
+++ b/Swift/QtUI/QtHighlightNotificationConfigDialog.cpp
@@ -133,7 +133,7 @@ HighlightConfiguration QtHighlightNotificationConfigDialog::getHighlightConfigur
action.setSoundFilePath(boost::optional<std::string>());
}
else {
- action.setSoundFilePath(boost::optional<std::string>(soundFilePath));
+ action.setSoundFilePath(boost::optional<std::string>(""));
}
action.setSystemNotificationEnabled(item->data(startingColumn + 3, QtCheckBoxStyledItemDelegate::DATA_ROLE).toBool());
diff --git a/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp b/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp
index 3811004..03af455 100644
--- a/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp
+++ b/Swift/QtUI/QtSoundSelectionStyledItemDelegate.cpp
@@ -83,25 +83,15 @@ bool QtSoundSelectionStyledItemDelegate::editorEvent(QEvent* event, QAbstractIte
selectedAction->setCheckable(true);
selectedAction->setChecked(true);
}
- auto chooseSoundFile = popUpMenu->addAction(tr("Choose sound fileā€¦"));
selectedAction = popUpMenu->exec(mouseEvent->globalPos(), selectedAction);
if (selectedAction == defaultSound) {
model->setData(index, "defaultSound", Qt::EditRole);
}
- else if (customSoundFile && (selectedAction == customSoundFile)) {
- model->setData(index, customSoundFile->text(), Qt::EditRole);
- }
else if (selectedAction == noSound) {
model->setData(index, "", Qt::EditRole);
}
- else if (selectedAction == chooseSoundFile) {
- auto newPath = QFileDialog::getOpenFileName(0, tr("Choose notification sound file"), "", tr("WAV Files (*.wav)"));
- if (!newPath.isEmpty()) {
- model->setData(index, newPath, Qt::EditRole);
- }
- }
delete popUpMenu;
}