From 82b32bb1d683867729cd4fb259d9d1edc3b0039e Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Tue, 29 Jan 2013 20:04:45 +0000 Subject: changed some icons git-svn-id: http://svn.miranda-ng.org/main/trunk@3344 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 61 +++++++++++------------ plugins/Clist_nicer/src/clui.cpp | 6 +-- 2 files changed, 31 insertions(+), 36 deletions(-) (limited to 'plugins/Clist_nicer/src') diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index 477edd5345..8ad09efc9c 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -113,7 +113,7 @@ static HANDLE contMIVisible, contMITitle, contMITBVisible, contMILock, contMICol static HANDLE contMIAlignRoot; static HANDLE contMIAlignTop, contMIAlignClient, contMIAlignBottom; static HANDLE contMIBorder, contMISkinned; -static HANDLE MainMIRoot = (HANDLE) - 1; +static HGENMENU MainMIRoot = (HGENMENU) - 1; // others static int ContactListHeight; @@ -649,7 +649,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.position = popuppos++; mi.pszName = LPGEN("&FrameTitle"); mi.flags = CMIF_CHILDPOPUP | CMIF_GRAYED | CMIF_ICONFROMICOLIB; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMITitle = menuid; else Frames[framepos].MenuHandles.MITitle = menuid; @@ -662,7 +662,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.position = popuppos++; mi.pszName = LPGEN("&Visible"); mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; mi.pszService = MS_CLIST_FRAMES_SHFRAME; menuid = pfnAdd(&mi); if (frameid == -1) contMIVisible = menuid; @@ -674,7 +674,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.pszName = LPGEN("&Show TitleBar"); mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMITBVisible = menuid; else Frames[framepos].MenuHandles.MITBVisible = menuid; @@ -688,7 +688,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.pszName = LPGEN("&Locked"); mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_ULFRAME; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMILock = menuid; else Frames[framepos].MenuHandles.MILock = menuid; @@ -699,7 +699,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.pszName = LPGEN("&Collapsed"); mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMIColl = menuid; else Frames[framepos].MenuHandles.MIColl = menuid; @@ -711,7 +711,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.pszName = LPGEN("&Floating Mode"); mi.flags = CMIF_CHILDPOPUP; mi.pszService = "Set_Floating"; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMIFloating = menuid; else Frames[framepos].MenuHandles.MIFloating = menuid; @@ -725,7 +725,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.pszName = LPGEN("&Border"); mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SETUNBORDER; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMIBorder = menuid; else Frames[framepos].MenuHandles.MIBorder = menuid; @@ -738,7 +738,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU mi.pszName = LPGEN("&Skinned frame"); mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED; mi.pszService = MS_CLIST_FRAMES_SETSKINNED; - mi.pszContactOwner = (char *)0; + mi.pszContactOwner = 0; menuid = pfnAdd(&mi); if (frameid == -1) contMISkinned = menuid; else Frames[framepos].MenuHandles.MISkinned = menuid; @@ -1593,14 +1593,14 @@ static int CLUIFramesLoadMainMenu() if (MainMIRoot != (HANDLE) - 1) { CallService(MS_CLIST_REMOVEMAINMENUITEM, (WPARAM)MainMIRoot, 0); - MainMIRoot = (HANDLE) - 1; + MainMIRoot = (HGENMENU) - 1; } // create root menu CLISTMENUITEM mi = { sizeof(mi) }; - mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA); //LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_MIRANDA)); - mi.flags = CMIF_ROOTPOPUP | CMIF_ICONFROMICOLIB; - mi.position = (int)3000090000; + mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_FRAME); + mi.flags = CMIF_ROOTHANDLE | CMIF_ICONFROMICOLIB; + mi.position = 3000090000; mi.pszPopupName = (char*) - 1; mi.pszName = LPGEN("Frames"); mi.pszService = 0; @@ -1610,9 +1610,9 @@ static int CLUIFramesLoadMainMenu() int separator = (int)3000200000; for (int i=0; i < nFramescount; i++) { mi.hIcon = Frames[i].TitleBar.hicon; - mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP | CMIF_TCHAR; + mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR; mi.position = separator; - mi.pszPopupName = (char*)MainMIRoot; + mi.hParentMenu = MainMIRoot; mi.ptszName = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name; mi.pszService = 0; Frames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi); @@ -1627,9 +1627,9 @@ static int CLUIFramesLoadMainMenu() // create "show all frames" menu mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_MIRANDA)); - mi.flags = CMIF_CHILDPOPUP; + mi.flags = CMIF_ROOTHANDLE; mi.position = separator++; - mi.pszPopupName = (char*)MainMIRoot; + mi.hParentMenu = MainMIRoot; mi.pszName = LPGEN("Show All Frames"); mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES; Menu_AddMainMenuItem(&mi); @@ -1637,7 +1637,7 @@ static int CLUIFramesLoadMainMenu() // create "show all titlebars" menu mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_HELP)); mi.position = separator++; - mi.pszPopupName = (char*)MainMIRoot; + mi.hParentMenu = MainMIRoot; mi.flags = CMIF_CHILDPOPUP; mi.pszName = LPGEN("Show All Titlebars"); mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB; @@ -1646,7 +1646,7 @@ static int CLUIFramesLoadMainMenu() // create "hide all titlebars" menu mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_HELP)); mi.position = separator++; - mi.pszPopupName = (char*)MainMIRoot; + mi.hParentMenu = MainMIRoot; mi.flags = CMIF_CHILDPOPUP; mi.pszName = LPGEN("Hide All Titlebars"); mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB; @@ -1658,31 +1658,26 @@ static int CLUIFramesLoadMainMenu() static HFONT CLUILoadTitleBarFont() { char facename[] = "MS Shell Dlg"; - HFONT hfont; LOGFONT logfont; memset(&logfont, 0, sizeof(logfont)); memcpy(logfont.lfFaceName, facename, sizeof(facename)); logfont.lfWeight = FW_NORMAL; logfont.lfHeight = -10; - hfont = CreateFontIndirect(&logfont); - return hfont; + return CreateFontIndirect(&logfont); } static int UpdateTBToolTip(int framepos) { - { - TOOLINFO ti; + TOOLINFO ti; - ZeroMemory(&ti, sizeof(ti)); - ti.cbSize = sizeof(ti); - ti.lpszText = Frames[framepos].TitleBar.tooltip; - ti.hinst = g_hInst; - ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS ; - ti.uId = (UINT_PTR)Frames[framepos].TitleBar.hwnd; - - return(SendMessage(Frames[framepos].TitleBar.hwndTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti)); - } + ZeroMemory(&ti, sizeof(ti)); + ti.cbSize = sizeof(ti); + ti.lpszText = Frames[framepos].TitleBar.tooltip; + ti.hinst = g_hInst; + ti.uFlags = TTF_IDISHWND | TTF_SUBCLASS ; + ti.uId = (UINT_PTR)Frames[framepos].TitleBar.hwnd; + return SendMessage(Frames[framepos].TitleBar.hwndTip, TTM_UPDATETIPTEXT, 0, (LPARAM)&ti); }; int FrameNCPaint(HWND hwnd, WNDPROC oldWndProc, WPARAM wParam, LPARAM lParam, BOOL hasTitleBar) diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index b5a5924a24..7a5ff0a196 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -322,16 +322,16 @@ void CreateButtonBar(HWND hWnd) hTbMenu = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU) IDC_TBMENU, g_hInst, NULL); CustomizeButton(hTbMenu, false, false, false); SetWindowText(hTbMenu, TranslateT("Menu")); - SendMessage(hTbMenu, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadSkinnedIcon(SKINICON_OTHER_MIRANDA)); + SendMessage(hTbMenu, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadSkinnedIcon(SKINICON_OTHER_MAINMENU)); SendMessage(hTbMenu, BUTTONSETASMENUACTION, 1, 0); - SendMessage(hTbMenu, BUTTONADDTOOLTIP, (WPARAM) TranslateTS(LPGENT("Open main menu")), BATF_UNICODE); + SendMessage(hTbMenu, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Open main menu"), BATF_TCHAR); hTbGlobalStatus = CreateWindowEx(0, MIRANDABUTTONCLASS, _T(""), BS_PUSHBUTTON | WS_CHILD | WS_TABSTOP, 0, 0, 20, 20, hWnd, (HMENU) IDC_TBGLOBALSTATUS, g_hInst, NULL); CustomizeButton(hTbGlobalStatus, false, false, false); SetWindowText(hTbGlobalStatus, TranslateT("Offline")); SendMessage(hTbGlobalStatus, BM_SETIMAGE, IMAGE_ICON, (LPARAM) LoadSkinnedIcon(SKINICON_STATUS_OFFLINE)); SendMessage(hTbGlobalStatus, BUTTONSETASMENUACTION, 1, 0); - SendMessage(hTbGlobalStatus, BUTTONADDTOOLTIP, (WPARAM) TranslateTS(LPGENT("Set status modes")), BATF_UNICODE); + SendMessage(hTbGlobalStatus, BUTTONADDTOOLTIP, (WPARAM) TranslateT("Set status modes"), BATF_TCHAR); } /* -- cgit v1.2.3