summaryrefslogtreecommitdiff
path: root/src/modules/skin/skinicons.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-14 15:51:34 +0000
commite58823d961a630eb62e60d2ccb443761ba5f1704 (patch)
tree62d071be480d57af2a53f154a1468abe0b9449ff /src/modules/skin/skinicons.cpp
parent721aea0764451e985d575236205808bbef298244 (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/skinicons.cpp')
-rw-r--r--src/modules/skin/skinicons.cpp130
1 files changed, 65 insertions, 65 deletions
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 );