mirror of
https://github.com/zhongyang219/MusicPlayer2.git
synced 2026-10-26 02:59:31 +08:00
媒体库设置改变时,如果媒体库对话框处理打开状态,则立即应用设置
This commit is contained in:
@@ -196,7 +196,7 @@ BOOL CFloatPlaylistDlg::OnInitDialog()
|
||||
}
|
||||
else
|
||||
{
|
||||
m_path_static.SetWindowText(CCommon::LoadText(IDS_CURRENT_FOLDER, _T(":")));
|
||||
m_path_static.SetWindowText(CCommon::LoadText(IDS_FOLDER, _T(":")));
|
||||
m_path_static.SetIcon(theApp.m_icon_set.select_folder.GetIcon(true), theApp.m_icon_set.select_folder.GetSize());
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,11 @@ void CFolderExploreDlg::GetCurrentSongList(std::vector<SongInfo>& song_list) con
|
||||
}
|
||||
}
|
||||
|
||||
void CFolderExploreDlg::RefreshData()
|
||||
{
|
||||
ShowFolderTree();
|
||||
}
|
||||
|
||||
void CFolderExploreDlg::ShowFolderTree()
|
||||
{
|
||||
CString search_key_word;
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
void GetSongsSelected(std::vector<wstring>& song_list) const;
|
||||
void GetSongsSelected(std::vector<SongInfo>& song_list) const;
|
||||
void GetCurrentSongList(std::vector<SongInfo>& song_list) const;
|
||||
void RefreshData();
|
||||
|
||||
protected:
|
||||
enum SongColumeIndex
|
||||
|
||||
@@ -86,6 +86,16 @@ void CMediaClassifyDlg::GetCurrentSongList(std::vector<SongInfo>& song_list) con
|
||||
}
|
||||
}
|
||||
|
||||
void CMediaClassifyDlg::RefreshData()
|
||||
{
|
||||
m_classifer.SetHideOnlyOneClassification(theApp.m_media_lib_setting_data.hide_only_one_classification);
|
||||
if(m_initialized)
|
||||
{
|
||||
m_classifer.ClassifyMedia();
|
||||
ShowClassifyList();
|
||||
}
|
||||
}
|
||||
|
||||
void CMediaClassifyDlg::ShowClassifyList()
|
||||
{
|
||||
CWaitCursor wait_cursor;
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
void GetSongsSelected(std::vector<wstring>& song_list) const;
|
||||
void GetSongsSelected(std::vector<SongInfo>& song_list) const;
|
||||
void GetCurrentSongList(std::vector<SongInfo>& song_list) const;
|
||||
void RefreshData();
|
||||
|
||||
protected:
|
||||
enum SongColumeIndex
|
||||
|
||||
@@ -194,3 +194,8 @@ void CMediaClassifier::RemoveFiles(std::vector<SongInfo> songs)
|
||||
item.second.erase(iter_removed, item.second.end());
|
||||
}
|
||||
}
|
||||
|
||||
void CMediaClassifier::SetHideOnlyOneClassification(bool hide_only_one_classification)
|
||||
{
|
||||
m_hide_only_one_classification = hide_only_one_classification;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
static bool IsStringYear(std::wstring str);
|
||||
void ClearResult();
|
||||
void RemoveFiles(std::vector<SongInfo> songs); //从结果中删除指定文件
|
||||
void SetHideOnlyOneClassification(bool hide_only_one_classification);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -828,6 +828,8 @@ void CMusicPlayerDlg::ApplySettings(const COptionsDlg& optionDlg)
|
||||
|| theApp.m_app_setting_data.album_cover_as_background != optionDlg.m_tab2_dlg.m_data.album_cover_as_background };
|
||||
bool output_device_changed{ theApp.m_play_setting_data.device_selected != optionDlg.m_tab4_dlg.m_data.device_selected };
|
||||
bool player_core_changed{ theApp.m_play_setting_data.use_mci != optionDlg.m_tab4_dlg.m_data.use_mci };
|
||||
bool media_lib_setting_changed{ theApp.m_media_lib_setting_data.hide_only_one_classification != optionDlg.m_media_lib_dlg.m_data.hide_only_one_classification
|
||||
|| theApp.m_media_lib_setting_data.media_folders != optionDlg.m_media_lib_dlg.m_data.media_folders };
|
||||
|
||||
theApp.m_lyric_setting_data = optionDlg.m_tab1_dlg.m_data;
|
||||
theApp.m_app_setting_data = optionDlg.m_tab2_dlg.m_data;
|
||||
@@ -845,6 +847,17 @@ void CMusicPlayerDlg::ApplySettings(const COptionsDlg& optionDlg)
|
||||
}
|
||||
if (gauss_blur_changed)
|
||||
CPlayer::GetInstance().AlbumCoverGaussBlur();
|
||||
if (media_lib_setting_changed)
|
||||
{
|
||||
if (m_pMediaLibDlg != nullptr && IsWindow(m_pMediaLibDlg->m_hWnd))
|
||||
{
|
||||
CWaitCursor wait_cursor;
|
||||
m_pMediaLibDlg->m_artist_dlg.RefreshData();
|
||||
m_pMediaLibDlg->m_album_dlg.RefreshData();
|
||||
m_pMediaLibDlg->m_genre_dlg.RefreshData();
|
||||
m_pMediaLibDlg->m_folder_explore_dlg.RefreshData();
|
||||
}
|
||||
}
|
||||
|
||||
UpdatePlayPauseButton();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user