mirror of
				https://github.com/chibicitiberiu/rainmeter-studio.git
				synced 2024-02-24 04:33:31 +00:00 
			
		
		
		
	Manage Themes: Fixed that m_Themes order differed from listbox in some cases
This commit is contained in:
		| @@ -1474,23 +1474,9 @@ INT_PTR CDialogManage::CTabThemes::OnCommand(WPARAM wParam, LPARAM lParam) | |||||||
| 				item = GetDlgItem(m_Window, IDC_MANAGETHEMES_LIST); | 				item = GetDlgItem(m_Window, IDC_MANAGETHEMES_LIST); | ||||||
| 				ListBox_AddString(item, theme.c_str()); | 				ListBox_AddString(item, theme.c_str()); | ||||||
|  |  | ||||||
| 				// Add theme to vector | 				path = Rainmeter->GetSettingsPath(); | ||||||
| 				std::vector<std::wstring>& themes = Rainmeter->m_Themes; | 				path += L"Themes\\"; | ||||||
| 				if (!themes.empty()) | 				Rainmeter->ScanForThemes(path); | ||||||
| 				{ |  | ||||||
| 					std::vector<std::wstring>::iterator iter = themes.begin(); |  | ||||||
| 					for ( ; iter != themes.end(); ++iter) |  | ||||||
| 					{ |  | ||||||
| 						if (wcscmp(theme.c_str(), (*iter).c_str()) < 0) |  | ||||||
| 						{ |  | ||||||
| 							themes.insert(iter, theme); |  | ||||||
| 							return TRUE; |  | ||||||
| 						} |  | ||||||
| 					} |  | ||||||
| 				} |  | ||||||
|  |  | ||||||
| 				// If themes empty or if name is alphabetically after vector contents |  | ||||||
| 				themes.push_back(theme); |  | ||||||
| 			} | 			} | ||||||
| 		} | 		} | ||||||
| 		break; | 		break; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Birunthan Mohanathas
					Birunthan Mohanathas