Manage Settings: Fixed that ConfigEditor/SkinPath are written when tab is opened

This commit is contained in:
Birunthan Mohanathas 2012-11-13 17:39:12 +02:00
parent e47e5a2967
commit 89fcfeb4e6
2 changed files with 20 additions and 16 deletions

View File

@ -358,8 +358,6 @@ CDialogAbout::CTabLog::CTabLog(HWND owner) : CTab(Rainmeter->GetResourceInstance
*/
void CDialogAbout::CTabLog::Initialize()
{
m_Initialized = true;
// Add columns to the list view
HWND item = GetDlgItem(m_Window, IDC_ABOUTLOG_ITEMS_LISTVIEW);
ListView_SetExtendedListViewStyleEx(item, 0, LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
@ -416,6 +414,8 @@ void CDialogAbout::CTabLog::Initialize()
item = GetDlgItem(m_Window, IDC_ABOUTLOG_DEBUG_CHECKBOX);
Button_SetCheck(item, BST_CHECKED);
m_Initialized = true;
}
/*
@ -594,8 +594,6 @@ CDialogAbout::CTabSkins::CTabSkins(HWND owner) : CTab(Rainmeter->GetResourceInst
*/
void CDialogAbout::CTabSkins::Initialize()
{
m_Initialized = true;
// Add columns to the list view
HWND item = GetDlgItem(m_Window, IDC_ABOUTSKINS_ITEMS_LISTVIEW);
ListView_SetExtendedListViewStyleEx(item, 0, LVS_EX_LABELTIP | LVS_EX_FULLROWSELECT | LVS_EX_DOUBLEBUFFER);
@ -630,6 +628,8 @@ void CDialogAbout::CTabSkins::Initialize()
ListView_InsertColumn(item, 2, &lvc);
UpdateSkinList();
m_Initialized = true;
}
/*
@ -905,8 +905,6 @@ CDialogAbout::CTabPlugins::CTabPlugins(HWND owner) : CTab(Rainmeter->GetResource
*/
void CDialogAbout::CTabPlugins::Initialize()
{
m_Initialized = true;
// Add columns to the list view
HWND item = GetDlgItem(m_Window, IDC_ABOUTPLUGINS_ITEMS_LISTVIEW);
@ -1043,6 +1041,8 @@ void CDialogAbout::CTabPlugins::Initialize()
{
findPlugins(Rainmeter->GetUserPluginPath());
}
m_Initialized = true;
}
/*
@ -1092,8 +1092,6 @@ CDialogAbout::CTabVersion::CTabVersion(HWND owner) : CTab(Rainmeter->GetResource
*/
void CDialogAbout::CTabVersion::Initialize()
{
m_Initialized = true;
HWND item = GetDlgItem(m_Window, IDC_ABOUTVERSION_RAINMETER_ICON);
HICON icon = GetIcon(IDI_RAINMETER, true);
Static_SetIcon(item, icon);
@ -1114,6 +1112,8 @@ void CDialogAbout::CTabVersion::Initialize()
item = GetDlgItem(m_Window, IDC_ABOUTVERSION_SKINPATH_TEXT);
text = L"SkinPath: " + Rainmeter->GetSkinPath();
SetWindowText(item, text.c_str());
m_Initialized = true;
}
/*

View File

@ -345,8 +345,6 @@ CDialogManage::CTabSkins::CTabSkins(HWND owner) : CTab(Rainmeter->GetResourceIns
*/
void CDialogManage::CTabSkins::Initialize()
{
m_Initialized = true;
BUTTON_SPLITINFO bsi;
bsi.mask = BCSIF_SIZE;
bsi.size.cx = 20;
@ -370,7 +368,7 @@ void CDialogManage::CTabSkins::Initialize()
// Apply icons and populate tree
item = GetDlgItem(m_Window, IDC_MANAGESKINS_SKINS_TREEVIEW);
TreeView_SetImageList(item, hImageList, TVSIL_NORMAL);
UpdateSkins(NULL);
Update(NULL, false);
// Get rid of the EDITTEXT control border
item = GetDlgItem(m_Window, IDC_MANAGESKINS_DESCRIPTION_TEXT);
@ -402,6 +400,7 @@ void CDialogManage::CTabSkins::Initialize()
ComboBox_AddString(item, GetString(ID_STR_FADEIN));
ComboBox_AddString(item, GetString(ID_STR_FADEOUT));
m_Initialized = true;
m_HandleCommands = true;
}
@ -878,7 +877,7 @@ INT_PTR CDialogManage::CTabSkins::OnCommand(WPARAM wParam, LPARAM lParam)
{
if (!m_HandleCommands)
{
// Values are being changed/reset, no need to apply changes
// Values are being changed/reset, no need to apply changes.
return FALSE;
}
@ -1364,14 +1363,14 @@ CDialogManage::CTabLayouts::CTabLayouts(HWND owner) : CTab(Rainmeter->GetResourc
*/
void CDialogManage::CTabLayouts::Initialize()
{
m_Initialized = true;
HWND item = GetDlgItem(m_Window, IDC_MANAGETHEMES_LIST);
const std::vector<std::wstring>& layouts = Rainmeter->GetAllLayouts();
for (int i = 0, isize = layouts.size(); i < isize; ++i)
{
ListBox_AddString(item, layouts[i].c_str());
}
m_Initialized = true;
}
/*
@ -1623,8 +1622,6 @@ CDialogManage::CTabSettings::CTabSettings(HWND owner) : CTab(Rainmeter->GetResou
*/
void CDialogManage::CTabSettings::Initialize()
{
m_Initialized = true;
// Scan for languages
HWND item = GetDlgItem(m_Window, IDC_MANAGESETTINGS_LANGUAGE_COMBOBOX);
@ -1679,6 +1676,8 @@ void CDialogManage::CTabSettings::Initialize()
bool iconEnabled = Rainmeter->GetTrayWindow()->IsTrayIconEnabled();
Button_SetCheck(GetDlgItem(m_Window, IDC_MANAGESETTINGS_TRAYICON_CHECKBOX), iconEnabled);
m_Initialized = true;
}
/*
@ -1698,6 +1697,11 @@ INT_PTR CALLBACK CDialogManage::CTabSettings::DlgProc(HWND hWnd, UINT uMsg, WPAR
INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam)
{
if (!m_Initialized)
{
return FALSE;
}
switch (LOWORD(wParam))
{
case IDC_MANAGESETTINGS_LANGUAGE_COMBOBOX: