mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
Minor changes requested by hatstand.
This commit is contained in:
parent
a468085c3a
commit
d8ba0c4f91
@ -56,7 +56,7 @@ PlaylistContainer::PlaylistContainer(QWidget* parent)
|
||||
ui_->file_path_box->addItem("Relative");
|
||||
|
||||
connect(ui_->file_path_box, SIGNAL(currentIndexChanged(int)),
|
||||
SLOT(PathSettingChanged()));
|
||||
SLOT(PathSettingChanged(int)));
|
||||
|
||||
no_matches_label_ = new QLabel(ui_->playlist);
|
||||
no_matches_label_->setAlignment(Qt::AlignTop | Qt::AlignHCenter);
|
||||
@ -470,8 +470,6 @@ bool PlaylistContainer::eventFilter(QObject* objectWatched, QEvent* event) {
|
||||
return QWidget::eventFilter(objectWatched, event);
|
||||
}
|
||||
|
||||
void PlaylistContainer::PathSettingChanged() {
|
||||
int value = ui_->file_path_box->currentIndex();
|
||||
Playlist::Path path = static_cast<Playlist::Path>(value);
|
||||
settings_.setValue(Playlist::kPathType, int(path));
|
||||
void PlaylistContainer::PathSettingChanged(int index) {
|
||||
settings_.setValue(Playlist::kPathType, index);
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ signals:
|
||||
|
||||
void UpdateNoMatchesLabel();
|
||||
|
||||
void PathSettingChanged();
|
||||
void PathSettingChanged(int index);
|
||||
|
||||
private:
|
||||
void UpdateActiveIcon(const QIcon& icon);
|
||||
|
@ -108,7 +108,7 @@ void M3UParser::Save(const SongList& songs, QIODevice* device,
|
||||
|
||||
QSettings s;
|
||||
s.beginGroup(Playlist::kSettingsGroup);
|
||||
bool writeMetadata = s.value("write_metadata", true).toBool();
|
||||
bool writeMetadata = s.value(Playlist::kWriteMetadata, true).toBool();
|
||||
s.endGroup();
|
||||
|
||||
for (const Song& song : songs) {
|
||||
|
@ -148,7 +148,7 @@ void BehaviourSettingsPage::Load() {
|
||||
break;
|
||||
}
|
||||
ui_->b_write_metadata->setChecked(s.value(Playlist::kWriteMetadata, true).toBool());
|
||||
ui_->b_quickchange_menu->setChecked(s.value(Playlist::kQuickChangeMenu, true).toBool());
|
||||
ui_->b_quickchange_menu->setChecked(s.value(Playlist::kQuickChangeMenu, false).toBool());
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup(PlaylistTabBar::kSettingsGroup);
|
||||
@ -179,12 +179,15 @@ void BehaviourSettingsPage::Save() {
|
||||
ui_->menu_playmode->itemData(ui_->menu_playmode->currentIndex()).toInt());
|
||||
|
||||
Playlist::Path path = Playlist::Path_Automatic;
|
||||
if (ui_->b_automatic_path->isChecked())
|
||||
if (ui_->b_automatic_path->isChecked()) {
|
||||
path = Playlist::Path_Automatic;
|
||||
if (ui_->b_absolute_path->isChecked())
|
||||
}
|
||||
else if (ui_->b_absolute_path->isChecked()) {
|
||||
path = Playlist::Path_Absolute;
|
||||
if (ui_->b_relative_path->isChecked())
|
||||
}
|
||||
else if (ui_->b_relative_path->isChecked()) {
|
||||
path = Playlist::Path_Relative;
|
||||
}
|
||||
|
||||
s.beginGroup(MainWindow::kSettingsGroup);
|
||||
s.setValue("showtray", ui_->b_show_tray_icon_->isChecked());
|
||||
@ -206,7 +209,7 @@ void BehaviourSettingsPage::Save() {
|
||||
s.beginGroup(Playlist::kSettingsGroup);
|
||||
s.setValue("greyoutdeleted", ui_->b_grey_out_deleted_->isChecked());
|
||||
s.setValue("click_edit_inline", ui_->b_click_edit_inline_->isChecked());
|
||||
s.setValue(Playlist::kPathType, int(path));
|
||||
s.setValue(Playlist::kPathType, static_cast<int>(path));
|
||||
s.setValue(Playlist::kWriteMetadata, ui_->b_write_metadata->isChecked());
|
||||
s.setValue(Playlist::kQuickChangeMenu, ui_->b_quickchange_menu->isChecked());
|
||||
s.endGroup();
|
||||
|
Loading…
Reference in New Issue
Block a user