summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-07-02 13:15:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-07-02 13:15:30 +0000
commit9238c4e3aa9df5d0726cf3a03e632bc3d3969711 (patch)
treee5d95695014b33a99e19c4b19472e9dc69db7c5d /plugins
parent2481102c6541df37a773569dd4d67b579f04d819 (diff)
two new flags of TMO_MenuItem:
- CMIF_SYSTEM: filters a menu item out of options' editor; - CMIF_UNMOVABLE: denies attempts to change the item's position; - CMIF_SYSTEM applied to frames' menu; - CMIF_UNMOVABLE applied to Jabber protocol menu items; git-svn-id: http://svn.miranda-ng.org/main/trunk@14468 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp12
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp14
2 files changed, 11 insertions, 15 deletions
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 23f7be034e..000c96ad02 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -771,7 +771,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
mi.root = root;
mi.position = popuppos++;
mi.name.a = LPGEN("&Visible");
- mi.flags = CMIF_CHECKED;
+ mi.flags = CMIF_SYSTEM | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
fmh.MIVisible = addFrameMenuItem(&mi, frameid, bMain);
@@ -795,13 +795,13 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
// floating
mi.position = popuppos++;
mi.name.a = LPGEN("&Floating mode");
- mi.flags = 0;
+ mi.flags = CMIF_SYSTEM;
mi.pszService = "Set_Floating";
fmh.MIFloating = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
mi.name.a = LPGEN("&Border");
- mi.flags = CMIF_CHECKED;
+ mi.flags = CMIF_SYSTEM | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
fmh.MIBorder = addFrameMenuItem(&mi, frameid, bMain);
@@ -810,7 +810,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
// alignment root
mi.position = popuppos++;
mi.name.a = LPGEN("&Align");
- mi.flags = 0;
+ mi.flags = CMIF_SYSTEM;
mi.pszService = NULL;
fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain);
@@ -1498,7 +1498,7 @@ static int CLUIFramesLoadMainMenu()
int separator = 3000200000;
for (int i = 0; i < g_nFramesCount; i++) {
mi.hIcolibItem = g_pfwFrames[i].TitleBar.hicon;
- mi.flags = CMIF_TCHAR;
+ mi.flags = CMIF_SYSTEM | CMIF_TCHAR;
mi.position = separator++;
mi.name.t = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
mi.pszService = 0;
@@ -1512,7 +1512,7 @@ static int CLUIFramesLoadMainMenu()
// create "show all frames" menu
mi.hIcolibItem = NULL;
- mi.flags = 0;
+ mi.flags = CMIF_SYSTEM;
mi.position = separator++;
mi.name.a = LPGEN("Show all frames");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMES;
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index 7d8c2a83dc..84c4390de9 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -587,7 +587,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
mi.root = root;
mi.position = popuppos++;
mi.name.a = LPGEN("&FrameTitle");
- mi.flags = CMIF_GRAYED;
+ mi.flags = CMIF_SYSTEM | CMIF_GRAYED;
fmh.MITitle = addFrameMenuItem(&mi, frameid, bMain);
popuppos += 100000;
@@ -595,13 +595,12 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
mi.hIcolibItem = NULL;
mi.position = popuppos++;
mi.name.a = LPGEN("&Visible");
- mi.flags = CMIF_CHECKED;
+ mi.flags = CMIF_SYSTEM | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
fmh.MIVisible = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
mi.name.a = LPGEN("&Show title bar");
- mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
fmh.MITBVisible = addFrameMenuItem(&mi, frameid, bMain);
@@ -609,20 +608,18 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
mi.position = popuppos++;
mi.name.a = LPGEN("&Locked");
- mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
fmh.MILock = addFrameMenuItem(&mi, frameid, bMain);
mi.position = popuppos++;
mi.name.a = LPGEN("&Collapsed");
- mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
fmh.MIColl = addFrameMenuItem(&mi, frameid, bMain);
// floating
mi.position = popuppos++;
mi.name.a = LPGEN("&Floating mode");
- mi.flags = 0;
+ mi.flags = CMIF_SYSTEM;
mi.pszService = "Set_Floating";
fmh.MIFloating = addFrameMenuItem(&mi, frameid, bMain);
@@ -630,7 +627,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
mi.position = popuppos++;
mi.name.a = LPGEN("&Border");
- mi.flags = CMIF_CHECKED;
+ mi.flags = CMIF_SYSTEM | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
fmh.MIBorder = addFrameMenuItem(&mi, frameid, bMain);
@@ -638,7 +635,6 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
mi.position = popuppos++;
mi.name.a = LPGEN("&Skinned frame");
- mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETSKINNED;
fmh.MISkinned = addFrameMenuItem(&mi, frameid, bMain);
@@ -648,7 +644,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
mi.root = root;
mi.position = popuppos++;
mi.name.a = LPGEN("&Align");
- mi.flags = 0;
+ mi.flags = CMIF_SYSTEM;
mi.pszService = NULL;
fmh.MIAlignRoot = addFrameMenuItem(&mi, frameid, bMain);