diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-18 18:02:47 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-05-18 18:02:47 +0000 |
commit | fc02c04506fee6ae6412cff63a6b7536da0a7c00 (patch) | |
tree | 746c3bb48504dfdeb0aebf3e7c80f681f01374fa /plugins/TipperYM/options.cpp | |
parent | 0ade2615265006e4ab8f701425f66c0e7653aabb (diff) |
tipper my patch
git-svn-id: http://svn.miranda-ng.org/main/trunk@50 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/options.cpp')
-rw-r--r-- | plugins/TipperYM/options.cpp | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/plugins/TipperYM/options.cpp b/plugins/TipperYM/options.cpp index 5c6e8e049e..597f0eb76b 100644 --- a/plugins/TipperYM/options.cpp +++ b/plugins/TipperYM/options.cpp @@ -336,9 +336,9 @@ void LoadObsoleteSkinSetting() mir_snprintf(setting, 128, "SPaintMode%d", i);
opt.transfMode[i] = (TransformationMode)DBGetContactSettingByte(0, MODULE, setting, 0);
mir_snprintf(setting, 128, "SImgFile%d", i);
- if (!DBGetContactSettingString(NULL, MODULE, setting, &dbv))
+ if (!DBGetContactSettingTString(NULL, MODULE, setting, &dbv))
{
- opt.szImgFile[i] = mir_strdup(dbv.pszVal);
+ opt.szImgFile[i] = mir_tstrdup(dbv.ptszVal);
DBFreeVariant(&dbv);
}
@@ -564,9 +564,9 @@ void LoadOptions() }
else if (opt.skinMode == SM_IMAGE)
{
- if (!DBGetContactSettingString(NULL, MODULE, "SkinName", &dbv))
+ if (!DBGetContactSettingTString(NULL, MODULE, "SkinName", &dbv))
{
- strcpy(opt.szSkinName, dbv.pszVal);
+ _tcscpy(opt.szSkinName, dbv.ptszVal);
DBFreeVariant(&dbv);
}
}
@@ -1998,11 +1998,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l {
TCHAR swzSkinName[256];
if (ListBox_GetText(hwndList, iSel, swzSkinName) > 0)
- {
- char *skin = mir_t2a(swzSkinName);
- ParseSkinFile(skin, false, true);
- mir_free(skin);
- }
+ ParseSkinFile(swzSkinName, false, true);
EnableControls(hwndDlg, TRUE);
if (opt.iEnableColoring != -1)
CheckDlgButton(hwndDlg, IDC_CHK_ENABLECOLORING, opt.iEnableColoring ? 1 : 0);
@@ -2031,11 +2027,9 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
else if (iSel != LB_ERR)
{
- TCHAR swzSkinName[256];
- if (ListBox_GetText(GetDlgItem(hwndDlg, IDC_LB_SKINS), iSel, swzSkinName) > 0)
+ if (ListBox_GetText(GetDlgItem(hwndDlg, IDC_LB_SKINS), iSel, opt.szSkinName) > 0)
{
opt.skinMode = SM_IMAGE;
- t2a(swzSkinName, opt.szSkinName, sizeof(opt.szSkinName));
ParseSkinFile(opt.szSkinName, false, false);
ReloadFont(0, 0);
SaveOptions();
@@ -2043,7 +2037,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l }
DBWriteContactSettingByte(0, MODULE, "SkinEngine", opt.skinMode);
- DBWriteContactSettingString(0, MODULE, "SkinName", opt.szSkinName);
+ DBWriteContactSettingTString(0, MODULE, "SkinName", opt.szSkinName);
DestroySkinBitmap();
SetDlgItemInt(hwndDlg, IDC_ED_TRANS, opt.iOpacity, FALSE);
@@ -2439,9 +2433,8 @@ int OptInit(WPARAM wParam, LPARAM lParam) CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_SKIN);
- odp.ptszTab = LPGENT("Tooltip skin");
- odp.ptszTitle = LPGENT("Tooltips");
- odp.ptszGroup = LPGENT("Customize");
+ odp.ptszTab = LPGENT("Tooltips");
+ odp.ptszGroup = LPGENT("Skins");
odp.nIDBottomSimpleControl = 0;
odp.pfnDlgProc = DlgProcOptsSkin;
CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
|