diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 21:20:14 +0000 |
commit | d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch) | |
tree | a6f925c63bc31e4b4dba301183cc3b429d52d816 /plugins/Popup/src | |
parent | ce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff) |
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src')
-rw-r--r-- | plugins/Popup/src/actions.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/bitmap_funcs.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/formula.h | 4 | ||||
-rw-r--r-- | plugins/Popup/src/notifications.cpp | 14 | ||||
-rw-r--r-- | plugins/Popup/src/opt_adv.cpp | 2 | ||||
-rw-r--r-- | plugins/Popup/src/opt_skins.cpp | 6 | ||||
-rw-r--r-- | plugins/Popup/src/opttree.cpp | 6 | ||||
-rw-r--r-- | plugins/Popup/src/skin.cpp | 72 | ||||
-rw-r--r-- | plugins/Popup/src/srmm_menu.cpp | 2 |
9 files changed, 55 insertions, 55 deletions
diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index db3e581b59..9bd52deea2 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int ActionsSortFunc(const POPUPACTION *p1, const POPUPACTION *p2)
{
- return lstrcmpA(p1->lpzTitle, p2->lpzTitle);
+ return mir_strcmp(p1->lpzTitle, p2->lpzTitle);
}
static LIST<POPUPACTION> gActions(3, ActionsSortFunc);
diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 821aa10017..fe3a281f32 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -833,7 +833,7 @@ bool MyBitmap::loadFromFile(const TCHAR *fn, const TCHAR *fnAlpha) TCHAR ext[5];
_tcsncpy_s(ext, fn + (_tcslen(fn) - 4), _TRUNCATE);
- if (!lstrcmpi(ext, _T(".png")))
+ if (!mir_tstrcmpi(ext, _T(".png")))
return loadFromFile_png(fn, fnAlpha);
return loadFromFile_default(fn, fnAlpha);
diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h index 7115b25dad..67cea481c9 100644 --- a/plugins/Popup/src/formula.h +++ b/plugins/Popup/src/formula.h @@ -46,7 +46,7 @@ public: void add(char *name, int value)
{
for (Item *p = items; p; p = p->next)
- if (!lstrcmpA(p->name,name))
+ if (!mir_strcmp(p->name,name))
{
p->value = value;
return;
@@ -56,7 +56,7 @@ public: int get(char *name)
{
for (Item *p = items; p; p = p->next)
- if (!lstrcmpA(p->name,name))
+ if (!mir_strcmp(p->name,name))
return p->value;
return 0;
}
diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 57fbf18b62..7223a22100 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -30,9 +30,9 @@ HANDLE g_hntfError, g_hntfWarning, g_hntfNotification; int TreeDataSortFunc(const POPUPTREEDATA *p1, const POPUPTREEDATA *p2)
{
- if (int cmp = lstrcmp(p1->pszTreeRoot, p2->pszTreeRoot))
+ if (int cmp = mir_tstrcmp(p1->pszTreeRoot, p2->pszTreeRoot))
return cmp;
- return lstrcmp(p1->pszDescription, p2->pszDescription);
+ return mir_tstrcmp(p1->pszDescription, p2->pszDescription);
}
@@ -126,10 +126,10 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul) for (int i=0; i < ptd->notification.actionCount; ++i) {
POPUPNOTIFYACTION &p = ptd->notification.lpActions[i];
- if (!lstrcmpA(ptd->leftAction, p.lpzTitle))
+ if (!mir_strcmp(ptd->leftAction, p.lpzTitle))
db_set(NULL, p.lpzLModule, p.lpzLSetting, &p.dbvLData);
- if (!lstrcmpA(ptd->rightAction, p.lpzTitle))
+ if (!mir_strcmp(ptd->rightAction, p.lpzTitle))
db_set(NULL, p.lpzRModule, p.lpzRSetting, &p.dbvRData);
}
}
@@ -309,10 +309,10 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, return false;
}
- if (!lstrcmpA(lpzAction, POPUP_ACTION_NOTHING))
+ if (!mir_strcmp(lpzAction, POPUP_ACTION_NOTHING))
return true;
- if (!lstrcmpA(lpzAction, POPUP_ACTION_DISMISS))
+ if (!mir_strcmp(lpzAction, POPUP_ACTION_DISMISS))
{
PUDeletePopup(hwnd);
return true;
@@ -322,7 +322,7 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, {
if (!(ptd->notification.lpActions[i].dwFlags&PNAF_CALLBACK))
continue;
- if (lstrcmpA(ptd->notification.lpActions[i].lpzTitle, lpzAction))
+ if (mir_strcmp(ptd->notification.lpActions[i].lpzTitle, lpzAction))
continue;
ptd->notification.lpActions[i].pfnCallback(hwnd, message, wparam, lparam,
diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 3f0834d28e..40728b454f 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -213,7 +213,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) {
dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i]));
ComboBox_SetItemData(hCtrl, dwItem, i);
- if (PopupOptions.UseEffect && !lstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
+ if (PopupOptions.UseEffect && !mir_tstrcmp(g_lstPopupVfx[i], PopupOptions.Effect))
dwActiveItem = dwItem;
}
SendDlgItemMessage(hwnd, IDC_EFFECT, CB_SETCURSEL, dwActiveItem, 0);
diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 7b441978ed..ce95fadc2c 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -315,13 +315,13 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int index = -1;
OptTree_ProcessMessage(hwndDlg, msg, wParam, lParam, &index, IDC_SKIN_LIST_OPT, skinOptions, skinOptionsCount);
if (index != -1) {
- if (lstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
+ if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) {
const PopupSkin *skin = 0;
if (skin = skins.getSkin(PopupOptions.SkinPack)) {
skin->setFlag(skinOptions[index].Data, skinOptions[index].bState ? true : false);
}
}
- else if (lstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
+ else if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) {
switch (skinOptions[index].dwFlag) {
case (1 << 0):
PopupOptions.DisplayTime = skinOptions[index].bState;
@@ -421,7 +421,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack));
//make shure we have select skin (ListBox_SetCurSel may be fail)
ListBox_GetText(hCtrl, ListBox_GetCurSel(hCtrl), &szNewSkin);
- if (lstrcmp(pszOldSkin, szNewSkin) != 0) {
+ if (mir_tstrcmp(pszOldSkin, szNewSkin) != 0) {
mir_free(PopupOptions.SkinPack);
PopupOptions.SkinPack = mir_tstrdup(szNewSkin);
}
diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index c7729d199d..515e13256e 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -85,7 +85,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHA while (tvi.hItem) {
TreeView_GetItem(hwndTree, &tvi);
- if (!lstrcmp(tvi.pszText, name))
+ if (!mir_tstrcmp(tvi.pszText, name))
return tvi.hItem;
tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem);
@@ -324,7 +324,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op int i;
for (i = 0; i < optionCount; ++i) {
if ((!options[i].pszSettingName && !pszSettingName) ||
- (options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName)))
+ (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName)))
{
TVITEM tvi = {0};
tvi.mask = TVIF_HANDLE | TVIF_IMAGE;
@@ -342,7 +342,7 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt HWND hwndTree = GetDlgItem(hwnd, idcTree);
for (int i = 0; i < optionCount; ++i) {
if ((!options[i].pszSettingName && !pszSettingName) ||
- (options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName)))
+ (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName)))
{
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index c33a3f96a0..444c539c95 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -750,7 +750,7 @@ void PopupSkin::loadOptions(std::wistream &f) f.ignore(1024, '\n');
continue;
}
- if (!lstrcmp(buf, _T("option"))) {
+ if (!mir_tstrcmp(buf, _T("option"))) {
int id, val;
f >> id >> val;
f.getline(buf, 1024);
@@ -769,7 +769,7 @@ void PopupSkin::loadOptions(std::wistream &f) else
m_flags &= ~(1 << id);
}
- else if (!lstrcmp(buf, _T("end")))
+ else if (!mir_tstrcmp(buf, _T("end")))
break;
}
delete[] buf;
@@ -842,40 +842,40 @@ void PopupSkin::loadSkin(std::wistream &f) continue;
}
- if (!lstrcmp(buf, _T("popup-version"))) {
+ if (!mir_tstrcmp(buf, _T("popup-version"))) {
f >> m_popup_version;
m_popup_version = PLUGIN_MAKE_VERSION((m_popup_version / 1000000) % 100, (m_popup_version / 10000) % 100, (m_popup_version / 100) % 100, (m_popup_version / 1) % 100);
if (!isCompatible())
break;
}
- else if (!lstrcmp(buf, _T("padding-right"))) {
+ else if (!mir_tstrcmp(buf, _T("padding-right"))) {
f >> m_right_gap;
}
- else if (!lstrcmp(buf, _T("padding-bottom"))) {
+ else if (!mir_tstrcmp(buf, _T("padding-bottom"))) {
f >> m_bottom_gap;
}
- else if (!lstrcmp(buf, _T("shadow-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, _T("shadow-region-opacity"))) {
f >> m_shadow_region_opacity;
}
- else if (!lstrcmp(buf, _T("legacy-region-opacity"))) {
+ else if (!mir_tstrcmp(buf, _T("legacy-region-opacity"))) {
f >> m_legacy_region_opacity;
}
- else if (!lstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, _T("w"))) {
f.getline(buf, 1024);
m_fw.set(buf);
}
- else if (!lstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, _T("h"))) {
f.getline(buf, 1024);
m_fh.set(buf);
}
- else if (!lstrcmp(buf, _T("object"))) {
+ else if (!mir_tstrcmp(buf, _T("object"))) {
head->next = loadObject(f);
if (head->next && ((head->next->type & ST_TYPEMASK) == ST_CLOCK))
m_internalClock = false;
head = head->next;
head->next = NULL;
}
- else if (!lstrcmp(buf, _T("options"))) {
+ else if (!mir_tstrcmp(buf, _T("options"))) {
loadOptions(f);
}
}
@@ -930,32 +930,32 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) continue;
}
- if (!lstrcmp(buf, _T("type"))) {
+ if (!mir_tstrcmp(buf, _T("type"))) {
f >> buf;
- if (!lstrcmp(buf, _T("icon")))
+ if (!mir_tstrcmp(buf, _T("icon")))
element->type = (element->type & ~ST_TYPEMASK) | ST_ICON;
- else if (!lstrcmp(buf, _T("bitmap")))
+ else if (!mir_tstrcmp(buf, _T("bitmap")))
element->type = (element->type & ~ST_TYPEMASK) | ST_MYBITMAP;
- else if (!lstrcmp(buf, _T("text"))) {
+ else if (!mir_tstrcmp(buf, _T("text"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TEXT;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!lstrcmp(buf, _T("title"))) {
+ else if (!mir_tstrcmp(buf, _T("title"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_TITLE;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
- else if (!lstrcmp(buf, _T("avatar"))) {
+ else if (!mir_tstrcmp(buf, _T("avatar"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_AVATAR;
}
- else if (!lstrcmp(buf, _T("clock"))) {
+ else if (!mir_tstrcmp(buf, _T("clock"))) {
element->type = (element->type & ~ST_TYPEMASK) | ST_CLOCK;
element->textColor = (COLORREF)0xffffffff;
element->hfn = 0;
}
}
- else if (!lstrcmp(buf, _T("source"))) {
+ else if (!mir_tstrcmp(buf, _T("source"))) {
f >> buf;
if (((element->type & ST_TYPEMASK) == ST_MYBITMAP) || ((element->type & ST_TYPEMASK) == ST_CLOCK)) {
TCHAR *alpha = mir_tstrdup(buf);
@@ -964,46 +964,46 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) mir_free(alpha);
}
}
- else if (!lstrcmp(buf, _T("mono"))) {
+ else if (!mir_tstrcmp(buf, _T("mono"))) {
element->type |= ST_MONO;
}
- else if (!lstrcmp(buf, _T("layer"))) {
+ else if (!mir_tstrcmp(buf, _T("layer"))) {
element->type |= ST_BLEND;
}
- else if (!lstrcmp(buf, _T("proportional"))) {
+ else if (!mir_tstrcmp(buf, _T("proportional"))) {
f >> element->proportional;
}
- else if (!lstrcmp(buf, _T("x"))) {
+ else if (!mir_tstrcmp(buf, _T("x"))) {
f.getline(buf, 1024);
element->fx.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!lstrcmp(buf, _T("y"))) {
+ else if (!mir_tstrcmp(buf, _T("y"))) {
f.getline(buf, 1024);
element->fy.set(buf);
element->type &= ~ST_BADPOS;
}
- else if (!lstrcmp(buf, _T("w"))) {
+ else if (!mir_tstrcmp(buf, _T("w"))) {
f.getline(buf, 1024);
element->fw.set(buf);
}
- else if (!lstrcmp(buf, _T("h"))) {
+ else if (!mir_tstrcmp(buf, _T("h"))) {
f.getline(buf, 1024);
element->fh.set(buf);
}
- else if (!lstrcmp(buf, _T("ifset"))) {
+ else if (!mir_tstrcmp(buf, _T("ifset"))) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags |= 1 << id;
}
- else if (!lstrcmp(buf, _T("ifnotset"))) {
+ else if (!mir_tstrcmp(buf, _T("ifnotset"))) {
int id;
f >> id; id--;
element->flag_mask |= 1 << id;
element->flags &= ~(1 << id);
}
- else if (!lstrcmp(buf, _T("color"))) {
+ else if (!mir_tstrcmp(buf, _T("color"))) {
if (((element->type & ST_TYPEMASK) != ST_TEXT) &&
((element->type & ST_TYPEMASK) != ST_TITLE) &&
((element->type & ST_TYPEMASK) != ST_CLOCK)) continue;
@@ -1012,7 +1012,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> r >> g >> b;
element->textColor = RGB(r, g, b);
}
- else if (!lstrcmp(buf, _T("clocksize"))) {
+ else if (!mir_tstrcmp(buf, _T("clocksize"))) {
element->clockstart[0] = 0;
f >> element->clocksize[0];
for (int i = 1; i < CLOCK_ITEMS; i++) {
@@ -1020,7 +1020,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> element->clocksize[i];
}
}
- else if (!lstrcmp(buf, _T("end"))) {
+ else if (!mir_tstrcmp(buf, _T("end"))) {
break;
}
}
@@ -1119,7 +1119,7 @@ bool Skins::load(LPCTSTR dir1) WIN32_FIND_DATA ffd;
HANDLE hFind = FindFirstFile(_T("*.*"), &ffd);
while (hFind != INVALID_HANDLE_VALUE) {
- if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && lstrcmp(_T("."), ffd.cFileName) && lstrcmp(_T(".."), ffd.cFileName)) {
+ if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName)) {
SetCurrentDirectory(ffd.cFileName);
SKINLIST *skin = new SKINLIST;
@@ -1147,9 +1147,9 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) {
SKINLIST *any = 0;
for (SKINLIST *p = m_skins; p; p = p->next) {
- if (!lstrcmp(p->name, _T("* Popup Classic")) || !any)
+ if (!mir_tstrcmp(p->name, _T("* Popup Classic")) || !any)
any = p;
- if (!lstrcmpi(p->name, name)) {
+ if (!mir_tstrcmpi(p->name, name)) {
any = p;
break;
}
@@ -1174,7 +1174,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) void Skins::loadActiveSkin()
{
for (SKINLIST *p = m_skins; p; p = p->next)
- if (!lstrcmpi(p->name, PopupOptions.SkinPack)) {
+ if (!mir_tstrcmpi(p->name, PopupOptions.SkinPack)) {
if (p->skin)
break;
@@ -1187,7 +1187,7 @@ void Skins::loadActiveSkin() void Skins::freeAllButActive()
{
for (SKINLIST *p = m_skins; p; p = p->next)
- if (lstrcmpi(p->name, PopupOptions.SkinPack)) {
+ if (mir_tstrcmpi(p->name, PopupOptions.SkinPack)) {
delete p->skin;
p->skin = NULL;
}
diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index e41ee130ce..40039f13fb 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -70,7 +70,7 @@ static int SrmmMenu_ProcessEvent(WPARAM, LPARAM lParam) static int SrmmMenu_ProcessIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (lstrcmpA(sicd->szModule, MODULNAME))
+ if (mir_strcmp(sicd->szModule, MODULNAME))
return 0;
if (!hContact)
|