summaryrefslogtreecommitdiff
path: root/plugins/NewStory
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-05-04 16:11:14 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-05-04 16:11:14 +0300
commitfa125faeee5c0021bb7f6ec9d182e7612561ff34 (patch)
tree3dc61080289702c1769749d854bbf6bde0eb9651 /plugins/NewStory
parent055bae23041ae6817c9595714b80a0e0fdd77867 (diff)
first working version of popup menu
Diffstat (limited to 'plugins/NewStory')
-rw-r--r--plugins/NewStory/res/resource.rc15
-rw-r--r--plugins/NewStory/src/history_control.cpp7
-rw-r--r--plugins/NewStory/src/resource.h2
3 files changed, 9 insertions, 15 deletions
diff --git a/plugins/NewStory/res/resource.rc b/plugins/NewStory/res/resource.rc
index 4172d75491..8d0d0adabf 100644
--- a/plugins/NewStory/res/resource.rc
+++ b/plugins/NewStory/res/resource.rc
@@ -385,25 +385,14 @@ BEGIN
POPUP ""
BEGIN
MENUITEM "Copy", ID_CONTEXT_COPY
+ MENUITEM SEPARATOR
+ MENUITEM "Edit", ID_CONTEXT_EDIT
MENUITEM "Delete", ID_CONTEXT_DELETE, GRAYED
MENUITEM SEPARATOR
MENUITEM "Select all", ID_CONTEXT_SELECTALL
END
END
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// Accelerator
-//
-
-IDR_ACCEL ACCELERATORS
-BEGIN
- "C", IDA_COPY, VIRTKEY, CONTROL, NOINVERT
- "F", IDA_SEARCH, VIRTKEY, CONTROL, NOINVERT
-END
-
-
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/plugins/NewStory/src/history_control.cpp b/plugins/NewStory/src/history_control.cpp
index 6e1f2dbd83..56dbaa9edc 100644
--- a/plugins/NewStory/src/history_control.cpp
+++ b/plugins/NewStory/src/history_control.cpp
@@ -50,8 +50,13 @@ struct NewstoryListData : public MZeroedObject
int ret = TrackPopupMenu(GetSubMenu(hMenu, 0), TPM_RETURNCMD, pt.x, pt.y, 0, hwnd, nullptr);
switch(ret) {
case ID_CONTEXT_COPY:
+ SendMessage(hwnd, NSM_COPY, 0, 0);
break;
-
+
+ case ID_CONTEXT_EDIT:
+ BeginEditItem(index);
+ break;
+
case ID_CONTEXT_DELETE:
break;
diff --git a/plugins/NewStory/src/resource.h b/plugins/NewStory/src/resource.h
index 0b4511f7f1..9d2340ba58 100644
--- a/plugins/NewStory/src/resource.h
+++ b/plugins/NewStory/src/resource.h
@@ -9,7 +9,6 @@
#define IDR_CONTEXTMENU 106
#define IDD_MESSAGE 112
#define IDR_POPUPS 113
-#define IDR_ACCEL 114
#define IDD_CALENDARTOOL 118
#define IDD_FILTERMODE 123
#define ICO_NEWSTORY 127
@@ -124,6 +123,7 @@
#define ID_FILTER_AUTO 40022
#define ID_LOGOPTIONS_TEMPLATES 40023
#define ID_LOGOPTIONS_OPTIONS 40024
+#define ID_CONTEXT_EDIT 40025
#define ID_CONTEXT_DELETE 40026
#define ID_CONTEXT_SELECTALL 40027
#define ID_CONTEXT_CANCEL 40028