diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-14 15:51:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-14 15:51:34 +0000 |
commit | e58823d961a630eb62e60d2ccb443761ba5f1704 (patch) | |
tree | 62d071be480d57af2a53f154a1468abe0b9449ff /src/modules/skin | |
parent | 721aea0764451e985d575236205808bbef298244 (diff) |
- all MS_CLIST_ADD*ITEM services replaced with Menu_Add*Item stubs.
- massive cleanup of the menu-related code
git-svn-id: http://svn.miranda-ng.org/main/trunk@410 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/skin')
-rw-r--r-- | src/modules/skin/hotkeys.cpp | 24 | ||||
-rw-r--r-- | src/modules/skin/skinicons.cpp | 130 | ||||
-rw-r--r-- | src/modules/skin/sounds.cpp | 52 |
3 files changed, 103 insertions, 103 deletions
diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp index 1d3c0cdd6b..018411d7a1 100644 --- a/src/modules/skin/hotkeys.cpp +++ b/src/modules/skin/hotkeys.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -215,7 +215,7 @@ static INT_PTR svcHotkeyRegister(WPARAM wParam, LPARAM lParam) item->DefHotkey = desc->DefHotKey & ~HKF_MIRANDA_LOCAL;
item->Hotkey = DBGetContactSettingWord(NULL, DBMODULENAME, item->pszName, item->DefHotkey);
item->type = item->pszService ?
- ( THotkeyType )DBGetContactSettingByte(NULL, DBMODULENAME "Types", item->pszName,
+ ( THotkeyType )DBGetContactSettingByte(NULL, DBMODULENAME "Types", item->pszName,
(desc->DefHotKey & HKF_MIRANDA_LOCAL) ? HKT_LOCAL : HKT_GLOBAL) : HKT_MANUAL;
item->lParam = desc->lParam;
@@ -403,11 +403,11 @@ static TCHAR *sttHokeyVkToName(WORD vkKey) void HotkeyToName(TCHAR *buf, int size, BYTE shift, BYTE key)
{
- mir_sntprintf(buf, size, _T("%s%s%s%s%s"),
- (shift & HOTKEYF_CONTROL) ? _T("Ctrl + ") : _T(""),
- (shift & HOTKEYF_ALT) ? _T("Alt + ") : _T(""),
- (shift & HOTKEYF_SHIFT) ? _T("Shift + ") : _T(""),
- (shift & HOTKEYF_EXT) ? _T("Win + ") : _T(""),
+ mir_sntprintf(buf, size, _T("%s%s%s%s%s"),
+ (shift & HOTKEYF_CONTROL) ? _T("Ctrl + ") : _T(""),
+ (shift & HOTKEYF_ALT) ? _T("Alt + ") : _T(""),
+ (shift & HOTKEYF_SHIFT) ? _T("Shift + ") : _T(""),
+ (shift & HOTKEYF_EXT) ? _T("Win + ") : _T(""),
sttHokeyVkToName(key));
}
@@ -853,7 +853,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, szSetting = mir_t2a(lvi.pszText);
- ListView_SetCheckState(hwndHotkey, lvi.iItem,
+ ListView_SetCheckState(hwndHotkey, lvi.iItem,
DBGetContactSettingByte(NULL, DBMODULENAME "UI", szSetting, TRUE));
mir_free(szSetting);
@@ -891,7 +891,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, szSetting = mir_t2a(lvi.pszText);
- DBWriteContactSettingByte(NULL, DBMODULENAME "UI", szSetting,
+ DBWriteContactSettingByte(NULL, DBMODULENAME "UI", szSetting,
(BYTE) ListView_GetCheckState(hwndHotkey, lvi.iItem));
mir_free(szSetting);
@@ -1060,10 +1060,10 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (item->type != HKT_MANUAL) {
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
AppendMenu(hMenu, MF_STRING|
- ((item->OptType == HKT_GLOBAL) ? MF_CHECKED : 0),
+ ((item->OptType == HKT_GLOBAL) ? MF_CHECKED : 0),
(UINT_PTR)MI_SYSTEM, TranslateT("System scope"));
AppendMenu(hMenu, MF_STRING|
- ((item->OptType == HKT_LOCAL) ? MF_CHECKED : 0),
+ ((item->OptType == HKT_LOCAL) ? MF_CHECKED : 0),
(UINT_PTR)MI_LOCAL, TranslateT("Miranda scope"));
}
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp index b8febacf3a..8dd3d47a68 100644 --- a/src/modules/skin/skinicons.cpp +++ b/src/modules/skin/skinicons.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -34,66 +34,66 @@ struct StandardIconDescription static const struct StandardIconDescription mainIcons[] =
{
- { SKINICON_OTHER_MIRANDA, LPGEN("Miranda IM"), -IDI_MIRANDA },
- { SKINICON_EVENT_MESSAGE, LPGEN("Message"), -IDI_RECVMSG },
- { SKINICON_EVENT_URL, LPGEN("URL"), -IDI_URL },
- { SKINICON_EVENT_FILE, LPGEN("File"), -IDI_FILE },
- { SKINICON_OTHER_USERONLINE, LPGEN("User Online"), -IDI_USERONLINE },
- { SKINICON_OTHER_GROUPOPEN, LPGEN("Group (Open)"), -IDI_GROUPOPEN },
- { SKINICON_OTHER_GROUPSHUT, LPGEN("Group (Closed)"), -IDI_GROUPSHUT },
- { SKINICON_OTHER_CONNECTING, LPGEN("Connecting"), -IDI_LOAD },
- { SKINICON_OTHER_ADDCONTACT, LPGEN("Add Contact"), -IDI_ADDCONTACT },
- { SKINICON_OTHER_USERDETAILS, LPGEN("User Details"), -IDI_USERDETAILS },
- { SKINICON_OTHER_HISTORY, LPGEN("History"), -IDI_HISTORY },
- { SKINICON_OTHER_DOWNARROW, LPGEN("Down Arrow"), -IDI_DOWNARROW },
- { SKINICON_OTHER_FINDUSER, LPGEN("Find User"), -IDI_FINDUSER },
- { SKINICON_OTHER_OPTIONS, LPGEN("Options"), -IDI_OPTIONS },
- { SKINICON_OTHER_SENDEMAIL, LPGEN("Send E-mail"), -IDI_SENDEMAIL },
- { SKINICON_OTHER_DELETE, LPGEN("Delete"), -IDI_DELETE },
- { SKINICON_OTHER_RENAME, LPGEN("Rename"), -IDI_RENAME },
- { SKINICON_OTHER_SMS, LPGEN("SMS"), -IDI_SMS },
- { SKINICON_OTHER_SEARCHALL, LPGEN("Search All"), -IDI_SEARCHALL },
- { SKINICON_OTHER_TICK, LPGEN("Tick"), -IDI_TICK },
- { SKINICON_OTHER_NOTICK, LPGEN("No Tick"), -IDI_NOTICK },
- { SKINICON_OTHER_HELP, LPGEN("Help"), -IDI_HELP },
- { SKINICON_OTHER_MIRANDAWEB, LPGEN("Miranda Website"), -IDI_MIRANDAWEBSITE },
- { SKINICON_OTHER_TYPING, LPGEN("Typing"), -IDI_TYPING },
- { SKINICON_OTHER_SMALLDOT, LPGEN("Small Dot"), -IDI_SMALLDOT },
- { SKINICON_OTHER_FILLEDBLOB, LPGEN("Filled Blob"), -IDI_FILLEDBLOB },
- { SKINICON_OTHER_EMPTYBLOB, LPGEN("Empty Blob"), -IDI_EMPTYBLOB },
- { SKINICON_OTHER_UNICODE, LPGEN("Unicode plugin"), -IDI_UNICODE },
- { SKINICON_OTHER_ANSI, LPGEN("ANSI plugin"), -IDI_ANSI },
- { SKINICON_OTHER_LOADED, LPGEN("Running plugin"), -IDI_LOADED },
- { SKINICON_OTHER_NOTLOADED, LPGEN("Unloaded plugin"), -IDI_NOTLOADED },
- { SKINICON_OTHER_UNDO, LPGEN("Undo"), -IDI_UNDO },
- { SKINICON_OTHER_WINDOW, LPGEN("Window"), -IDI_WINDOW },
- { SKINICON_OTHER_WINDOWS, LPGEN("System"), -IDI_WINDOWS },
- { SKINICON_OTHER_ACCMGR, LPGEN("Accounts"), -IDI_ACCMGR },
- { SKINICON_OTHER_SHOWHIDE, LPGEN("ShowHide"), -IDI_SHOWHIDE },
- { SKINICON_OTHER_EXIT, LPGEN("Exit"), -IDI_EXIT },
- { SKINICON_OTHER_MAINMENU, LPGEN("Main Menu"), -IDI_MIRANDA },
- { SKINICON_OTHER_STATUS, LPGEN("Status"), -IDI_ONLINE },
- { SKINICON_CHAT_JOIN, LPGEN("Join chat"), -IDI_JOINCHAT },
- { SKINICON_CHAT_LEAVE, LPGEN("Leave chat"), -IDI_LEAVECHAT },
- { SKINICON_OTHER_GROUP, LPGEN("Move to Group"), -IDI_MOVETOGROUP },
- { SKINICON_OTHER_ON, LPGEN("On"), -IDI_ON },
- { SKINICON_OTHER_OFF, LPGEN("Off"), -IDI_OFF },
- { SKINICON_OTHER_STATUS_LOCKED, LPGEN("Locked status"), -IDI_STATUS_LOCKED, 0, "Status Icons" },
+ { SKINICON_OTHER_MIRANDA, LPGEN("Miranda IM"), -IDI_MIRANDA },
+ { SKINICON_EVENT_MESSAGE, LPGEN("Message"), -IDI_RECVMSG },
+ { SKINICON_EVENT_URL, LPGEN("URL"), -IDI_URL },
+ { SKINICON_EVENT_FILE, LPGEN("File"), -IDI_FILE },
+ { SKINICON_OTHER_USERONLINE, LPGEN("User Online"), -IDI_USERONLINE },
+ { SKINICON_OTHER_GROUPOPEN, LPGEN("Group (Open)"), -IDI_GROUPOPEN },
+ { SKINICON_OTHER_GROUPSHUT, LPGEN("Group (Closed)"), -IDI_GROUPSHUT },
+ { SKINICON_OTHER_CONNECTING, LPGEN("Connecting"), -IDI_LOAD },
+ { SKINICON_OTHER_ADDCONTACT, LPGEN("Add Contact"), -IDI_ADDCONTACT },
+ { SKINICON_OTHER_USERDETAILS, LPGEN("User Details"), -IDI_USERDETAILS },
+ { SKINICON_OTHER_HISTORY, LPGEN("History"), -IDI_HISTORY },
+ { SKINICON_OTHER_DOWNARROW, LPGEN("Down Arrow"), -IDI_DOWNARROW },
+ { SKINICON_OTHER_FINDUSER, LPGEN("Find User"), -IDI_FINDUSER },
+ { SKINICON_OTHER_OPTIONS, LPGEN("Options"), -IDI_OPTIONS },
+ { SKINICON_OTHER_SENDEMAIL, LPGEN("Send E-mail"), -IDI_SENDEMAIL },
+ { SKINICON_OTHER_DELETE, LPGEN("Delete"), -IDI_DELETE },
+ { SKINICON_OTHER_RENAME, LPGEN("Rename"), -IDI_RENAME },
+ { SKINICON_OTHER_SMS, LPGEN("SMS"), -IDI_SMS },
+ { SKINICON_OTHER_SEARCHALL, LPGEN("Search All"), -IDI_SEARCHALL },
+ { SKINICON_OTHER_TICK, LPGEN("Tick"), -IDI_TICK },
+ { SKINICON_OTHER_NOTICK, LPGEN("No Tick"), -IDI_NOTICK },
+ { SKINICON_OTHER_HELP, LPGEN("Help"), -IDI_HELP },
+ { SKINICON_OTHER_MIRANDAWEB, LPGEN("Miranda Website"), -IDI_MIRANDAWEBSITE },
+ { SKINICON_OTHER_TYPING, LPGEN("Typing"), -IDI_TYPING },
+ { SKINICON_OTHER_SMALLDOT, LPGEN("Small Dot"), -IDI_SMALLDOT },
+ { SKINICON_OTHER_FILLEDBLOB, LPGEN("Filled Blob"), -IDI_FILLEDBLOB },
+ { SKINICON_OTHER_EMPTYBLOB, LPGEN("Empty Blob"), -IDI_EMPTYBLOB },
+ { SKINICON_OTHER_UNICODE, LPGEN("Unicode plugin"), -IDI_UNICODE },
+ { SKINICON_OTHER_ANSI, LPGEN("ANSI plugin"), -IDI_ANSI },
+ { SKINICON_OTHER_LOADED, LPGEN("Running plugin"), -IDI_LOADED },
+ { SKINICON_OTHER_NOTLOADED, LPGEN("Unloaded plugin"), -IDI_NOTLOADED },
+ { SKINICON_OTHER_UNDO, LPGEN("Undo"), -IDI_UNDO },
+ { SKINICON_OTHER_WINDOW, LPGEN("Window"), -IDI_WINDOW },
+ { SKINICON_OTHER_WINDOWS, LPGEN("System"), -IDI_WINDOWS },
+ { SKINICON_OTHER_ACCMGR, LPGEN("Accounts"), -IDI_ACCMGR },
+ { SKINICON_OTHER_SHOWHIDE, LPGEN("ShowHide"), -IDI_SHOWHIDE },
+ { SKINICON_OTHER_EXIT, LPGEN("Exit"), -IDI_EXIT },
+ { SKINICON_OTHER_MAINMENU, LPGEN("Main Menu"), -IDI_MIRANDA },
+ { SKINICON_OTHER_STATUS, LPGEN("Status"), -IDI_ONLINE },
+ { SKINICON_CHAT_JOIN, LPGEN("Join chat"), -IDI_JOINCHAT },
+ { SKINICON_CHAT_LEAVE, LPGEN("Leave chat"), -IDI_LEAVECHAT },
+ { SKINICON_OTHER_GROUP, LPGEN("Move to Group"), -IDI_MOVETOGROUP },
+ { SKINICON_OTHER_ON, LPGEN("On"), -IDI_ON },
+ { SKINICON_OTHER_OFF, LPGEN("Off"), -IDI_OFF },
+ { SKINICON_OTHER_STATUS_LOCKED, LPGEN("Locked status"), -IDI_STATUS_LOCKED, 0, "Status Icons" },
};
HANDLE hMainIcons[SIZEOF(mainIcons)];
static const struct StandardIconDescription statusIcons[] =
{
- { ID_STATUS_OFFLINE, LPGEN("Offline"), -IDI_OFFLINE, 0xFFFFFFFF },
- { ID_STATUS_ONLINE, LPGEN("Online"), -IDI_ONLINE, PF2_ONLINE },
- { ID_STATUS_AWAY, LPGEN("Away"), -IDI_AWAY, PF2_SHORTAWAY },
- { ID_STATUS_NA, LPGEN("NA"), -IDI_NA, PF2_LONGAWAY },
- { ID_STATUS_OCCUPIED, LPGEN("Occupied"), -IDI_OCCUPIED, PF2_LIGHTDND },
- { ID_STATUS_DND, LPGEN("DND"), -IDI_DND, PF2_HEAVYDND },
- { ID_STATUS_FREECHAT, LPGEN("Free for chat"), -IDI_FREE4CHAT, PF2_FREECHAT },
- { ID_STATUS_INVISIBLE, LPGEN("Invisible"), -IDI_INVISIBLE, PF2_INVISIBLE },
- { ID_STATUS_ONTHEPHONE, LPGEN("On the phone"), -IDI_ONTHEPHONE, PF2_ONTHEPHONE },
+ { ID_STATUS_OFFLINE, LPGEN("Offline"), -IDI_OFFLINE, 0xFFFFFFFF },
+ { ID_STATUS_ONLINE, LPGEN("Online"), -IDI_ONLINE, PF2_ONLINE },
+ { ID_STATUS_AWAY, LPGEN("Away"), -IDI_AWAY, PF2_SHORTAWAY },
+ { ID_STATUS_NA, LPGEN("NA"), -IDI_NA, PF2_LONGAWAY },
+ { ID_STATUS_OCCUPIED, LPGEN("Occupied"), -IDI_OCCUPIED, PF2_LIGHTDND },
+ { ID_STATUS_DND, LPGEN("DND"), -IDI_DND, PF2_HEAVYDND },
+ { ID_STATUS_FREECHAT, LPGEN("Free for chat"), -IDI_FREE4CHAT, PF2_FREECHAT },
+ { ID_STATUS_INVISIBLE, LPGEN("Invisible"), -IDI_INVISIBLE, PF2_INVISIBLE },
+ { ID_STATUS_ONTHEPHONE, LPGEN("On the phone"), -IDI_ONTHEPHONE, PF2_ONTHEPHONE },
{ ID_STATUS_OUTTOLUNCH, LPGEN("Out to lunch"), -IDI_OUTTOLUNCH, PF2_OUTTOLUNCH }
};
@@ -114,7 +114,7 @@ const char* protoIconsFmt = LPGEN("%s Icons"); static HICON LoadSmallIconShared(HINSTANCE hInstance, LPCTSTR lpIconName)
{
int cx = GetSystemMetrics(SM_CXSMICON);
- return ( HICON )LoadImage( hInstance, lpIconName, IMAGE_ICON,cx, cx, LR_DEFAULTCOLOR | LR_SHARED );
+ return ( HICON )LoadImage( hInstance, lpIconName, IMAGE_ICON, cx, cx, LR_DEFAULTCOLOR | LR_SHARED );
}
// load small icon (not shared) it IS NEED to be destroyed
@@ -131,11 +131,11 @@ static HICON LoadSmallIcon(HINSTANCE hInstance, LPCTSTR lpIconName) // load small icon from hInstance
HICON LoadIconEx(HINSTANCE hInstance, LPCTSTR lpIconName, BOOL bShared)
{
- HICON hResIcon = bShared ? LoadSmallIcon(hInstance,lpIconName) : LoadSmallIconShared(hInstance,lpIconName);
+ HICON hResIcon = bShared ? LoadSmallIcon(hInstance, lpIconName) : LoadSmallIconShared(hInstance, lpIconName);
if ( !hResIcon ) { //Icon not found in hInstance lets try to load it from core
HINSTANCE hCoreInstance=hMirandaInst;
if ( hCoreInstance != hInstance )
- hResIcon = bShared ? LoadSmallIcon(hCoreInstance,lpIconName) : LoadSmallIconShared(hCoreInstance,lpIconName);
+ hResIcon = bShared ? LoadSmallIcon(hCoreInstance, lpIconName) : LoadSmallIconShared(hCoreInstance, lpIconName);
}
return hResIcon;
}
@@ -152,7 +152,7 @@ int ImageList_AddIcon_IconLibLoaded(HIMAGELIST hIml, int iconId) {
HICON hIcon = LoadSkinIcon( iconId );
int res = ImageList_AddIcon(hIml, hIcon);
- IconLib_ReleaseIcon(hIcon,0);
+ IconLib_ReleaseIcon(hIcon, 0);
return res;
}
@@ -160,7 +160,7 @@ int ImageList_AddIcon_ProtoIconLibLoaded(HIMAGELIST hIml, const char* szProto, i {
HICON hIcon = LoadSkinProtoIcon( szProto, iconId );
int res = ImageList_AddIcon(hIml, hIcon);
- IconLib_ReleaseIcon(hIcon,0);
+ IconLib_ReleaseIcon(hIcon, 0);
return res;
}
@@ -174,8 +174,8 @@ int ImageList_ReplaceIcon_NotShared(HIMAGELIST hIml, int iIndex, HINSTANCE hInst int ImageList_ReplaceIcon_IconLibLoaded(HIMAGELIST hIml, int nIndex, HICON hIcon)
{
- int res = ImageList_ReplaceIcon(hIml,nIndex, hIcon);
- IconLib_ReleaseIcon(hIcon,0);
+ int res = ImageList_ReplaceIcon(hIml, nIndex, hIcon);
+ IconLib_ReleaseIcon(hIcon, 0);
return res;
}
@@ -208,7 +208,7 @@ void Button_SetIcon_IcoLib(HWND hwndDlg, int itemId, int iconId, const char* too void Button_FreeIcon_IcoLib(HWND hwndDlg, int itemId)
{
HICON hIcon = ( HICON )SendDlgItemMessage(hwndDlg, itemId, BM_SETIMAGE, IMAGE_ICON, 0 );
- IconLib_ReleaseIcon(hIcon,0);
+ IconLib_ReleaseIcon(hIcon, 0);
}
//
@@ -220,7 +220,7 @@ HICON LoadSkinProtoIcon( const char* szProto, int status, bool big ) int i, statusIndx = -1;
char iconName[MAX_PATH];
HICON hIcon;
- DWORD caps2 = ( szProto == NULL ) ? ( DWORD )-1 : CallProtoService(szProto,PS_GETCAPS,PFLAGNUM_2,0);
+ DWORD caps2 = ( szProto == NULL ) ? ( DWORD )-1 : CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_2, 0);
if ( status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING+MAX_CONNECT_RETRIES ) {
mir_snprintf( iconName, SIZEOF(iconName), "%s%d", mainIconsFmt, 7 );
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index b629958a0d..d9fb7fbb8e 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -2,7 +2,7 @@ Miranda IM: the free IM client for Microsoft* Windows*
-Copyright 2000-2009 Miranda ICQ/IM project,
+Copyright 2000-2009 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.
@@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
-This program is distributed in the hope that it will be useful,
+This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
@@ -53,7 +53,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM, LPARAM lParam) DBVARIANT dbv;
DWORD dwFlags = ( ssd->cbSize == sizeof(SKINSOUNDDESCEX)) ? ssd->dwFlags : 0;
- soundList=(struct SoundItem*)mir_realloc(soundList,sizeof(struct SoundItem)*(soundCount+1));
+ soundList=(struct SoundItem*)mir_realloc(soundList, sizeof(struct SoundItem)*(soundCount+1));
SoundItem* item = &soundList[soundCount++];
item->name = mir_strdup( ssd->pszName );
item->tempFile = NULL;
@@ -93,7 +93,7 @@ static INT_PTR ServiceSkinAddNewSound(WPARAM, LPARAM lParam) static int SkinPlaySoundDefault(WPARAM wParam, LPARAM lParam)
{
char * pszFile = (char *) lParam;
- if ( pszFile && (DBGetContactSettingByte(NULL,"Skin","UseSound",0) || (int)wParam == 1))
+ if ( pszFile && (DBGetContactSettingByte(NULL, "Skin", "UseSound", 0) || (int)wParam == 1))
PlaySoundA(pszFile, NULL, SND_ASYNC | SND_FILENAME | SND_NOWAIT);
return 0;
@@ -156,7 +156,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
hwndTree = GetDlgItem(hwndDlg, IDC_SOUNDTREE);
- SetWindowLongPtr(hwndTree,GWL_STYLE,GetWindowLongPtr(hwndTree,GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
+ SetWindowLongPtr(hwndTree, GWL_STYLE, GetWindowLongPtr(hwndTree, GWL_STYLE)|TVS_NOHSCROLL|TVS_CHECKBOXES);
SendMessage(hwndDlg, DM_HIDEPANE, 0, 0);
SendMessage(hwndDlg, DM_REBUILD_STREE, 0, 0);
TreeView_SetItemState(hwndTree, 0, TVIS_SELECTED, TVIS_SELECTED);
@@ -188,7 +188,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TreeView_SetItem( hwndTree, &tvis.item );
}
tvis.item.stateMask = TVIS_STATEIMAGEMASK;
- tvis.item.state = INDEXTOSTATEIMAGEMASK(!DBGetContactSettingByte(NULL,"SkinSoundsOff",soundList[i].name,0)?2:1);
+ tvis.item.state = INDEXTOSTATEIMAGEMASK(!DBGetContactSettingByte(NULL, "SkinSoundsOff", soundList[i].name, 0)?2:1);
tvis.item.lParam = i;
tvis.item.pszText = soundList[i].description;
TreeView_InsertItem( hwndTree, &tvis );
@@ -201,7 +201,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if ( tvi.lParam == -1 )
TreeView_SetItemState(hwndTree, tvi.hItem, INDEXTOSTATEIMAGEMASK(0), TVIS_STATEIMAGEMASK);
- tvi.hItem=TreeView_GetNextSibling(hwndTree,tvi.hItem);
+ tvi.hItem=TreeView_GetNextSibling(hwndTree, tvi.hItem);
} }
ShowWindow(hwndTree, SW_SHOW);
@@ -245,8 +245,8 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TVITEM tvi;
HTREEITEM hti;
- ZeroMemory(&tvi,sizeof(tvi));
- ZeroMemory(&hti,sizeof(hti));
+ ZeroMemory(&tvi, sizeof(tvi));
+ ZeroMemory(&hti, sizeof(hti));
hti=TreeView_GetSelection(hwndTree);
if (hti == NULL) break;
tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM|TVIF_TEXT;
@@ -257,7 +257,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM NotifyEventHooks(hPlayEvent, 1, (LPARAM)soundList[tvi.lParam].tempFile);
else {
DBVARIANT dbv;
- if (!DBGetContactSettingString(NULL,"SkinSounds",soundList[tvi.lParam].name,&dbv)) {
+ if (!DBGetContactSettingString(NULL, "SkinSounds", soundList[tvi.lParam].name, &dbv)) {
char szPathFull[MAX_PATH];
pathToAbsolute(dbv.pszVal, szPathFull, NULL);
@@ -272,8 +272,8 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TVITEM tvi;
HTREEITEM hti;
- ZeroMemory(&tvi,sizeof(tvi));
- ZeroMemory(&hti,sizeof(hti));
+ ZeroMemory(&tvi, sizeof(tvi));
+ ZeroMemory(&hti, sizeof(hti));
hti=TreeView_GetSelection(hwndTree);
if (hti == NULL) break;
tvi.mask=TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE|TVIF_PARAM|TVIF_TEXT;
@@ -316,7 +316,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemTextA(hwndDlg, IDC_LOCATION, strFull);
}
if (LOWORD(wParam) == IDC_GETMORE) {
- CallService(MS_UTILS_OPENURL,1,(LPARAM)"http://addons.miranda-im.org/index.php?action=display&id=5");
+ CallService(MS_UTILS_OPENURL, 1, (LPARAM)"http://addons.miranda-im.org/index.php?action=display&id=5");
break;
}
if (LOWORD(wParam) == IDC_LOCATION) {
@@ -334,9 +334,9 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM DBWriteContactSettingByte(NULL, "Skin", "UseSound", (BYTE) IsDlgButtonChecked(hwndDlg, IDC_ENABLESOUNDS));
for ( i=0; i < soundCount; i++ )
if ( soundList[i].tempFile )
- DBWriteContactSettingString(NULL,"SkinSounds",soundList[i].name,soundList[i].tempFile);
+ DBWriteContactSettingString(NULL, "SkinSounds", soundList[i].name, soundList[i].tempFile);
{
- TVITEM tvi,tvic;
+ TVITEM tvi, tvic;
tvi.hItem = TreeView_GetRoot(hwndTree);
while ( tvi.hItem != NULL ) {
tvi.mask = TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
@@ -350,13 +350,13 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM DBCONTACTGETSETTING cgs;
cgs.szModule = "SkinSoundsOff";
cgs.szSetting = soundList[tvic.lParam].name;
- CallService(MS_DB_CONTACT_DELETESETTING,(WPARAM)(HANDLE)NULL,(LPARAM)&cgs);
+ CallService(MS_DB_CONTACT_DELETESETTING, (WPARAM)(HANDLE)NULL, (LPARAM)&cgs);
}
- else DBWriteContactSettingByte(NULL,"SkinSoundsOff",soundList[tvic.lParam].name,1);
- tvic.hItem=TreeView_GetNextSibling(hwndTree,tvic.hItem);
+ else DBWriteContactSettingByte(NULL, "SkinSoundsOff", soundList[tvic.lParam].name, 1);
+ tvic.hItem=TreeView_GetNextSibling(hwndTree, tvic.hItem);
} }
- tvi.hItem=TreeView_GetNextSibling(hwndTree,tvi.hItem);
+ tvi.hItem=TreeView_GetNextSibling(hwndTree, tvi.hItem);
} }
return TRUE;
}
@@ -379,7 +379,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM SetDlgItemText(hwndDlg, IDC_NAMEVAL, buf);
if (soundList[tvi.lParam].tempFile)
SetDlgItemTextA(hwndDlg, IDC_LOCATION, soundList[tvi.lParam].tempFile);
- else if (!DBGetContactSettingString(NULL,"SkinSounds",soundList[tvi.lParam].name,&dbv)) {
+ else if (!DBGetContactSettingString(NULL, "SkinSounds", soundList[tvi.lParam].name, &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_LOCATION, dbv.pszVal);
DBFreeVariant(&dbv);
}
@@ -401,8 +401,8 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TVHITTESTINFO hti;
hti.pt.x=(short)LOWORD(GetMessagePos());
hti.pt.y=(short)HIWORD(GetMessagePos());
- ScreenToClient(((LPNMHDR)lParam)->hwndFrom,&hti.pt);
- if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom,&hti))
+ ScreenToClient(((LPNMHDR)lParam)->hwndFrom, &hti.pt);
+ if (TreeView_HitTest(((LPNMHDR)lParam)->hwndFrom, &hti))
if (hti.flags&TVHT_ONITEM)
if (hti.flags&TVHT_ONITEMSTATEICON)
if (TreeView_GetParent(hwndTree, hti.hItem) != NULL)
@@ -435,7 +435,7 @@ static int SkinOptionsInit(WPARAM wParam, LPARAM) static int SkinSystemModulesLoaded(WPARAM, LPARAM)
{
- HookEvent(ME_OPT_INITIALISE,SkinOptionsInit);
+ HookEvent(ME_OPT_INITIALISE, SkinOptionsInit);
return 0;
}
@@ -445,9 +445,9 @@ int LoadSkinSounds(void) soundList=NULL;
soundCount=0;
- CreateServiceFunction(MS_SKIN_ADDNEWSOUND,ServiceSkinAddNewSound);
- CreateServiceFunction(MS_SKIN_PLAYSOUND,ServiceSkinPlaySound);
- HookEvent(ME_SYSTEM_MODULESLOADED,SkinSystemModulesLoaded);
+ CreateServiceFunction(MS_SKIN_ADDNEWSOUND, ServiceSkinAddNewSound);
+ CreateServiceFunction(MS_SKIN_PLAYSOUND, ServiceSkinPlaySound);
+ HookEvent(ME_SYSTEM_MODULESLOADED, SkinSystemModulesLoaded);
hPlayEvent=CreateHookableEvent(ME_SKIN_PLAYINGSOUND);
SetHookDefaultForHookableEvent(hPlayEvent, SkinPlaySoundDefault);
return 0;
|