summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mir_app/res/resource.rc1
-rw-r--r--src/mir_app/src/menu_options.cpp31
-rw-r--r--src/mir_app/src/menu_utils.cpp2
-rw-r--r--src/mir_app/src/resource.h1
4 files changed, 3 insertions, 32 deletions
diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc
index 2adb81cc03..1227509edc 100644
--- a/src/mir_app/res/resource.rc
+++ b/src/mir_app/res/resource.rc
@@ -486,7 +486,6 @@ BEGIN
PUSHBUTTON "Set",IDC_GENMENU_SET,50,233,45,15,WS_DISABLED
CONTROL "Enable icons",IDC_DISABLEMENUICONS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,156,234,91,10
PUSHBUTTON "Reset",IDC_RESETMENU,254,230,50,14
- PUSHBUTTON "Delete",IDC_GENMENU_DELETE,100,233,39,15,WS_DISABLED
END
IDD_OPT_PROTOCOLORDER DIALOGEX 0, 0, 315, 242
diff --git a/src/mir_app/src/menu_options.cpp b/src/mir_app/src/menu_options.cpp
index dca1eb75dc..ff29930a9e 100644
--- a/src/mir_app/src/menu_options.cpp
+++ b/src/mir_app/src/menu_options.cpp
@@ -88,7 +88,7 @@ class CGenMenuOptionsPage : public CDlgBase
tvi.mask = TVIF_TEXT | TVIF_PARAM | TVIF_HANDLE | TVIF_STATE;
tvi.pszText = idstr;
- int count = 0, customOrder = 0;
+ int count = 0;
int runtimepos = 100;
char pszParent[33];
@@ -273,7 +273,7 @@ class CGenMenuOptionsPage : public CDlgBase
CCtrlTreeView m_menuItems;
CCtrlCheck m_radio1, m_radio2, m_enableIcons;
CCtrlEdit m_customName, m_service, m_module, m_id;
- CCtrlButton m_btnInsSeparator, m_btnReset, m_btnSet, m_btnDefault, m_btnDelete;
+ CCtrlButton m_btnInsSeparator, m_btnReset, m_btnSet, m_btnDefault;
public:
CGenMenuOptionsPage() :
@@ -287,7 +287,6 @@ public:
m_btnInsSeparator(this, IDC_INSERTSEPARATOR),
m_btnReset(this, IDC_RESETMENU),
m_btnSet(this, IDC_GENMENU_SET),
- m_btnDelete(this, IDC_GENMENU_DELETE),
m_btnDefault(this, IDC_GENMENU_DEFAULT),
m_id(this, IDC_GENMENU_ID),
m_customName(this, IDC_GENMENU_CUSTOMNAME),
@@ -298,7 +297,6 @@ public:
m_btnReset.OnClick = Callback(this, &CGenMenuOptionsPage::btnReset_Clicked);
m_btnInsSeparator.OnClick = Callback(this, &CGenMenuOptionsPage::btnInsSep_Clicked);
m_btnDefault.OnClick = Callback(this, &CGenMenuOptionsPage::btnDefault_Clicked);
- m_btnDelete.OnClick = Callback(this, &CGenMenuOptionsPage::btnDelete_Clicked);
m_menuObjects.OnSelChange = Callback(this, &CGenMenuOptionsPage::onMenuObjectChanged);
@@ -453,29 +451,6 @@ public:
NotifyChange();
}
- void btnDelete_Clicked(CCtrlButton *)
- {
- HTREEITEM hti = m_menuItems.GetSelection();
- if (hti == nullptr)
- return;
-
- TVITEMEX tvi;
- tvi.mask = TVIF_PARAM;
- tvi.hItem = hti;
- m_menuItems.GetItem(&tvi);
-
- MenuItemOptData *iod = (MenuItemOptData *)tvi.lParam;
- if (!(iod->pimi->mi.flags & CMIF_CUSTOM))
- return;
-
- if (IDYES == MessageBoxW(m_hwnd, TranslateT("Do you really want to delete this menu item?"), TranslateT("Miranda"), MB_YESNO | MB_ICONQUESTION)) {
- m_arDeleted.insert(iod->pimi);
- m_menuItems.DeleteItem(hti);
- delete iod;
- NotifyChange();
- }
- }
-
void onMenuObjectChanged(void*)
{
m_bInitialized = false;
@@ -492,7 +467,6 @@ public:
m_btnDefault.Disable();
m_btnSet.Disable();
- m_btnDelete.Disable();
m_customName.Disable();
HTREEITEM hti = m_menuItems.GetSelection();
@@ -527,7 +501,6 @@ public:
m_module.SetTextA(pPlugin ? pPlugin->getInfo().shortName : "");
m_btnDefault.Enable(mir_wstrcmp(iod->name, iod->defname) != 0);
- m_btnDelete.Enable(iod->pimi->mi.flags & CMIF_CUSTOM);
m_btnSet.Enable(true);
m_customName.Enable(true);
}
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp
index 3c778f926a..382e06136f 100644
--- a/src/mir_app/src/menu_utils.cpp
+++ b/src/mir_app/src/menu_utils.cpp
@@ -1069,7 +1069,7 @@ static void CALLBACK sttUpdateMenuService()
db_set_b(0, szModule, "MenuFormat", true);
MO_RecursiveWalkMenu(pmo->m_items, sttDumpItem, szModule);
}
- else // yes, menu is already converted, simply load its data
+ else // yes, menu is already converted, simply load its data
Menu_LoadAllFromDatabase(pmo->m_items, szModule);
}
diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h
index 5f963eba57..8d5bdde14d 100644
--- a/src/mir_app/src/resource.h
+++ b/src/mir_app/src/resource.h
@@ -300,7 +300,6 @@
#define IDC_GENMENU_ID 1088
#define IDC_GENMENU_DEFAULT 1089
#define IDC_ICON1 1090
-#define IDC_GENMENU_DELETE 1090
#define IDC_ICON2 1091
#define IDC_ICON3 1092
#define IDC_ICON4 1093