From 559b5ae05f8d91bdaeaafde4c846ba309b1f0883 Mon Sep 17 00:00:00 2001 From: Birunthan Mohanathas Date: Sat, 27 Nov 2010 10:57:59 +0000 Subject: [PATCH] About dialog now opens with Log selected as default. Changed DisableDrag=1/0 to DisableDragging=1/0. --- Library/AboutDialog.cpp | 10 +++++++--- Library/MeterWindow.cpp | 2 +- Library/Rainmeter.cpp | 16 ++++++++-------- Library/Rainmeter.h | 6 +++--- Library/TrayWindow.cpp | 2 +- 5 files changed, 20 insertions(+), 16 deletions(-) diff --git a/Library/AboutDialog.cpp b/Library/AboutDialog.cpp index 562553c1..7225daf3 100644 --- a/Library/AboutDialog.cpp +++ b/Library/AboutDialog.cpp @@ -459,6 +459,10 @@ BOOL OnInitAboutDialog(HWND window) SendMessage(widget, LB_INSERTSTRING, 1, (LPARAM) L"Plugins"); SendMessage(widget, LB_INSERTSTRING, 2, (LPARAM) L"--------------------"); + // Select Log entry + SendMessage(widget, LB_SETCURSEL, 0, 0); + SetTimer(window, LOGTIMER, 1000, NULL); + if (g_DialogWin == NULL) { // Add columns to the list view @@ -470,17 +474,17 @@ BOOL OnInitAboutDialog(HWND window) LVCOLUMN lvc; lvc.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM; lvc.iSubItem = 0; - lvc.pszText = L"Measure"; + lvc.pszText = L"Log Type"; lvc.cx = 110; lvc.fmt = LVCFMT_LEFT; // left-aligned column ListView_InsertColumn(widget, 0, &lvc); lvc.iSubItem = 1; lvc.cx = 100; - lvc.pszText = L"Value"; + lvc.pszText = L"Time"; ListView_InsertColumn(widget, 1, &lvc); lvc.iSubItem = 2; lvc.cx = 150; - lvc.pszText = L"Range"; + lvc.pszText = L"Message"; ListView_InsertColumn(widget, 2, &lvc); ScanPlugins(); diff --git a/Library/MeterWindow.cpp b/Library/MeterWindow.cpp index cf52d099..193768e4 100644 --- a/Library/MeterWindow.cpp +++ b/Library/MeterWindow.cpp @@ -3490,7 +3490,7 @@ LRESULT CMeterWindow::OnExitSizeMove(UINT uMsg, WPARAM wParam, LPARAM lParam) */ LRESULT CMeterWindow::OnNcHitTest(UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (m_WindowDraggable && !Rainmeter->GetDisableDrag()) + if (m_WindowDraggable && !Rainmeter->GetDisableDragging()) { POINT pos; pos.x = (SHORT)LOWORD(lParam); diff --git a/Library/Rainmeter.cpp b/Library/Rainmeter.cpp index 128a4cc1..aa0651bf 100644 --- a/Library/Rainmeter.cpp +++ b/Library/Rainmeter.cpp @@ -1188,7 +1188,7 @@ CRainmeter::CRainmeter() m_DisableRDP = false; - m_DisableDrag = false; + m_DisableDragging = false; m_Logging = false; @@ -2776,7 +2776,7 @@ void CRainmeter::ReadGeneralSettings(const std::wstring& iniFile) c_GlobalConfig.netInSpeed = parser.ReadFloat(L"Rainmeter", L"NetInSpeed", 0.0); c_GlobalConfig.netOutSpeed = parser.ReadFloat(L"Rainmeter", L"NetOutSpeed", 0.0); - m_DisableDrag = 0!=parser.ReadInt(L"Rainmeter", L"DisableDrag", 0); + m_DisableDragging = 0!=parser.ReadInt(L"Rainmeter", L"DisableDragging", 0); m_DisableRDP = 0!=parser.ReadInt(L"Rainmeter", L"DisableRDP", 0); m_ConfigEditor = parser.ReadString(L"Rainmeter", L"ConfigEditor", L""); @@ -3274,10 +3274,10 @@ void CRainmeter::ShowContextMenu(POINT pos, CMeterWindow* meterWindow) { AppendMenu(configMenu, MF_SEPARATOR, 0, NULL); AppendMenu(configMenu, 0, ID_CONTEXT_OPENSKINSFOLDER, L"Open Skins\' Folder"); - AppendMenu(configMenu, 0, ID_CONTEXT_DISABLEDRAG, L"Disable Drag"); + AppendMenu(configMenu, 0, ID_CONTEXT_DISABLEDRAG, L"Disable Dragging"); AppendMenu(configMenu, 0, ID_CONTEXT_MANAGESKINS, L"Manage Skins..."); - if (m_DisableDrag) + if (m_DisableDragging) { CheckMenuItem(configMenu, ID_CONTEXT_DISABLEDRAG, MF_BYCOMMAND | MF_CHECKED); } @@ -3541,7 +3541,7 @@ HMENU CRainmeter::CreateSkinMenu(CMeterWindow* meterWindow, int index, HMENU con CheckMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_REMEMBERPOSITION, MF_BYCOMMAND | MF_CHECKED); } - if (m_DisableDrag) + if (m_DisableDragging) { EnableMenuItem(settingsMenu, ID_CONTEXT_SKINMENU_DRAGGABLE, MF_BYCOMMAND | MF_GRAYED); } @@ -3789,10 +3789,10 @@ void CRainmeter::SetDebug(bool debug) WritePrivateProfileString(L"Rainmeter", L"Debug", debug ? L"1" : L"0", m_IniFile.c_str()); } -void CRainmeter::SetDisableDrag(bool drag) +void CRainmeter::SetDisableDragging(bool dragging) { - m_DisableDrag = drag; - WritePrivateProfileString(L"Rainmeter", L"DisableDrag", drag ? L"1" : L"0", m_IniFile.c_str()); + m_DisableDragging = dragging; + WritePrivateProfileString(L"Rainmeter", L"DisableDragging", dragging ? L"1" : L"0", m_IniFile.c_str()); } void CRainmeter::TestSettingsFile(bool bDefaultIniLocation) diff --git a/Library/Rainmeter.h b/Library/Rainmeter.h index 6ba99b80..b17ee4e3 100644 --- a/Library/Rainmeter.h +++ b/Library/Rainmeter.h @@ -200,8 +200,8 @@ public: bool GetDisableRDP() { return m_DisableRDP; } - bool GetDisableDrag() { return m_DisableDrag; } - void SetDisableDrag(bool drag); + bool GetDisableDragging() { return m_DisableDragging; } + void SetDisableDragging(bool dragging); void AddAboutLogInfo(const LOG_INFO& logInfo); const std::list& GetAboutLogData() { return m_LogData; } @@ -291,7 +291,7 @@ private: bool m_DisableRDP; - bool m_DisableDrag; + bool m_DisableDragging; bool m_Logging; diff --git a/Library/TrayWindow.cpp b/Library/TrayWindow.cpp index d552597f..762402cc 100644 --- a/Library/TrayWindow.cpp +++ b/Library/TrayWindow.cpp @@ -444,7 +444,7 @@ LRESULT CALLBACK CTrayWindow::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARA } else if(wParam == ID_CONTEXT_DISABLEDRAG) { - Rainmeter->SetDisableDrag(!Rainmeter->GetDisableDrag()); + Rainmeter->SetDisableDragging(!Rainmeter->GetDisableDragging()); } else if(wParam == ID_CONTEXT_EDITCONFIG) {