summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-05-27 16:02:03 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-05-27 16:02:03 +0000
commit5aa0cf558c03063209f60b25f0930c507d9c0faf (patch)
tree76ad8137693053ab046ab2e0ef9beae6cf903b33 /plugins
parentbe8c5e916f1719875ebd96580c0f46666b3e2ee5 (diff)
clist_nicer:
-translation fixes -warning fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@9323 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_nicer/src/clui.cpp20
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp58
2 files changed, 42 insertions, 36 deletions
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp
index 3514d9b00a..099613673d 100644
--- a/plugins/Clist_nicer/src/clui.cpp
+++ b/plugins/Clist_nicer/src/clui.cpp
@@ -220,7 +220,7 @@ static int CreateCLC(HWND parent)
return 0;
}
-static int CluiModulesLoaded(WPARAM wParam, LPARAM lParam)
+static int CluiModulesLoaded(WPARAM, LPARAM)
{
FS_RegisterFonts();
HookEvent(ME_FONT_RELOAD, FS_FontsChanged);
@@ -253,13 +253,13 @@ static void CacheClientIcons()
static void InitIcoLib()
{
- Icon_Register(g_hInst, LPGEN("Contact list/Default"), myIcons, SIZEOF(myIcons));
+ Icon_Register(g_hInst, LPGEN("Contact list")"/"LPGEN("Default"), myIcons, SIZEOF(myIcons));
for (int i = IDI_OVL_OFFLINE; i <= IDI_OVL_OUTTOLUNCH; i++) {
char szBuffer[128];
mir_snprintf(szBuffer, sizeof(szBuffer), "cln_ovl_%d", ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE));
IconItemT icon = { pcli->pfnGetStatusModeDescription(ID_STATUS_OFFLINE + (i - IDI_OVL_OFFLINE), GSMDF_TCHAR), szBuffer, i };
- Icon_RegisterT(g_hInst, LPGENT("Contact list/Overlay icons"), &icon, 1);
+ Icon_RegisterT(g_hInst, LPGENT("Contact list")_T("/")LPGENT("Overlay icons"), &icon, 1);
}
PROTOACCOUNT **accs = NULL;
@@ -272,11 +272,11 @@ static void InitIcoLib()
TCHAR szDescr[128];
mir_sntprintf(szDescr, SIZEOF(szDescr), TranslateT("%s connecting"), accs[k]->tszAccountName);
IconItemT icon = { szDescr, "conn", IDI_PROTOCONNECTING };
- Icon_RegisterT(g_hInst, LPGENT("Contact list/Connecting icons"), &icon, 1, accs[k]->szModuleName);
+ Icon_RegisterT(g_hInst, LPGENT("Contact list")_T("/")LPGENT("Connecting icons"), &icon, 1, accs[k]->szModuleName);
}
}
-static int IcoLibChanged(WPARAM wParam, LPARAM lParam)
+static int IcoLibChanged(WPARAM, LPARAM)
{
IcoLibReloadIcons();
return 0;
@@ -289,14 +289,14 @@ void CreateButtonBar(HWND hWnd)
SetWindowText(hTbMenu, TranslateT("Menu"));
SendMessage(hTbMenu, BM_SETIMAGE, IMAGE_ICON, (LPARAM)LoadSkinnedIcon(SKINICON_OTHER_MAINMENU));
SendMessage(hTbMenu, BUTTONSETSENDONDOWN, TRUE, 0);
- SendMessage(hTbMenu, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Open main menu"), BATF_TCHAR);
+ SendMessage(hTbMenu, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Open main menu"), 0);
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, BUTTONSETSENDONDOWN, TRUE, 0);
- SendMessage(hTbGlobalStatus, BUTTONADDTOOLTIP, (WPARAM)TranslateT("Set status modes"), BATF_TCHAR);
+ SendMessage(hTbGlobalStatus, BUTTONADDTOOLTIP, (WPARAM)LPGEN("Set status modes"), 0);
}
// if mode != 0 we do first time init, otherwise only reload the extra icon stuff
@@ -479,7 +479,6 @@ void BlitWallpaper(HDC hdc, RECT *rc, RECT *rcPaint, struct ClcData *dat)
int maxx, maxy;
int destw, desth, height, width;
BITMAP *bmp = &cfg::dat.bminfoBg;
- HRGN my_rgn = 0;
LONG clip = cfg::dat.bClipBorder;
if (dat == 0)
@@ -496,7 +495,7 @@ void BlitWallpaper(HDC hdc, RECT *rc, RECT *rcPaint, struct ClcData *dat)
width = rc->right - rc->left;
height = rc->bottom - rc->top;
- my_rgn = CreateRectRgn(rc->left, rc->top, rc->right, rc->bottom);
+ HRGN my_rgn = CreateRectRgn(rc->left, rc->top, rc->right, rc->bottom);
SelectClipRgn(hdc, my_rgn);
maxx = dat->backgroundBmpUse & CLBF_TILEH ? rc->right : rc->left + 1;
maxy = dat->backgroundBmpUse & CLBF_TILEV ? maxy = rc->bottom : y + 1;
@@ -778,7 +777,6 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
{
switch (msg) {
case WM_CREATE:
- int i;
{
int flags = WS_CHILD | CCS_BOTTOM;
flags |= cfg::getByte("CLUI", "ShowSBar", 1) ? WS_VISIBLE : 0;
@@ -801,7 +799,7 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l
ConfigureCLUIGeometry(0);
CluiProtocolStatusChanged(0, 0);
- for (i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
+ for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
statusNames[i-ID_STATUS_OFFLINE] = pcli->pfnGetStatusModeDescription(i, 0);
//delay creation of CLC so that it can get the status icons right the first time (needs protocol modules loaded)
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index 908eab71b6..d623f56707 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -333,43 +333,51 @@ void LoadExtBkSettingsFromDB()
}
// writes whole struct to the database
-static void SaveCompleteStructToDB(void)
-{
- char buffer[255];
-
+static void SaveCompleteStructToDB() {
for (int n = 0; n < arStatusItems.getCount(); n++) {
StatusItems_t *p = arStatusItems[n];
- char *pszEnd = buffer + mir_snprintf(buffer, SIZEOF(buffer), "%s_", p->szDBname);
- if (p->statusID == ID_EXTBKSEPARATOR)
- continue;
-
- strcpy(pszEnd, "IGNORE"); cfg::writeByte("CLCExt", buffer, p->IGNORED);
- strcpy(pszEnd, "GRADIENT"); cfg::writeDword("CLCExt", buffer, p->GRADIENT);
- strcpy(pszEnd, "CORNER"); cfg::writeDword("CLCExt", buffer, p->CORNER);
- strcpy(pszEnd, "COLOR"); cfg::writeDword("CLCExt", buffer, p->COLOR);
- strcpy(pszEnd, "COLOR2"); cfg::writeDword("CLCExt", buffer, p->COLOR2);
- strcpy(pszEnd, "COLOR2_TRANSPARENT"); cfg::writeByte("CLCExt", buffer, p->COLOR2_TRANSPARENT);
- strcpy(pszEnd, "TEXTCOLOR"); cfg::writeDword("CLCExt", buffer, p->TEXTCOLOR);
- strcpy(pszEnd, "ALPHA"); cfg::writeByte("CLCExt", buffer, (BYTE)p->ALPHA);
- strcpy(pszEnd, "MRGN_LEFT"); cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_LEFT);
- strcpy(pszEnd, "MRGN_TOP"); cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_TOP);
- strcpy(pszEnd, "MRGN_RIGHT"); cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_RIGHT);
- strcpy(pszEnd, "MRGN_BOTTOM"); cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_BOTTOM);
- strcpy(pszEnd, "BDRSTYLE"); cfg::writeDword("CLCExt", buffer, p->BORDERSTYLE);
+ if (p->statusID != ID_EXTBKSEPARATOR) {
+ char buffer[255];
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_IGNORE", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, p->IGNORED);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_GRADIENT", p->szDBname);
+ cfg::writeDword("CLCExt", buffer, p->GRADIENT);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_CORNER", p->szDBname);
+ cfg::writeDword("CLCExt", buffer, p->CORNER);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_COLOR", p->szDBname);
+ cfg::writeDword("CLCExt", buffer, p->COLOR);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_COLOR2", p->szDBname);
+ cfg::writeDword("CLCExt", buffer, p->COLOR2);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_COLOR2_TRANSPARENT", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, p->COLOR2_TRANSPARENT);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_TEXTCOLOR", p->szDBname);
+ cfg::writeDword("CLCExt", buffer, p->TEXTCOLOR);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_ALPHA", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, (BYTE)p->ALPHA);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_MRGN_LEFT", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_LEFT);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_MRGN_TOP", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_TOP);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_MRGN_RIGHT", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_RIGHT);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_MRGN_BOTTOM", p->szDBname);
+ cfg::writeByte("CLCExt", buffer, (BYTE)p->MARGIN_BOTTOM);
+ mir_snprintf(buffer, SIZEOF(buffer), "%s_BDRSTYLE", p->szDBname);
+ cfg::writeDword("CLCExt", buffer, p->BORDERSTYLE);
+ }
}
}
void SetButtonToSkinned()
{
bool bSkinned = (cfg::dat.bSkinnedButtonMode = cfg::getByte("CLCExt", "bskinned", 0)) != 0;
- bool bFlat = bSkinned ? true : cfg::getByte("TopToolBar", "UseFlatButton", 0);
+ bool bFlat = bSkinned || (cfg::getByte("TopToolBar", "UseFlatButton", 0) != 0);
for (int i = 0; ; i++) {
if (BTNS[i].pszButtonID == NULL)
break;
- if (BTNS[i].hwndButton == 0 || BTNS[i].ctrlid == IDC_TBGLOBALSTATUS || BTNS[i].ctrlid == IDC_TBMENU)
- continue;
- CustomizeButton(BTNS[i].hwndButton, bSkinned, !bSkinned, bFlat, true);
+ if (BTNS[i].hwndButton != 0 && BTNS[i].ctrlid != IDC_TBGLOBALSTATUS && BTNS[i].ctrlid != IDC_TBMENU)
+ CustomizeButton(BTNS[i].hwndButton, bSkinned, !bSkinned, bFlat, true);
}
CustomizeButton(GetDlgItem(pcli->hwndContactList, IDC_TBMENU), bSkinned, !bSkinned, bSkinned);