diff options
-rw-r--r-- | include/delphi/m_api.pas | 5 | ||||
-rw-r--r-- | include/newpluginapi.h | 6 | ||||
-rw-r--r-- | plugins/AdvaImg/src/main.cpp | 2 | ||||
-rw-r--r-- | plugins/Db3x/src/init.cpp | 4 | ||||
-rw-r--r-- | plugins/Db3x_mmap/src/init.cpp | 2 | ||||
-rw-r--r-- | plugins/DbChecker/src/main.cpp | 4 | ||||
-rw-r--r-- | plugins/Dbx_mmap_SA/src/init.cpp | 2 | ||||
-rw-r--r-- | plugins/Dbx_tree/src/init.cpp | 2 | ||||
-rw-r--r-- | src/modules/plugins/pluginopts.cpp | 13 |
9 files changed, 20 insertions, 20 deletions
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas index 9aca7006a8..44cd82c311 100644 --- a/include/delphi/m_api.pas +++ b/include/delphi/m_api.pas @@ -67,7 +67,7 @@ type // delphi 64 must have these types anyway
int_ptr = integer;
uint_ptr = cardinal;
-
+
{$ENDIF}
long = longint;
plong = ^long;
@@ -106,6 +106,7 @@ type {-- start newpluginapi --}
const
UNICODE_AWARE = 1;
+ STATIC_PLUGIN = 2;
// The UUID structure below is used to for plugin UUID's and module type definitions
type
@@ -160,7 +161,7 @@ const ME_SYSTEM_MODULEUNLOAD:pAnsiChar = 'Miranda/System/UnloadModule';
{
- Each service mode plugin must implement MS_SERVICEMODE_LAUNCH
+ Each service mode plugin must implement MS_SERVICEMODE_LAUNCH
This service might return one of the following values:
SERVICE_CONTINUE - load Miranda normally, like there's no service plugins at all
SERVICE_ONLYDB - load database and then execute service plugin only
diff --git a/include/newpluginapi.h b/include/newpluginapi.h index 8f3313c897..8ba459b730 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -30,11 +30,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MAXMODULELABELLENGTH 64
#if defined(_UNICODE)
- #define UNICODE_AWARE 1
+ #define UNICODE_AWARE 0x0001
#else
- #define UNICODE_AWARE 0
+ #define UNICODE_AWARE 0x0000
#endif
+#define STATIC_PLUGIN 0x0002
+
/* The UUID structure below is used to for plugin UUID's and module type definitions */
typedef struct _MUUID {
unsigned long a;
diff --git a/plugins/AdvaImg/src/main.cpp b/plugins/AdvaImg/src/main.cpp index 432ddd02ce..a0342505e8 100644 --- a/plugins/AdvaImg/src/main.cpp +++ b/plugins/AdvaImg/src/main.cpp @@ -48,7 +48,7 @@ static const PLUGININFOEX pluginInfoEx = { __AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE,
+ UNICODE_AWARE | STATIC_PLUGIN,
// {7C070F7C-459E-46b7-8E6D-BC6EFAA22F78}
{0x7c070f7c, 0x459e, 0x46b7, {0x8e, 0x6d, 0xbc, 0x6e, 0xfa, 0xa2, 0x2f, 0x78}}
};
diff --git a/plugins/Db3x/src/init.cpp b/plugins/Db3x/src/init.cpp index 7831613ef5..cb0ebf2fd3 100644 --- a/plugins/Db3x/src/init.cpp +++ b/plugins/Db3x/src/init.cpp @@ -35,7 +35,7 @@ static PLUGININFOEX pluginInfo = "ghazan@miranda.im",
"Copyright 2012 Miranda NG project",
"",
- UNICODE_AWARE,
+ UNICODE_AWARE | STATIC_PLUGIN,
{0x1394a3ab, 0x2585, 0x4196, { 0x8f, 0x72, 0xe, 0xae, 0xc2, 0x45, 0xe, 0x11 }} //{1394A3AB-2585-4196-8F72-0EAEC2450E11}
};
@@ -51,7 +51,7 @@ static int makeDatabase(const TCHAR *profile) std::auto_ptr<CDb3x> db(new CDb3x(profile));
if (db->Create() != ERROR_SUCCESS)
return EMKPRF_CREATEFAILED;
-
+
return db->CreateDbHeaders(dbSignature);
}
diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index bb76ccd3a8..2e18dc6b57 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -35,7 +35,7 @@ static PLUGININFOEX pluginInfo = "bio@msx.ru; ghazan@miranda.im",
"Copyright 2012 Miranda NG project",
"http://miranda-ng.org/",
- UNICODE_AWARE,
+ UNICODE_AWARE | STATIC_PLUGIN,
{0xf7a6b27c, 0x9d9c, 0x4a42, { 0xbe, 0x86, 0xa4, 0x48, 0xae, 0x10, 0x91, 0x61 }} //{F7A6B27C-9D9C-4a42-BE86-A448AE109161}
};
diff --git a/plugins/DbChecker/src/main.cpp b/plugins/DbChecker/src/main.cpp index dcf8a59075..6a4e543372 100644 --- a/plugins/DbChecker/src/main.cpp +++ b/plugins/DbChecker/src/main.cpp @@ -7,7 +7,7 @@ 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,
+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.
@@ -37,7 +37,7 @@ PLUGININFOEX pluginInfoEx = __AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE,
+ UNICODE_AWARE | STATIC_PLUGIN,
// {A0138FC6-4C52-4501-AF93-7D3E20BCAE5B}
{ 0xa0138fc6, 0x4c52, 0x4501, { 0xaf, 0x93, 0x7d, 0x3e, 0x20, 0xbc, 0xae, 0x5b}}
};
diff --git a/plugins/Dbx_mmap_SA/src/init.cpp b/plugins/Dbx_mmap_SA/src/init.cpp index 65cfd44561..33df6e4224 100644 --- a/plugins/Dbx_mmap_SA/src/init.cpp +++ b/plugins/Dbx_mmap_SA/src/init.cpp @@ -39,7 +39,7 @@ PLUGININFOEX pluginInfo = { "chaos.persei@gmail.com; ashpynov@gmail.com; bio@msx.ru; ghazan@miranda.im",
"Copyright 2000-2011 Miranda IM project, 2012 Miranda NG project FYR, chaos.persei, induction, nullbie",
"http://miranda-ng.org/",
- UNICODE_AWARE,
+ UNICODE_AWARE | STATIC_PLUGIN,
// {28FF9B91-3E4D-4f1c-B47C-C641B037FF40}
{ 0x28ff9b91, 0x3e4d, 0x4f1c, { 0xb4, 0x7c, 0xc6, 0x41, 0xb0, 0x37, 0xff, 0x40 } }
};
diff --git a/plugins/Dbx_tree/src/init.cpp b/plugins/Dbx_tree/src/init.cpp index 7f92bc7623..843c662b41 100644 --- a/plugins/Dbx_tree/src/init.cpp +++ b/plugins/Dbx_tree/src/init.cpp @@ -38,7 +38,7 @@ static PLUGININFOEX gPluginInfoEx = { gAutorEmail,
gCopyright,
"http://miranda-ng.org/",
- UNICODE_AWARE,
+ UNICODE_AWARE | STATIC_PLUGIN,
{ 0x28f45248, 0x8c9c, 0x4bee, { 0x93, 0x07, 0x7b, 0xcf, 0x3e, 0x12, 0xbf, 0x99 } } // {28F45248-8C9C-4bee-9307-7BCF3E12BF99}
};
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 093f0bad0d..e8c946b510 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -59,11 +59,9 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l if (checkAPI(buf, &pi, MIRANDA_VERSION_CORE, CHECKAPI_NONE) == 0)
return TRUE;
- int isdb = hasMuuid(pi, miid_database);
-
PluginListItemData* dat = (PluginListItemData*)mir_alloc(sizeof(PluginListItemData));
dat->hInst = hInst;
- dat->flags = 0;
+ dat->flags = pi.pluginInfo->flags;
CharLower(fd->cFileName);
_tcsncpy(dat->fileName, fd->cFileName, SIZEOF(dat->fileName));
@@ -72,13 +70,12 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l LVITEM it = { 0 };
it.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
- it.iImage = (pi.pluginInfo->flags & 1) ? 0 : 1;
+ it.iImage = (dat->flags & UNICODE_AWARE) ? 0 : 1;
it.lParam = (LPARAM)dat;
int iRow = ListView_InsertItem(hwndList, &it);
- bool bNoCheckbox = isdb || !_tcscmp(dat->fileName, _T("advaimg.dll")) || !_tcscmp(dat->fileName, _T("dbchecker.dll"));
- if (bNoCheckbox)
- dat->flags |= IS_STATIC;
+ bool bNoCheckbox = (dat->flags & STATIC_PLUGIN) != 0;
+ //hasMuuid(pi, miid_database) || !_tcscmp(dat->fileName, _T("advaimg.dll")) || !_tcscmp(dat->fileName, _T("dbchecker.dll"));
if (isPluginOnWhiteList(fd->cFileName))
ListView_SetItemState(hwndList, iRow, bNoCheckbox ? 0x3000 : 0x2000, LVIS_STATEIMAGEMASK);
@@ -88,7 +85,7 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l it.iItem = iRow;
it.iSubItem = 1;
it.iImage = (hInst != NULL) ? 2 : 3;
- if (isdb || hasMuuid(pi, miid_clist) || hasMuuid(pi, miid_protocol))
+ if (bNoCheckbox|| hasMuuid(pi, miid_clist) || hasMuuid(pi, miid_protocol))
it.iImage += 2;
ListView_SetItem(hwndList, &it);
|