From 84f2722e07a23656bdc8d1a7f4040e86450fe91d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 30 Apr 2021 16:48:09 +0300 Subject: dbeditor++: "Clone contact" removed --- plugins/DbEditorPP/res/resource.rc | 1 - plugins/DbEditorPP/src/copymodule.cpp | 21 --------------------- plugins/DbEditorPP/src/moduletree.cpp | 5 ----- plugins/DbEditorPP/src/resource.h | 1 - plugins/DbEditorPP/src/stdafx.h | 1 - 5 files changed, 29 deletions(-) (limited to 'plugins/DbEditorPP') diff --git a/plugins/DbEditorPP/res/resource.rc b/plugins/DbEditorPP/res/resource.rc index 7ac896340d..cfdc7a6e41 100644 --- a/plugins/DbEditorPP/res/resource.rc +++ b/plugins/DbEditorPP/res/resource.rc @@ -418,7 +418,6 @@ BEGIN POPUP "Contact menu" BEGIN MENUITEM "&Add module", MENU_ADD_MODULE - MENUITEM "&Clone", MENU_CLONE_CONTACT MENUITEM "&Delete", MENU_DELETE_CONTACT MENUITEM SEPARATOR MENUITEM "Export contact", MENU_EXPORTCONTACT diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index b4b3bb10e9..a8bebffcff 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -87,24 +87,3 @@ void copyModuleMenuItem(HWND hwndParent, MCONTACT hContact, const char *module) CreateDialogParam(g_plugin.getInst(), MAKEINTRESOURCE(IDD_COPY_MOD), hwndParent, copyModDlgProc, (LPARAM)mac); } - -int CloneContact(MCONTACT hContact) -{ - MCONTACT newContact = db_add_contact(); - if (!newContact) - return 0; - - // enum all the modules - ModuleSettingLL modlist; - if (!EnumModules(&modlist)) - return 0; - - ModSetLinkLinkItem *mod = modlist.first; - while (mod) { - copyModule(mod->name, hContact, newContact); - mod = (ModSetLinkLinkItem *)mod->next; - } - - FreeModuleSettingLL(&modlist); - return 1; -} diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index 28a11910fc..c5e8c1e1a1 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -532,11 +532,6 @@ void CMainDlg::onContextMenu_Modules(CContextMenuPos *pos) case 2: // contact switch (TrackPopupMenu(hSubMenu, TPM_RETURNCMD, pos->pt.x, pos->pt.y, 0, m_hwnd, nullptr)) { - case MENU_CLONE_CONTACT: - if (CloneContact(hContact)) - refreshTree(1); - break; - case MENU_DELETE_CONTACT: if (db_get_b(0, "CList", "ConfirmDelete", 1)) { wchar_t str[MSG_SIZE]; diff --git a/plugins/DbEditorPP/src/resource.h b/plugins/DbEditorPP/src/resource.h index 43afec172a..1f5073d2dd 100644 --- a/plugins/DbEditorPP/src/resource.h +++ b/plugins/DbEditorPP/src/resource.h @@ -103,7 +103,6 @@ #define MENU_WATCH_ITEM 40018 #define MENU_WATCH_MOD 40019 #define MENU_ADD_BLOB 40020 -#define MENU_CLONE_CONTACT 40021 #define MENU_DELETE_CONTACT 40022 #define MENU_ADD_MODULE 40023 #define MENU_ADD_BYTE 40024 diff --git a/plugins/DbEditorPP/src/stdafx.h b/plugins/DbEditorPP/src/stdafx.h index d49c239bfc..a592524a26 100644 --- a/plugins/DbEditorPP/src/stdafx.h +++ b/plugins/DbEditorPP/src/stdafx.h @@ -313,7 +313,6 @@ void newFindWindow(); // copymodule void copyModuleMenuItem(HWND hwndParent, MCONTACT hContact, const char *module); void copyModule(const char *module, MCONTACT hContactFrom, MCONTACT hContactTo); -int CloneContact(MCONTACT hContact); // options int OptInit(WPARAM wParam, LPARAM lParam); -- cgit v1.2.3