summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-20 09:14:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-20 09:14:13 +0000
commitaa4076ff72097fd65a6c8a2369749afee6adf034 (patch)
tree7ea7e8478a1fedf19d1d7e48f39d28839dad6ddb
parent59b00feb310240a3ac5a140ee3dd519c520c69b3 (diff)
minor fixes here & there
git-svn-id: http://svn.miranda-ng.org/main/trunk@1069 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/CommonLibs/CString.cpp8
-rw-r--r--protocols/IcqOscarJ/icq_menu.cpp24
-rw-r--r--protocols/IcqOscarJ/icq_xtraz.h36
-rw-r--r--protocols/IcqOscarJ/icqoscar.h1
-rw-r--r--src/modules/clist/clistmenus.cpp2
5 files changed, 15 insertions, 56 deletions
diff --git a/plugins/CommonLibs/CString.cpp b/plugins/CommonLibs/CString.cpp
index c78d9e25b0..fb8760dc74 100644
--- a/plugins/CommonLibs/CString.cpp
+++ b/plugins/CommonLibs/CString.cpp
@@ -82,7 +82,7 @@ void TString<T>::SetAllocSize(int nNewAllocSize)
if (pBuf)
{
memcpy(pNewBuf, pBuf, sizeof(T) * min(nBufSize, nNewAllocSize));
- //HeapFree(GetProcessHeap(), 0, pBuf);
+ //HeapFree(GetProcessHeap(), 0, pBuf);
free(pBuf);
}
pBuf = pNewBuf;
@@ -177,7 +177,7 @@ TString<T>& TString<T>::Replace(int nIndex, int nCount, const T *szReplaceBy)
{
return *this;
}
-
+
TString<T> Result;
Result.GetBuffer(1)[0] = '\0';
Result.ReleaseBuffer(0); // set the string to ""; we can't do it in a usual way (using a constructor or an assignment) because we don't know whether "" needs to be unicode or ansi
@@ -339,11 +339,7 @@ TCString DBGetContactSettingString(HANDLE hContact, const char *szModule, const
int DBGetContactSettingString(HANDLE hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
-#ifdef _DEBUG
- return db_get_s(hContact, szModule, szSetting, dbv, DBVT_ASCIIZ);
-#else
return db_get_s(hContact, szModule, szSetting, dbv, DBVT_ASCIIZ);
-#endif
}
diff --git a/protocols/IcqOscarJ/icq_menu.cpp b/protocols/IcqOscarJ/icq_menu.cpp
index 8c67310963..f3dd072cde 100644
--- a/protocols/IcqOscarJ/icq_menu.cpp
+++ b/protocols/IcqOscarJ/icq_menu.cpp
@@ -1,22 +1,22 @@
// ---------------------------------------------------------------------------80
// ICQ plugin for Miranda Instant Messenger
// ________________________________________
-//
+//
// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
// Copyright © 2001-2002 Jon Keating, Richard Hughes
// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
// Copyright © 2004-2008 Joe Kucera, Bio
-//
+//
// This program is free software; you can redistribute it and/or
// 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,
// 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.
-//
+//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -125,7 +125,7 @@ void g_MenuInit(void)
char str[MAXMODULELABELLENGTH], *pszDest = str + 3;
strcpy( str, "ICQ" );
-
+
CLISTMENUITEM mi = { 0 };
mi.cbSize = sizeof(CLISTMENUITEM);
mi.pszService = str;
@@ -222,20 +222,20 @@ int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
DWORD dwUin = getContactUin(hContact);
- sttEnableMenuItem(g_hContactMenuItems[ICMI_AUTH_REQUEST],
+ sttEnableMenuItem(g_hContactMenuItems[ICMI_AUTH_REQUEST],
dwUin && (bCtrlPressed || (getSettingByte((HANDLE)wParam, "Auth", 0) && getSettingWord((HANDLE)wParam, DBSETTING_SERVLIST_ID, 0))));
sttEnableMenuItem(g_hContactMenuItems[ICMI_AUTH_GRANT], dwUin && (bCtrlPressed || getSettingByte((HANDLE)wParam, "Grant", 0)));
- sttEnableMenuItem(g_hContactMenuItems[ICMI_AUTH_REVOKE],
+ sttEnableMenuItem(g_hContactMenuItems[ICMI_AUTH_REVOKE],
dwUin && (bCtrlPressed || (getSettingByte(NULL, "PrivacyItems", 0) && !getSettingByte((HANDLE)wParam, "Grant", 0))));
- sttEnableMenuItem(g_hContactMenuItems[ICMI_ADD_TO_SERVLIST],
- m_bSsiEnabled && !getSettingWord((HANDLE)wParam, DBSETTING_SERVLIST_ID, 0) &&
+ sttEnableMenuItem(g_hContactMenuItems[ICMI_ADD_TO_SERVLIST],
+ m_bSsiEnabled && !getSettingWord((HANDLE)wParam, DBSETTING_SERVLIST_ID, 0) &&
!getSettingWord((HANDLE)wParam, DBSETTING_SERVLIST_IGNORE, 0) &&
!DBGetContactSettingByte(hContact, "CList", "NotOnList", 0));
}
-
+
sttEnableMenuItem(g_hContactMenuItems[ICMI_OPEN_PROFILE],getContactUin(hContact) != 0);
BYTE bXStatus = getContactXStatus((HANDLE)wParam);
-
+
sttEnableMenuItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], m_bHideXStatusUI ? 0 : bXStatus != 0);
if (bXStatus && !m_bHideXStatusUI) {
CLISTMENUITEM clmi = {0};
@@ -254,7 +254,7 @@ int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
}
/////////////////////////////////////////////////////////////////////////////////////////
-// OnPrebuildContactMenu event
+// OnPreBuildStatusMenu event
int CIcqProto::OnPreBuildStatusMenu(WPARAM wParam, LPARAM lParam)
{
diff --git a/protocols/IcqOscarJ/icq_xtraz.h b/protocols/IcqOscarJ/icq_xtraz.h
deleted file mode 100644
index 28578e71a5..0000000000
--- a/protocols/IcqOscarJ/icq_xtraz.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// ---------------------------------------------------------------------------80
-// ICQ plugin for Miranda Instant Messenger
-// ________________________________________
-//
-// Copyright © 2000-2001 Richard Hughes, Roland Rabien, Tristan Van de Vreede
-// Copyright © 2001-2002 Jon Keating, Richard Hughes
-// Copyright © 2002-2004 Martin Öberg, Sam Kothari, Robert Rainwater
-// Copyright © 2004-2008 Joe Kucera
-//
-// This program is free software; you can redistribute it and/or
-// 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,
-// 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.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-//
-// -----------------------------------------------------------------------------
-// DESCRIPTION:
-//
-// Describe me here please...
-//
-// -----------------------------------------------------------------------------
-#ifndef __ICQ_XTRAZ_H
-#define __ICQ_XTRAZ_H
-
-// custom status support
-void InitXStatusItems(BOOL bAllowStatus);
-
-#endif /* __ICQ_XTRAZ_H */
diff --git a/protocols/IcqOscarJ/icqoscar.h b/protocols/IcqOscarJ/icqoscar.h
index 1efd1ffebb..b565eda497 100644
--- a/protocols/IcqOscarJ/icqoscar.h
+++ b/protocols/IcqOscarJ/icqoscar.h
@@ -102,7 +102,6 @@
#include "icq_direct.h"
#include "icq_server.h"
#include "icqosc_svcs.h"
-#include "icq_xtraz.h"
#include "icq_opts.h"
#include "icq_servlist.h"
#include "icq_http.h"
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index 8abc2bd2da..53f7728d9c 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -1193,7 +1193,7 @@ static INT_PTR AddStatusMenuItem(WPARAM wParam, LPARAM lParam)
mir_free(ptszName);
}
if (pRoot == NULL) {
- memset(&tmi, 0, sizeof(tmi));
+ TMO_MenuItem tmi = { 0 };
tmi.cbSize = sizeof(tmi);
tmi.flags = (mi->flags & CMIF_UNICODE) | CMIF_ROOTHANDLE;
tmi.position = 1001;