Permalink
Browse files

Cosmetics

  • Loading branch information...
1 parent e7fa91b commit 1acc613beb9e14b0c092b90f8ebcf506e56d6387 @poiru poiru committed Dec 13, 2012
Showing with 17 additions and 15 deletions.
  1. +7 −6 Library/DialogAbout.h
  2. +3 −3 Library/DialogManage.cpp
  3. +7 −6 Library/DialogManage.h
View
@@ -27,9 +27,7 @@ class CDialogAbout : public CDialog
CDialogAbout();
virtual ~CDialogAbout();
- INT_PTR OnInitDialog(WPARAM wParam, LPARAM lParam);
- INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
- INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
+ static CDialog* GetDialog() { return c_Dialog; }
static void Open(int tab = 0);
static void Open(const WCHAR* name);
@@ -39,11 +37,11 @@ class CDialogAbout : public CDialog
static void UpdateSkins();
static void UpdateMeasures(CMeterWindow* meterWindow);
- static WINDOWPLACEMENT c_WindowPlacement;
- static CDialogAbout* c_Dialog;
-
protected:
virtual INT_PTR HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
+ INT_PTR OnInitDialog(WPARAM wParam, LPARAM lParam);
+ INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
+ INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
private:
// Log tab
@@ -169,6 +167,9 @@ class CDialogAbout : public CDialog
CTabSkins m_TabSkins;
CTabPlugins m_TabPlugins;
CTabVersion m_TabVersion;
+
+ static WINDOWPLACEMENT c_WindowPlacement;
+ static CDialogAbout* c_Dialog;
};
#endif
@@ -1951,10 +1951,10 @@ INT_PTR CDialogManage::CTabSettings::OnCommand(WPARAM wParam, LPARAM lParam)
Rainmeter->m_ResourceInstance = LoadLibraryEx(resource.c_str(), NULL, DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE);
Rainmeter->m_ResourceLCID = lcid;
- if (CDialogAbout::c_Dialog)
+ if (CDialogAbout::GetDialog())
{
- int sel = TabCtrl_GetCurSel(CDialogAbout::c_Dialog->GetControl(CDialogManage::Id_Tab));
- SendMessage(CDialogAbout::c_Dialog->GetWindow(), WM_CLOSE, 0, 0);
+ int sel = TabCtrl_GetCurSel(CDialogAbout::GetDialog()->GetControl(CDialogManage::Id_Tab));
+ SendMessage(CDialogAbout::GetDialog()->GetWindow(), WM_CLOSE, 0, 0);
if (sel == 0)
{
Rainmeter->DelayedExecuteCommand(L"!About");
@@ -27,21 +27,19 @@ class CDialogManage : public CDialog
CDialogManage();
virtual ~CDialogManage();
- INT_PTR OnInitDialog(WPARAM wParam, LPARAM lParam);
- INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
- INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
+ static CDialog* GetDialog() { return c_Dialog; }
static void Open(const WCHAR* name);
static void Open(int tab = 0);
static void OpenSkin(CMeterWindow* meterWindow);
static void UpdateSkins(CMeterWindow* meterWindow, bool deleted = false);
- static WINDOWPLACEMENT c_WindowPlacement;
- static CDialogManage* c_Dialog;
-
protected:
virtual INT_PTR HandleMessage(UINT uMsg, WPARAM wParam, LPARAM lParam);
+ INT_PTR OnInitDialog(WPARAM wParam, LPARAM lParam);
+ INT_PTR OnNotify(WPARAM wParam, LPARAM lParam);
+ INT_PTR OnCommand(WPARAM wParam, LPARAM lParam);
private:
// Skins tab
@@ -177,6 +175,9 @@ class CDialogManage : public CDialog
CTabSkins m_TabSkins;
CTabLayouts m_TabLayouts;
CTabSettings m_TabSettings;
+
+ static WINDOWPLACEMENT c_WindowPlacement;
+ static CDialogManage* c_Dialog;
};
#endif

0 comments on commit 1acc613

Please sign in to comment.