diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/core/miranda.h | 1 | ||||
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 3 | ||||
-rw-r--r-- | src/modules/plugins/pluginopts.cpp | 16 | ||||
-rw-r--r-- | src/modules/protocols/protoaccs.cpp | 9 |
4 files changed, 7 insertions, 22 deletions
diff --git a/src/core/miranda.h b/src/core/miranda.h index 74266aced9..097a8546d0 100644 --- a/src/core/miranda.h +++ b/src/core/miranda.h @@ -205,7 +205,6 @@ void EraseAccount(const char *pszProtoName); void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase);
void UnloadAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase);
void OpenAccountOptions(PROTOACCOUNT* pa);
-void KillProtoAccounts(const char *pszProtoName);
void LoadDbAccounts(void);
void WriteDbAccounts(void);
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 667aabccfc..4b16fbeb5c 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -338,9 +338,6 @@ void Plugin_Uninit(pluginEntry* p) int Plugin_UnloadDyn(pluginEntry* p)
{
if (p->bpi.hInst) {
- if ( hasMuuid(p->bpi.Interfaces, miid_protocol))
- KillProtoAccounts(p->bpi.pluginInfo->shortName);
-
if ( CallPluginEventHook(p->bpi.hInst, hOkToExitEvent, 0, 0) != 0)
return FALSE;
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 7f1483a5b1..9761c14ce5 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define IS_DATABASE (1 << 14)
-extern MUUID miid_clist, miid_database;
+extern MUUID miid_clist, miid_database, miid_protocol;
HANDLE hevLoadModule, hevUnloadModule;
/////////////////////////////////////////////////////////////////////////////////////////
@@ -61,7 +61,6 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l return TRUE;
int isdb = hasMuuid(pi, miid_database);
- int isclist = hasMuuid(pi, miid_clist);
PluginListItemData* dat = (PluginListItemData*)mir_alloc(sizeof(PluginListItemData));
dat->hInst = hInst;
@@ -81,7 +80,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 || isclist)
+ if (isdb || hasMuuid(pi, miid_clist) || hasMuuid(pi, miid_protocol))
it.iImage += 2;
ListView_SetItem(hwndList, &it);
@@ -304,7 +303,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar if ( !ListView_GetItem(hwndList, &it))
break;
- PluginListItemData* dat = (PluginListItemData*)it.lParam;
+ PluginListItemData *dat = (PluginListItemData*)it.lParam;
if (dat->flags & IS_DATABASE) {
ListView_SetItemState(hwndList, hdr->iItem, 0x3000, LVIS_STATEIMAGEMASK);
return FALSE;
@@ -349,11 +348,10 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINAUTHOR), sel ? dat->author : "");
SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINEMAIL), sel ? dat->authorEmail : "");
- {
- TCHAR* p = Langpack_PcharToTchar(dat->description);
- SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINLONGINFO), sel ? p : _T(""));
- mir_free(p);
- }
+
+ mir_ptr<TCHAR> p( Langpack_PcharToTchar(dat->description));
+ SetWindowText( GetDlgItem(hwndDlg, IDC_PLUGINLONGINFO), sel ? p : _T(""));
+
SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINCPYR), sel ? dat->copyright : "");
SetWindowTextA( GetDlgItem(hwndDlg, IDC_PLUGINURL), sel ? dat->homepage : "");
if (equalUUID(miid_last, dat->uuid))
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 65ad1e3de7..0b31bfab25 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -614,15 +614,6 @@ void UnloadAccountsModule() /////////////////////////////////////////////////////////////////////////////////////////
-void KillProtoAccounts(const char *szProtoName)
-{
- for (int i=0; i < accounts.getCount(); i++)
- if ( !strcmp(szProtoName, accounts[i]->szProtoName))
- DeactivateAccount(accounts[i], true, false);
-}
-
-/////////////////////////////////////////////////////////////////////////////////////////
-
void BuildProtoMenus()
{
for (int i=0; i < accounts.getCount(); i++) {
|