From 3e94f8e5669f8b15eb7588eaf50a7491d2add462 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 26 Nov 2017 21:17:58 +0300 Subject: mir_app: added module name to menu form --- src/mir_app/res/resource.rc | 16 +++++++++------- src/mir_app/src/menu_options.cpp | 7 ++++++- src/mir_app/src/resource.h | 17 +++++++++-------- 3 files changed, 24 insertions(+), 16 deletions(-) (limited to 'src/mir_app') diff --git a/src/mir_app/res/resource.rc b/src/mir_app/res/resource.rc index 53ba52832b..ba1f6d591c 100644 --- a/src/mir_app/res/resource.rc +++ b/src/mir_app/res/resource.rc @@ -467,16 +467,18 @@ STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD EXSTYLE WS_EX_CONTROLPARENT FONT 8, "MS Shell Dlg", 0, 0, 0x1 BEGIN - GROUPBOX "Menu objects",IDC_STATIC,5,2,140,94 + GROUPBOX "Menu objects",IDC_STATIC,5,2,140,81 LISTBOX IDC_MENUOBJECTS,11,13,128,79,WS_VSCROLL | WS_TABSTOP GROUPBOX "Menu items",IDC_STATIC,149,2,161,248 CONTROL "Tree1",IDC_MENUITEMS,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | TVS_NOHSCROLL | WS_DISABLED | WS_BORDER | WS_TABSTOP,156,13,148,212 - GROUPBOX "Protocol menus",IDC_STATIC,5,100,140,37 - CONTROL "Move to the main menu",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,11,111,128,8 - CONTROL "Move to the status bar",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,11,123,130,8 - LTEXT "Warning!\r\nThis menu object not support user defined options.",IDC_NOTSUPPORTWARNING,10,140,136,32,NOT WS_VISIBLE - PUSHBUTTON "Insert submenu",IDC_INSERTSUBMENU,39,163,97,14,WS_DISABLED - PUSHBUTTON "Insert separator",IDC_INSERTSEPARATOR,39,180,97,14,WS_DISABLED + GROUPBOX "Protocol menus",IDC_STATIC,5,84,140,37 + CONTROL "Move to the main menu",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,11,95,128,8 + CONTROL "Move to the status bar",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,11,107,130,8 + LTEXT "Warning!\r\nThis menu object not support user defined options.",IDC_NOTSUPPORTWARNING,10,124,136,32,NOT WS_VISIBLE + PUSHBUTTON "Insert submenu",IDC_INSERTSUBMENU,39,147,97,14,WS_DISABLED + PUSHBUTTON "Insert separator",IDC_INSERTSEPARATOR,39,164,97,14,WS_DISABLED + LTEXT "Module:",IDC_STATIC,4,184,29,8 + EDITTEXT IDC_GENMENU_MODULE,36,183,108,14,ES_AUTOHSCROLL | ES_READONLY LTEXT "Service:",IDC_STATIC,4,201,29,8 EDITTEXT IDC_GENMENU_SERVICE,36,199,108,14,ES_AUTOHSCROLL | ES_READONLY LTEXT "Name:",IDC_STATIC,4,218,29,8 diff --git a/src/mir_app/src/menu_options.cpp b/src/mir_app/src/menu_options.cpp index ee60b96bc5..1fa1118f8c 100644 --- a/src/mir_app/src/menu_options.cpp +++ b/src/mir_app/src/menu_options.cpp @@ -263,7 +263,7 @@ class CGenMenuOptionsPage : public CDlgBase CCtrlListBox m_menuObjects; CCtrlTreeView m_menuItems; CCtrlCheck m_radio1, m_radio2, m_enableIcons; - CCtrlEdit m_customName, m_service; + CCtrlEdit m_customName, m_service, m_module; CCtrlButton m_btnInsSeparator, m_btnInsMenu, m_btnReset, m_btnSet, m_btnDefault; CCtrlBase m_warning; @@ -282,6 +282,7 @@ public: m_btnDefault(this, IDC_GENMENU_DEFAULT), m_customName(this, IDC_GENMENU_CUSTOMNAME), m_service(this, IDC_GENMENU_SERVICE), + m_module(this, IDC_GENMENU_MODULE), m_warning(this, IDC_NOTSUPPORTWARNING) { m_btnSet.OnClick = Callback(this, &CGenMenuOptionsPage::btnSet_Clicked); @@ -298,6 +299,7 @@ public: m_customName.SetSilent(); m_service.SetSilent(); + m_module.SetSilent(); } //---- init dialog ------------------------------------------- @@ -483,6 +485,7 @@ public: { m_customName.SetTextA(""); m_service.SetTextA(""); + m_module.SetTextA(""); m_btnInsMenu.Enable(false); m_btnDefault.Enable(false); @@ -512,6 +515,8 @@ public: m_service.SetTextA(szText); } + m_module.SetTextA(iod->pimi->mi.Module); + m_btnInsMenu.Enable(iod->pimi->mi.root == nullptr); m_btnDefault.Enable(mir_wstrcmp(iod->name, iod->defname) != 0); m_btnSet.Enable(true); diff --git a/src/mir_app/src/resource.h b/src/mir_app/src/resource.h index 938474c988..2258e90c4c 100644 --- a/src/mir_app/src/resource.h +++ b/src/mir_app/src/resource.h @@ -1,4 +1,4 @@ -//{{NO_DEPENDENCIES}} +//{{NO_DEPENDENCIES}} // Microsoft Visual C++ generated include file. // Used by resource.rc // @@ -33,7 +33,7 @@ #define IDI_INVISIBLE 130 #define IDI_NA 131 #define IDI_LOAD 132 -#define IDR_SRMM 133 +#define IDR_SRMM 133 #define IDD_OPT_SOUND 134 #define IDI_RECVMSG 136 #define IDI_URL 138 @@ -215,7 +215,7 @@ #define IDC_URLS 1037 #define IDC_COLORTEXT 1038 #define IDC_REPLY 1039 -#define IDC_TOOLBARTREE 1040 +#define IDC_TOOLBARTREE 1040 #define IDC_URL 1041 #define IDC_FONTGROUP 1042 #define IDC_BTN_RESET 1045 @@ -278,9 +278,9 @@ #define IDC_IMCHECK 1100 #define IDC_CHATCHECK 1101 #define IDC_CANBEHIDDEN 1102 -#define IDC_SPIN1 1103 -#define IDC_SEPARATOR 1104 -#define IDC_EDIT1 1105 +#define IDC_SPIN1 1103 +#define IDC_SEPARATOR 1104 +#define IDC_EDIT1 1105 #define IDC_BUILDTIME 1108 #define IDC_CREDITSFILE 1109 #define IDC_NUMBER 1113 @@ -549,6 +549,7 @@ #define IDC_DISABLEMENUICONS 1745 #define IDC_COMBO1 1746 #define IDC_LANGUAGES 1746 +#define IDC_GENMENU_MODULE 1747 #define IDC_EFFECT_COLOUR_TEXT1 1853 #define IDC_EFFECT_COLOUR_SPIN1 1854 #define IDC_EXTRAORDER 1889 @@ -593,9 +594,9 @@ // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 329 +#define _APS_NEXT_RESOURCE_VALUE 330 #define _APS_NEXT_COMMAND_VALUE 40018 -#define _APS_NEXT_CONTROL_VALUE 1747 +#define _APS_NEXT_CONTROL_VALUE 1748 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif -- cgit v1.2.3