diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-25 23:34:47 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-25 23:34:47 +0000 |
commit | be489c4e6f4c1ab4b4d7f84e35a73e34e1b0b331 (patch) | |
tree | 233968040ec6bff10b0726de4e7a69313bb78266 /plugins/Quotes | |
parent | c055d21f01423462fa8d468f7c33bde55e595773 (diff) |
- Menu_EnableItem & Menu_SetChecked - more suitable helpers to set flags;
- fix for checks in frame menus;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14389 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Quotes')
-rw-r--r-- | plugins/Quotes/src/QuoteInfoDlg.cpp | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp index 32a5f5e84e..01149affe1 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -269,22 +269,14 @@ int Quotes_OnContactDoubleClick(WPARAM wp, LPARAM/* lp*/) return 0;
}
-namespace
-{
- void enable_menu(HGENMENU hMenu, bool bEnable)
- {
- Menu_ModifyItem(hMenu, NULL, INVALID_HANDLE_VALUE, (bEnable) ? 0 : CMIF_GRAYED);
- }
-}
-
int Quotes_PrebuildContactMenu(WPARAM wp, LPARAM)
{
- enable_menu(g_hMenuEditSettings, false);
- enable_menu(g_hMenuOpenLogFile, false);
+ Menu_EnableItem(g_hMenuEditSettings, false);
+ Menu_EnableItem(g_hMenuOpenLogFile, false);
#ifdef CHART_IMPLEMENT
- enable_menu(g_hMenuChart,false);
+ Menu_EnableItem(g_hMenuChart,false);
#endif
- enable_menu(g_hMenuRefresh, false);
+ Menu_EnableItem(g_hMenuRefresh, false);
MCONTACT hContact = MCONTACT(wp);
if (NULL == hContact)
@@ -292,9 +284,9 @@ int Quotes_PrebuildContactMenu(WPARAM wp, LPARAM) return 0;
}
- enable_menu(g_hMenuEditSettings, true);
+ Menu_EnableItem(g_hMenuEditSettings, true);
- enable_menu(g_hMenuRefresh, true);
+ Menu_EnableItem(g_hMenuRefresh, true);
tstring sLogFileName;
bool bThereIsLogFile = (true == get_log_file(hContact, sLogFileName))
@@ -302,9 +294,9 @@ int Quotes_PrebuildContactMenu(WPARAM wp, LPARAM) if (true == bThereIsLogFile)
{
#ifdef CHART_IMPLEMENT
- enable_menu(g_hMenuChart,true);
+ Menu_EnableItem(g_hMenuChart,true);
#endif
- enable_menu(g_hMenuOpenLogFile, true);
+ Menu_EnableItem(g_hMenuOpenLogFile, true);
}
return 0;
|