Changeset 2692
- Timestamp:
- Feb 13, 2017, 12:21:04 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/netlabs/macros/newmenu.e ¶
r2685 r2692 182 182 call SetAVar( 'mid_search' , 3) 183 183 call SetAVar( 'mid_view' , 5) 184 184 ; call SetAVar( 'mid_options', 4) 185 185 call SetAVar( 'mid_run' , 0) -- i = 101...199 are used for menuitem ids 186 186 ; call SetAVar( 'mid_project', GetUniqueMid()) -- submenu replaced by the current selected project's submenu, e.g. 'TeX' … … 275 275 kdiff3found = 1 -- File found 276 276 endif 277 278 ; ---------------------------------------------------------------------------279 ; Called by defc Link, if defined.280 ; Hide some NewMenu items before linking several external menu additions.281 defproc BeforeLink282 universal MenuItemsHidden283 modulename = arg(1)284 if not isadefc( 'HideMenuItems') then285 return286 elseif MenuItemsHidden <> 0 then -- 0 means: not hidden287 return -- 1 means: already hidden before288 endif289 290 -- KenHTepm.ex uses too many menu items, together with Newmenu.291 -- EPM has a limit at about 600 items. KenHTepm uses already 290 of them!292 -- Therefore Newmenu's Options menu is deleted before linking.293 294 p2 = lastpos( '\', modulename)295 name = upcase( substr( modulename, p2 + 1)) -- strip path296 297 -- Provide array vars to specify ExFile names with huge menus, in order to298 -- let the user change the list. Match an abbreviation.299 HideList = upcase( GetAVar( 'hidemenunames'))300 NoHideList = upcase( GetAVar( 'nohidemenunames'))301 fHide = 0302 do w = 1 to words( HideList)303 next = word( HideList, w)304 -- Todo: replace abbrev with resolving wildcards305 if abbrev( name, next) then306 fHide = 1307 leave308 endif309 enddo310 if fHide then311 do w = 1 to words( NoHideList)312 next = word( NoHideList, w)313 -- Todo: replace abbrev with resolving wildcards314 if abbrev( name, next) then315 fHide = 0316 leave317 endif318 enddo319 endif320 321 if fHide & MenuItemsHidden <> 1 then322 'HideMenuItems'323 MenuItemsHidden = 2 -- 2 means: just hidden324 endif325 326 ; ---------------------------------------------------------------------------327 ; Called by defc Link, if defined.328 ; Used to check if the linking was successful. If not, unhide the menu items.329 defproc AfterLink330 universal MenuItemsHidden331 universal loadstate332 linkrc = arg(1)333 if MenuItemsHidden = '' then334 'HideMenuItems INIT'335 endif336 -- Restore Options menu if kenHTepm wasn't linked337 if not isadefc( 'HideMenuItems') then338 return339 elseif MenuItemsHidden <> 2 then -- 2 means: just hidden340 return -- 1 means: already hidden before -> ignore341 endif342 -- reset var from 2 to 1343 if MenuItemsHidden = 2 then344 MenuItemsHidden = 1345 if loadstate = 0 then346 'postme HideMenuItemsMsgBox'347 else348 'AtStartup postme HideMenuItemsMsgBox'349 endif350 endif351 -- unhide if not linked352 if linkrc < 0 then353 'HideMenuItems 0'354 endif355 356 ; ---------------------------------------------------------------------------357 defc HideMenuItemsMsgBox358 Title = 'Hidden menu items'359 Text = ''360 Text = Text || 'Due to a bug in EPM, some of its menu items in the "View" and "Options"'361 Text = Text || ' submenu had to make hidden in order to add the additional submenu, that'362 Text = Text || ' you have selected to load. EPM has a limit of about 600 menu items,'363 Text = Text || ' more make EPM crash.'\n\n364 Text = Text || 'In order to unhide them, uncheck'\n\n365 Text = Text || \9'View -> Menu ->'\n366 Text = Text || \9'Hide Options and View menu items'\n\n367 Text = Text || 'and maybe unlink the additional package.'\n\n368 Text = Text || 'Alternatively you may want to select another menu than Newmenu, that'369 Text = Text || ' uses less menu items by itself. Therefore use'\n\n370 Text = Text || \9'View -> Menu ->'\n371 Text = Text || \9'Select menu...'372 Style = MB_ENTER+MB_INFORMATION+MB_MOVEABLE373 ret = winmessagebox( Title,374 Text,375 Style)376 377 ; ---------------------------------------------------------------------------378 ; KenHTepm.ex uses too many menu items, together with Newmenu. The same379 ; applies to HTMLTAGS.EX.380 ; EPM has a limit at about 600 items. KenHTepm uses already 290 of them!381 ; Therefore Newmenu's Options menu items and some of the View menu items382 ; can be deleted before linking these .ex files.383 defc HideMenuItems384 universal defaultmenu385 universal nepmd_hini386 universal menuloaded -- for to check if menu is already built387 universal MenuItemsHidden388 389 KeyPath = '\NEPMD\User\Menu\HideItems'390 391 arg1 = upcase( arg(1))392 if arg1 = 'INIT' then393 MenuItemsHidden = (NepmdQueryConfigValue( nepmd_hini, KeyPath) = 1)394 return rc395 elseif arg1 = 'TOGGLE' then396 new = not (MenuItemsHidden = 1)397 elseif wordpos( arg1, '0 OFF') then398 new = 0399 else400 new = 1401 endif402 403 if new = MenuItemsHidden then -- nothing to do404 return rc405 endif406 407 MenuItemsHidden = new408 409 -- Save new value to ini410 NepmdWriteConfigValue( nepmd_hini, KeyPath, MenuItemsHidden)411 412 if MenuItemsHidden then413 -- Delete some menu items414 mid = GetAVar( 'mid_view')415 deletemenu defaultmenu, mid, 0, 1416 call add_view_menu()417 418 mid = GetAVar( 'mid_options')419 deletemenu defaultmenu, mid, 0, 1420 call add_options_menu()421 422 else423 -- Better get rid of all added menus and rebuild the entire menu424 deletemenu defaultmenu425 'LoadDefaultMenu'426 endif427 428 -- Show menu and add cascade menu item styles.429 -- (After processing showmenu, the cascade menu defs must always be reapplied.)430 call showmenu_activemenu()431 277 432 278 ; --------------------------------------------------------------------------- … … 449 295 universal defaultmenu 450 296 universal menuloaded -- for to check if menu is already built 451 universal MenuItemsHidden452 297 universal nepmd_hini 453 298 … … 457 302 defaultmenu = menuname -- default menu name 458 303 activemenu = defaultmenu 459 endif460 461 if MenuItemsHidden = '' then462 'HideMenuItems INIT'463 304 endif 464 305 … … 469 310 call add_search_menu() -- id = 3 470 311 call add_view_menu() -- id = 5 471 call add_options_menu() -- id = 4312 ; call add_options_menu() -- id = 4 472 313 ; call add_command_menu() -- replaced with add_run_menu 473 314 call add_run_menu() -- id = 0 (menuitem ids = 1xx) … … 979 820 '') 980 821 822 DefMenuSep() -------------------- 823 824 DefMenuItem( 'preferences', -- Preferences... 825 'Pre~ferences...', 826 'PrefsPopupMenu', 827 'Menus related to global and default editor settings', 828 '') 981 829 return 982 830 … … 1800 1648 defproc add_view_menu() 1801 1649 universal NoDismiss 1802 universal MenuItemsHidden1803 1650 1804 1651 DefSubMenu( 'view', -- View ------------ … … 1806 1653 'Menus related to views, cursor pos and windows', 1807 1654 '') 1808 DefNextItemStartsSubMenu()1809 DefMenuItem( 'menu', -- Menu >1810 'M~enu',1811 '',1812 '',1813 '')1814 DefMenuItem( '', -- Select menu1815 'Select ~menu...',1816 'ChangeMenu',1817 'Open a listbox and change or refresh the menu',1818 '')1819 DefMenuItem( 'nodismiss', -- Nodismiss menus1820 '~Nodismiss menus',1821 'toggle_nodismiss',1822 'Keep menu open after selecting menu items',1823 '',1824 NoDismiss)1825 DefMenuSep() --------------------1826 1827 DefNextItemEndsSubMenu()1828 DefMenuItem( 'hidemenuitems', -- Hide Options and View menu items1829 'Hide ~Options and View menu items',1830 'HideMenuItems TOGGLE',1831 'Required to add menus like HTMLTAGS',1832 '')1833 if not MenuItemsHidden then1834 DefNextItemStartsSubMenu()1835 DefMenuItem( 'infobars', -- Info bars >1836 '~Info bars',1837 '',1838 '',1839 '')1840 DefMenuItem( 'showlongname', -- Show .LONGNAME1841 'Show .~LONGNAME',1842 'toggle_longname',1843 'Show .LONGNAME EA as filename in titlebar',1844 '',1845 NoDismiss)1846 DefMenuItem( 'messageline', -- Message line1847 MSG_LINE_MENU__MSG,1848 'toggleframe 2',1849 MSG_LINE_MENUP__MSG,1850 HP_FRAME_MESSAGE,1851 NoDismiss)1852 DefMenuItem( 'statusbar', -- Status bar1853 'Status ~bar',1854 'toggleframe 1',1855 STATUS_LINE_MENUP__MSG,1856 HP_FRAME_STATUS,1857 NoDismiss)1858 DefMenuItem( 'infoattop', -- Info at top1859 INFOATTOP_MENU__MSG,1860 'toggleframe 32',1861 INFOATTOP_MENUP__MSG,1862 HP_FRAME_EXTRAPOS,1863 NoDismiss)1864 DefMenuItem( 'prompting', -- Prompting1865 PROMPTING_MENU__MSG,1866 'toggleprompt',1867 PROMPTING_MENUP__MSG,1868 HP_FRAME_PROMPT,1869 NoDismiss)1870 DefMenuSep() --------------------1871 1872 DefMenuItem( '', -- Configure title bar...1873 'Configure ~title bar...',1874 'ConfigInfoLine TITLE',1875 'Change layout of titletext',1876 '')1877 DefMenuItem( '', -- Configure status bar...1878 'Configure status ~bar...',1879 'ConfigInfoLine STATUS',1880 'Change layout of status bar',1881 '')1882 DefNextItemEndsSubMenu()1883 DefMenuItem( '', -- Configure separator...1884 'Configure ~separator...',1885 'ConfigInfoLine SEP',1886 'Change layout of separator for title and status bar',1887 '')1888 DefNextItemStartsSubMenu()1889 DefMenuItem( 'toolbar', -- Toolbar >1890 '~Toolbar',1891 '',1892 '',1893 '')1894 DefMenuItem( 'toolbarenabled', -- Enabled1895 '~Enabled',1896 'toggle_toolbar',1897 TOGGLETOOLBAR_MENUP__MSG,1898 HP_TOOLBAR_TOGGLE,1899 NoDismiss)1900 DefMenuItem( '', -- Select...1901 '~Select...',1902 'LoadToolbar',1903 'Open a listbox and load, reload or delete a toolbar',1904 '')1905 DefMenuSep() --------------------1906 1907 DefNextItemStartsSubMenu()1908 DefMenuItem( 'toolbarstyle', -- Style >1909 'St~yle',1910 '',1911 'Configure toolbar style',1912 '')1913 DefMenuItem( 'toolbartext', -- Text1914 '~Text',1915 'toggle_toolbar_text',1916 'Show button text',1917 '',1918 NoDismiss)1919 DefMenuSep() --------------------1920 1921 DefMenuItem( 'toolbarautosize', -- Automatic size1922 '~Automatic size',1923 'toggle_toolbar_autosize',1924 'Adjust button sizes to the .bmp sizes',1925 '',1926 NoDismiss)1927 DefMenuItem( 'toolbarsize', -- Size: [26x26]...1928 '~Size: [x]...',1929 'ToolbarSize',1930 'Default = 26x26, add 4x4 to the .bmp size',1931 '')1932 DefNextItemEndsSubMenu()1933 DefMenuItem( 'toolbarscaling', -- Scaling: [and]1934 'S~caling: []',1935 'toggle_toolbar_scaling',1936 'In most cases "and" looks best',1937 '',1938 NoDismiss)1939 DefMenuSep() --------------------1940 1941 DefMenuItem( '', -- Save as...1942 'Save ~as...',1943 'SaveToolbar',1944 '',1945 '')1946 DefMenuSep() --------------------1947 1948 DefMenuItem( '', -- Import...1949 '~Import...',1950 'ImportToolbar',1951 '',1952 '')1953 DefNextItemEndsSubMenu()1954 DefMenuItem( '', -- Export...1955 'E~xport...',1956 'ExportToolbar',1957 '',1958 '')1959 DefNextItemStartsSubMenu()1960 DefMenuItem( 'backgroundbitmap', -- Background bitmap >1961 'Bac~kground bitmap',1962 '',1963 '',1964 '')1965 DefMenuItem( 'backgroundbitmapenabled', -- Enabled1966 '~Enabled',1967 'toggle_bitmap',1968 TOGGLEBITMAP_MENUP__MSG,1969 HP_FRAME_BITMAP,1970 NoDismiss)1971 DefNextItemEndsSubMenu()1972 DefMenuItem( '', -- Select...1973 '~Select...',1974 'SetBackgroundBitmap SELECT',1975 'Select a background bitmap',1976 '')1977 DefMenuItem( '', -- Color palette...1978 '~Color palette...',1979 'SelectColorPal',1980 'Modify EPM''s 16-color palette (e.g. used for highlighting)',1981 '')1982 endif -- not MenuItemsHidden1983 /*1984 -- With hidden menu items, the separator before Ring enabled is sometimes checked.1985 -- Therefore always use a new unique i for the items after the hidden ones:1986 i = GetAVar('mid_view2')'00'1987 */1988 DefMenuSep() --------------------1989 1990 1655 DefMenuItem( 'softwrap', -- Soft wrap 1991 1656 'Soft ~wrap', … … 2070 1735 2071 1736 return 2072 2073 ; -------------------------------------------------------------------------------------- Options ----------------------2074 defproc add_options_menu()2075 universal NoDismiss2076 universal MenuItemsHidden2077 2078 UserDir = Get_Env( 'NEPMD_USERDIR')2079 UserDirName = substr( UserDir, lastpos( '\', UserDir) + 1)2080 2081 DefSubMenu( 'options', -- Options ---------2082 OPTIONS_BAR__MSG,2083 'Menus related to global and default editor settings',2084 HP_OPTIONS)2085 2086 if MenuItemsHidden = 0 then2087 add_options_preferences()2088 add_options_edit()2089 add_options_save()2090 add_options_search()2091 add_options_macros()2092 endif -- not MenuItemsHidden2093 2094 DefMenuSep() --------------------2095 -- With hidden menu items, the following menu item has the text of the Edit menu item.2096 -- Always use the first available i for it to make it unique:2097 DefMenuItem( '', -- Default settings dialog...2098 '~Default settings dialog...',2099 'configdlg',2100 CONFIG_MENUP__MSG,2101 HP_OPTIONS_CONFIG)2102 if MenuItemsHidden = 0 then2103 if nodismiss > 0 then2104 DefMenuSep() --------------------2105 2106 DefMenuItem( '', -- Close menu2107 '~Close menu',2108 '',2109 '',2110 '')2111 endif -- nodismiss > 02112 endif -- not MenuItemsHidden2113 return2114 2115 defproc add_options_preferences2116 universal NoDismiss2117 universal WpsStarted2118 2119 DefNextItemStartsSubMenu()2120 DefMenuItem( '', -- Configuration presets >2121 'Con~figuration presets',2122 'Set basic configuration',2123 '',2124 '')2125 DefMenuItem( '', -- User, CUA2126 '~User, CUA',2127 'set_ConfigPreset user-cua',2128 'Reset to standard user settings with CUA keyset',2129 '')2130 DefMenuItem( '', -- Programmer, CUA (default)2131 '~Programmer, CUA (default)',2132 'set_ConfigPreset programmer-cua',2133 'Reset to programmer settings with CUA keyset',2134 '')2135 DefNextItemEndsSubMenu()2136 DefMenuItem( '', -- Programmer, standard EPM2137 'Programmer, standard ~EPM',2138 'set_ConfigPreset programmer-epm',2139 'Reset to standard EPM settings with line mode',2140 '')2141 DefNextItemStartsSubMenu()2142 DefMenuItem( 'modesettings', -- Modes >2143 'M~odes',2144 'Configure general mode settings',2145 '',2146 '')2147 DefMenuItem( 'defaultkeywordhighlighting', -- Keyword highlighting2148 'Keyword ~highlighting',2149 'toggle_default_highlight',2150 'Switch keyword highlighting on',2151 '',2152 NoDismiss)2153 DefMenuItem( 'defaultmatchchars', -- MatchChars: auto-add closing brackets2154 '~MatchChars: auto-add closing brackets',2155 'toggle_default_match_chars',2156 'Add closing bracket when typing opening one',2157 '',2158 NoDismiss)2159 DefMenuItem( 'defaultbalance', -- Balance: search opening bracket while typing2160 '~Balance: search opening bracket while typing',2161 'toggle_default_balance',2162 'Highlight opening bracket on typing the closing one',2163 '',2164 NoDismiss)2165 DefMenuSep() --------------------2166 2167 DefMenuItem( 'defaultsyntaxexpansion', -- Syntax expansion2168 '~Syntax expansion',2169 'toggle_default_expand',2170 'Let space and enter do syntax expansion',2171 '',2172 NoDismiss)2173 DefMenuItem( 'selectcodingstyle', -- Select coding style [] for mode CURMODE...2174 'Select ~coding style [] for mode #CURMODE#...',2175 'SelectCodingStyle',2176 'Select a previously defined coding style for current mode',2177 '')2178 DefMenuSep() --------------------2179 2180 DefMenuItem( 'autorefreshmodefiles', -- Auto-check mode files2181 '~Auto-check mode files',2182 'toggle_modefiles_autorefresh',2183 'Check for altered .hil/.ini files on file loading',2184 '',2185 NoDismiss)2186 DefMenuItem( 'checkmodefilesnow', -- Check mode files now for mode CURMODE2187 'Check mode files ~now for mode #CURMODE#',2188 'CheckModeFiles',2189 'Check for altered .hil/.ini files for current mode now',2190 '')2191 DefMenuItem( 'openmodedirs', -- Open mode files directories for mode CURMODE2192 'Open mode files ~directories for mode #CURMODE#',2193 'OpenModeDirs',2194 'Open dir(s) with .hil/.ini files',2195 '')2196 DefMenuSep() --------------------2197 2198 DefMenuItem( 'editprofile2', -- Edit PROFILE.ERX2199 'Edit ~PROFILE.ERX',2200 'e %NEPMD_USERDIR%\bin\profile.erx',2201 'Edit REXX configuration file',2202 '')2203 DefNextItemEndsSubMenu()2204 DefMenuItem( '', -- Edit MODECNF.E2205 'Edit ~MODECNF.E',2206 'EditCreateUserMacro modecnf.e',2207 'Edit modes configuration incl. syntax expansion',2208 '')2209 2210 ; Add Home key etc. here?2211 DefNextItemStartsSubMenu()2212 DefMenuItem( 'keyssettings', -- Keys >2213 '~Keys',2214 '',2215 'Configure key bindings',2216 '')2217 DefMenuItem( 'defaultstreammode', -- Stream mode2218 '~Stream mode',2219 'toggle_default_stream',2220 'Toggle between stream and line editing mode',2221 HP_OPTIONS_STREAM,2222 NoDismiss)2223 DefMenuSep() --------------------2224 2225 DefMenuItem( 'blockactionbaraccelerators', -- Block Alt+letter keys from jumping to menu bar2226 'Block Alt+le~tter keys from jumping to menu bar',2227 'accel_toggle',2228 'Enable for advanced mark operations (Ctrl+Alt works for menu)',2229 HP_OPTIONS_CUAACCEL,2230 NoDismiss)2231 DefMenuItem( 'blockleftaltkey', -- Block left Alt key from jumping to menu bar2232 'Block ~left Alt key from jumping to menu bar',2233 'toggle_block_left_alt_key',2234 'When enabled, use F10',2235 '',2236 NoDismiss)2237 DefMenuItem( 'blockrightaltkey', -- Block right Alt key from jumping to menu bar2238 'Block ~right Alt key from jumping to menu bar',2239 'toggle_block_right_alt_key',2240 'When enabled, use F10',2241 '',2242 NoDismiss)2243 DefMenuSep() --------------------2244 2245 DefMenuItem( 'keydefs', -- Keyset additions: []...2246 'Keyset ~additions: []...',2247 'SelectKeyDefs',2248 'Configure key def additions to the standard keyset',2249 '')2250 DefMenuSep() --------------------2251 2252 DefNextItemEndsSubMenu()2253 DefMenuItem( '', -- Edit STDKEYS.E2254 '~Edit STDKEYS.E',2255 'EditCreateUserMacro stdkeys.e',2256 'Edit entire set of key definitions',2257 '')2258 2259 DefNextItemStartsSubMenu()2260 DefMenuItem( 'markingsettings', -- Marking >2261 'Markin~g',2262 '',2263 '',2264 '')2265 DefMenuItem( 'advancedmarking', -- Advanced marking2266 '~Advanced marking',2267 'toggle_cua_mark',2268 ADVANCEDMARK_MENUP__MSG,2269 HP_OPTIONS_CUATOGGLE,2270 NoDismiss)2271 DefMenuItem( 'defaultpaste', -- Default paste: [char]2272 'Default ~paste: []',2273 'toggle_default_paste',2274 'Style for Sh+Ins/Alt+MB1, add Ctrl/Sh for alt. paste',2275 '',2276 NoDismiss)2277 DefMenuItem( 'shiftmarkextends', -- Sh-mark always extends mark2278 '~Sh-mark always extends mark',2279 'toggle_shift_mark_extends',2280 'Extend mark always or just at boundaries',2281 '',2282 NoDismiss)2283 DefMenuItem( 'mousestyle', -- Default mouse mark: [char]2284 'Default ~mouse mark: []',2285 'toggle_mousestyle',2286 'Mark style for MB1, use Ctrl+MB1 or MB3 for alt. mark',2287 '',2288 NoDismiss)2289 DefMenuItem( 'dragalwaysmarks', -- Drag always marks2290 '~Drag always marks',2291 'toggle_drag_always_marks',2292 'Every drag starts a new mark instead of a msg.',2293 '',2294 NoDismiss)2295 DefNextItemEndsSubMenu()2296 DefMenuItem( 'unmarkaftermove', -- Unmark after move2297 '~Unmark after move',2298 'toggle_unmark_after_move',2299 'Unmark after doing a move mark',2300 '',2301 NoDismiss)2302 2303 DefNextItemStartsSubMenu()2304 DefMenuItem( 'cursorsettings', -- Cursor >2305 'C~ursor',2306 'Cursor and scroll settings',2307 '',2308 HP_OPTIONS_PREFERENCES)2309 DefMenuItem( 'cursoreverywhere', -- Allow cursor everywhere2310 '~Allow cursor everywhere',2311 'toggle_cursor_everywhere',2312 'Cursor can be positioned after line end',2313 '',2314 NoDismiss)2315 DefMenuItem( 'keepcursoronscreen', -- Keep cursor on screen2316 '~Keep cursor on screen',2317 'toggle_keep_cursor_on_screen',2318 'Keep cursor visible on scroll bar scrolling',2319 '')2320 DefNextItemEndsSubMenu()2321 DefMenuItem( 'scrollafterlocate', -- Scroll after locate []...2322 '~Scroll after locate []...',2323 'SetScrollAfterLocate',2324 'View found string at a special v-pos.',2325 '',2326 NoDismiss)2327 2328 DefNextItemStartsSubMenu()2329 DefMenuItem( 'marginsandtabs', -- Margins and tabs >2330 'Margins and ~tabs',2331 'Default margins and tabs',2332 '',2333 '')2334 DefMenuItem( 'defaultmargins', -- Default margins...2335 'Default ~margins []...',2336 'DefaultMargins',2337 'Change default margins (see also MODECNF.E)',2338 '')2339 DefMenuItem( 'defaulttabs', -- Default tabs...2340 'Default ~tabs []...',2341 'DefaultTabs',2342 'Change default tabs (see also MODECNF.E)',2343 '')2344 DefMenuItem( 'defaulttabkey', -- Tabkey: Tab key enters tab char2345 'Tab~key: tab key enters tab char',2346 'toggle_default_tabkey',2347 'Tabkey enters a tab char instead of spaces',2348 '',2349 NoDismiss)2350 DefMenuItem( 'defaultmatchtab', -- Matchtab: tab stops at word boundaries of line above2351 '~Matchtab: tab stops at word boundaries of line above',2352 'toggle_default_matchtab',2353 'Tabkey goes to word boundaries of prev. line',2354 '',2355 NoDismiss)2356 DefNextItemEndsSubMenu()2357 DefMenuItem( 'showtabs', -- Show tab chars2358 '~Show tab chars',2359 'toggle_tabglyph',2360 'Show a circle for every tab char',2361 '',2362 NoDismiss)2363 2364 DefNextItemStartsSubMenu()2365 DefMenuItem( 'readonlyandlock', -- Read-only and lock >2366 '~Read-only and lock',2367 '',2368 '',2369 '')2370 DefMenuItem( 'respectreadonly', -- Respect read-only2371 '~Respect read-only',2372 'toggle_respect_readonly',2373 'Read-only file attribute disables edit mode',2374 '',2375 NoDismiss)2376 DefNextItemEndsSubMenu()2377 DefMenuItem( 'lockonmodify', -- Lock on modify2378 '~Lock on modify',2379 'toggle_lock_on_modify',2380 'Deny write access for other applications',2381 '',2382 NoDismiss)2383 2384 DefNextItemStartsSubMenu()2385 DefMenuItem( 'autorestore', -- Auto-restore >2386 '~Auto-restore',2387 '',2388 '',2389 '')2390 DefMenuItem( 'restorecursorpos', -- Restore cursor position2391 '~Restore cursor position',2392 'toggle_restore_pos',2393 'Restore of cursor pos. from file''s last save',2394 '',2395 NoDismiss)2396 DefMenuSep() --------------------2397 2398 DefMenuItem( 'trackhistorylists', -- Track additional history lists2399 '~Track additional history lists',2400 'Toggle_History',2401 'Enable edit, load and save history',2402 '',2403 NoDismiss)2404 DefMenuSep() --------------------2405 2406 DefMenuItem( 'autosavelastring', -- Auto-save last ring2407 'Auto-~save last ring',2408 'Toggle_Save_Ring',2409 'Save of ring on load and quit',2410 '',2411 NoDismiss)2412 DefMenuItem( 'maxfilessavering', -- Max. [] files for save ring...2413 'Max. [] files for save ring...',2414 'RingMaxFiles',2415 'Set limit of files to enable auto-save',2416 '')2417 DefNextItemEndsSubMenu()2418 DefMenuItem( 'autoloadlastring', -- Auto-load last ring2419 'Auto-~load last ring',2420 'Toggle_Restore_Ring',2421 'Restore of ring if EPM is started without args',2422 '',2423 NoDismiss)2424 DefNextItemStartsSubMenu()2425 DefMenuItem( 'backup', -- Backup >2426 '~Backup',2427 '',2428 '',2429 '')2430 DefMenuItem( 'autosaveenabled', -- Autosave2431 '~Autosave',2432 'toggle_autosave',2433 '',2434 '',2435 NoDismiss)2436 DefMenuItem( 'autosavenumdialog', -- After [] changes...2437 'After [] ~changes...',2438 'AutosaveNum',2439 '',2440 '')2441 DefMenuSep() --------------------2442 2443 DefMenuItem( 'backupenabled', -- Backup2444 '~Backup',2445 'toggle_backup',2446 '',2447 '')2448 DefMenuItem( 'backupnumdialog', -- Keep [] backups...2449 '~Keep [] backups...',2450 'BackupNum',2451 '',2452 '',2453 NoDismiss)2454 DefMenuSep() --------------------2455 2456 DefMenuItem( 'backupdirdialog', -- Directory: []...2457 '~Directory: []...',2458 'BackupDir',2459 '',2460 '')2461 DefMenuItem( 'backuplistdir', -- List directory2462 '~List directory',2463 'ListBackupDir',2464 '',2465 '')2466 DefNextItemEndsSubMenu()2467 DefMenuItem( 'backuplistfiles', -- List backups for current file2468 'List backups for current ~file',2469 'ListBackupDirCurrentFile',2470 '',2471 '')2472 2473 DefNextItemStartsSubMenu()2474 DefMenuItem( 'directories', -- Directories >2475 'Director~ies',2476 '',2477 '',2478 '')2479 DefNextItemStartsSubMenu()2480 DefMenuItem( 'workdir', -- Set work dir >2481 'Set ~work dir',2482 '',2483 '',2484 '')2485 DefMenuItem( 'workdirprogram', -- By program object2486 '~By program object',2487 'Set_ChangeWorkDir 0',2488 'This is EPM''s default',2489 '',2490 NoDismiss)2491 DefMenuItem( 'workdirprev', -- Use previous work dir2492 '~Use previous work dir',2493 'Set_ChangeWorkDir 1',2494 'Keep work dir across EPM sessions',2495 '',2496 NoDismiss)2497 DefMenuItem( 'workdirfile', -- To dir of selected file2498 'To dir of ~selected file',2499 'Set_ChangeWorkDir 2',2500 'Change to dir of current file',2501 '',2502 NoDismiss)2503 DefMenuSep() --------------------2504 2505 DefNextItemEndsSubMenu()2506 DefMenuItem( '', -- To...2507 '~To...',2508 'CDDlg',2509 'Show/change current work dir now',2510 '')2511 DefNextItemStartsSubMenu()2512 DefMenuItem( 'opendlgdir', -- Start Edit/Add file dialog at >2513 '~Start Edit/Add file dialog at',2514 '',2515 '',2516 '')2517 DefMenuItem( 'opendlgdirprev', -- Previous dir2518 '~Previous dir',2519 'set_OpenDlgDir 0',2520 'Start at dir from last Open dialog',2521 '',2522 NoDismiss)2523 DefMenuItem( 'opendlgdirwork', -- Work dir2524 '~Work dir',2525 'set_OpenDlgDir 1',2526 'Start at work dir',2527 '',2528 NoDismiss)2529 DefNextItemEndsSubMenu()2530 DefMenuItem( 'opendlgdirfile', -- Dir of current file2531 '~Dir of current file',2532 'set_OpenDlgDir 2',2533 'Start at dir of current file',2534 '',2535 NoDismiss)2536 DefNextItemStartsSubMenu()2537 DefMenuItem( 'saveasdlgdir', -- Start Save as dialog for .Untitled at >2538 'Start Save-~as dialog for .Untitled at',2539 '',2540 '',2541 '')2542 DefMenuItem( 'saveasdlgdirprev', -- Previous dir2543 '~Previous dir',2544 'set_SaveasDlgDir 0',2545 'Start at dir from last saved file',2546 '',2547 NoDismiss)2548 DefNextItemEndsSubMenu()2549 DefMenuItem( 'saveasdlgdirwork', -- Work dir2550 '~Work dir',2551 'set_SaveasDlgDir 1',2552 'Start at work dir',2553 '',2554 NoDismiss)2555 DefMenuSep() --------------------2556 2557 DefNextItemEndsSubMenu()2558 DefMenuItem( '', -- Edit EPM.ENV2559 'Edit ~EPM.ENV',2560 'EditCreateUserFile bin\epm.env',2561 'Edit environment file',2562 '')2563 if WpsStarted then2564 DefNextItemStartsSubMenu()2565 DefMenuItem( 'prg', -- Program objects >2566 '~Program objects',2567 '',2568 '',2569 '')2570 DefMenuItem( 'prgnewwindow', -- Open in same window2571 '~Open in same window (/r)',2572 'toggle_new_same_window',2573 'Open file objects in topmost EPM window',2574 '',2575 NoDismiss)2576 DefMenuItem( 'prgfullfiledialog', -- Use full file dialog2577 'Use full ~file dialog (/o)',2578 'toggle_full_file_dialog',2579 'Show file dialog instead of history lists',2580 '',2581 NoDismiss)2582 DefMenuItem( '', -- Set startup dir...2583 'Set ~startup dir...',2584 'StartupDirDlg',2585 'Select startup dir for several EPM objects',2586 '')2587 DefMenuItem( '', -- Set associations...2588 'Set ~associations...',2589 'SelectAssoc',2590 'Configure WPS associations for EPM objects',2591 '')2592 DefMenuSep() --------------------2593 2594 DefNextItemEndsSubMenu()2595 DefMenuItem( '', -- Edit list of objects2596 'Edit ~list of objects',2597 'EditCreateUserFile bin\objects.ini',2598 'Edit list with configurable program objects',2599 '')2600 endif -- WpsStarted2601 DefMenuSep() --------------------2602 2603 defproc add_options_edit2604 universal NoDismiss2605 2606 DefNextItemStartsSubMenu()2607 DefMenuItem( 'editoptions', -- Edit >2608 '~Edit []',2609 '',2610 'View/change default edit options',2611 '')2612 DefMenuItem( 'editoptions_b', --2613 '/~b'\9'search both: ring and disk*',2614 'seteditoptions /b',2615 '',2616 '',2617 NoDismiss)2618 DefMenuItem( 'editoptions_c', --2619 '/~c'\9'create a new file',2620 'seteditoptions /c',2621 '',2622 '',2623 NoDismiss)2624 DefMenuItem( 'editoptions_d', --2625 '/~d'\9'create new if on disk',2626 'seteditoptions /d',2627 '',2628 '',2629 NoDismiss)2630 DefMenuSep() --------------------2631 2632 DefMenuItem( 'editoptions_nt', --2633 '/~nt'\9'expand tabs (tabs = 8)',2634 'seteditoptions /nt',2635 '',2636 '',2637 NoDismiss)2638 DefMenuItem( 'editoptions_t', --2639 '/~t'\9'don''t expand tabs*',2640 'seteditoptions /t',2641 '',2642 '',2643 NoDismiss)2644 ; In EPM 6 there's no difference between /u and /l anymore.2645 ; EPM breaks lines at CRCRLF, CRLF, CR and LF, not dependent on /u or /l.2646 ; EPM adds CRLF when Enter is pressed. That can't be changed with an option.2647 ; /u and /l are senseless now.2648 ; Per default all line ends are kept as on file loading. Even 'unterminated'2649 ; is possible for the last line. (But it's not visible, if the last line is2650 ; terminated or not. EPM won't add a blank line, if the last line is terminated.)2651 ; Line ends can be forced to CRLF or CR on save. That applies also to the last line.2652 ; DefMenuSep() --------------------2653 ;2654 ; DefMenuItem( 'editoptions_u', --2655 ; '/~u'\9'Unix line end (LF)',2656 ; 'seteditoptions /u',2657 ; '',2658 ; '')2659 ; DefMenuItem( 'editoptions_l', --2660 ; '/~l'\9'DOS line end (CRLF)*',2661 ; 'seteditoptions /l',2662 ; '',2663 ; '')2664 DefMenuSep() --------------------2665 2666 DefMenuItem( '', --2667 ''\9'~Reset to initial default (*)',2668 'seteditoptions RESET',2669 '',2670 '')2671 DefNextItemEndsSubMenu()2672 DefMenuItem( '', --2673 ''\9'Sa~ve as default',2674 'seteditoptions SAVE',2675 '',2676 '')2677 2678 defproc add_options_save2679 universal NoDismiss2680 2681 DefNextItemStartsSubMenu()2682 DefMenuItem( 'saveoptions', -- Save >2683 'Sa~ve []',2684 '',2685 'View/change default save options',2686 '')2687 DefMenuItem( 'saveoptions_ns', --2688 '/ns'\9'~don''t strip spaces',2689 'setsaveoptions /ns',2690 '',2691 '',2692 NoDismiss)2693 DefMenuItem( 'saveoptions_s', --2694 '/~s'\9'strip trailing spaces*',2695 'setsaveoptions /s',2696 '',2697 '',2698 NoDismiss)2699 DefMenuSep() --------------------2700 2701 DefMenuItem( 'saveoptions_nt', --2702 '/nt'\9'don''t compress s~paces*',2703 'setsaveoptions /nt',2704 '',2705 '',2706 NoDismiss)2707 DefMenuItem( 'saveoptions_t', --2708 '/~t'\9'compress spaces to tabs (tabs = 8, buggy!)',2709 'setsaveoptions /t',2710 '',2711 '',2712 NoDismiss)2713 DefMenuSep() --------------------2714 2715 DefMenuItem( 'saveoptions_ne', --2716 '/~ne'\9'no file end char*',2717 'setsaveoptions /ne',2718 '',2719 '',2720 NoDismiss)2721 DefMenuItem( 'saveoptions_e', --2722 '/~e'\9'append a file end char',2723 'setsaveoptions /e',2724 '',2725 '',2726 NoDismiss)2727 DefMenuSep() --------------------2728 2729 DefMenuItem( 'saveoptions_a', --2730 ''\9'~auto-line-end (maybe mixed)',2731 'setsaveoptions /a',2732 '',2733 '',2734 NoDismiss)2735 DefMenuItem( 'saveoptions_o', --2736 '/~o'\9'force DOS line end (CRLF)*',2737 'setsaveoptions /o',2738 '',2739 '',2740 NoDismiss)2741 DefMenuItem( 'saveoptions_l', --2742 '/~l'\9'force Unix line end (LF)',2743 'setsaveoptions /l',2744 '',2745 '',2746 NoDismiss)2747 -- /u is the same as /l /ne2748 DefMenuSep() --------------------2749 2750 DefMenuItem( '', --2751 ''\9'Reset to initial ~default (*)',2752 'setsaveoptions RESET',2753 '',2754 '')2755 DefNextItemEndsSubMenu()2756 DefMenuItem( '', --2757 ''\9'Sa~ve as default',2758 'setsaveoptions SAVE',2759 '',2760 '')2761 2762 defproc add_options_search2763 universal NoDismiss2764 2765 DefNextItemStartsSubMenu()2766 DefMenuItem( 'searchoptions', -- Search >2767 '~Search []',2768 '',2769 'View/change default search options',2770 '')2771 DefMenuItem( 'searchoptions_+', --2772 '~+'\9'down: top to bottom*',2773 'setsearchoptions +',2774 '',2775 '',2776 NoDismiss)2777 DefMenuItem( 'searchoptions_-', --2778 '~-'\9'up: bottom to top',2779 'setsearchoptions -',2780 '',2781 '',2782 NoDismiss)2783 DefMenuSep() --------------------2784 2785 DefMenuItem( 'searchoptions_f', --2786 '~f'\9'foreward: left to right*',2787 'setsearchoptions f',2788 '',2789 '',2790 NoDismiss)2791 DefMenuItem( 'searchoptions_r', --2792 '~r'\9'reverse: right to left',2793 'setsearchoptions r',2794 '',2795 '',2796 NoDismiss)2797 DefMenuSep() --------------------2798 2799 DefMenuItem( 'searchoptions_u', --2800 ''\9'start at c~ursor*',2801 'setsearchoptions u',2802 '',2803 '',2804 NoDismiss)2805 DefMenuItem( 'searchoptions_t', --2806 '~t'\9'start at top of file',2807 'setsearchoptions t',2808 '',2809 '',2810 NoDismiss)2811 DefMenuItem( 'searchoptions_b', --2812 '~b'\9'start at bottom of file',2813 'setsearchoptions b',2814 '',2815 '',2816 NoDismiss)2817 DefMenuSep() --------------------2818 2819 DefMenuItem( 'searchoptions_a', --2820 '~a'\9'all: in the whole file*',2821 'setsearchoptions a',2822 '',2823 '',2824 NoDismiss)2825 DefMenuItem( 'searchoptions_m', --2826 '~m'\9'mark: in mark only',2827 'setsearchoptions m',2828 '',2829 '',2830 NoDismiss)2831 DefMenuSep() --------------------2832 2833 DefMenuItem( 'searchoptions_e', --2834 '~e'\9'case-sensitive',2835 'setsearchoptions e',2836 '',2837 '',2838 NoDismiss)2839 DefMenuItem( 'searchoptions_c', --2840 '~c'\9'ignore case*',2841 'setsearchoptions c',2842 '',2843 '',2844 NoDismiss)2845 DefMenuSep() --------------------2846 2847 DefMenuItem( 'searchoptions_i', --2848 ''\9'~including search*',2849 'setsearchoptions i',2850 '',2851 '',2852 NoDismiss)2853 DefMenuItem( 'searchoptions_^', -- options ~ and ^ are equivalent2854 '~^'\9'excluding search',2855 'setsearchoptions ^',2856 '',2857 '',2858 NoDismiss)2859 --------------------------2860 DefMenuItem( 'searchoptions_h', --2861 ''\9'c~hars*',2862 'setsearchoptions h',2863 '',2864 '',2865 'BREAKSEPARATOR' NoDismiss)2866 DefMenuItem( 'searchoptions_g', --2867 '~g'\9'grep',2868 'setsearchoptions g',2869 '',2870 '',2871 NoDismiss)2872 DefMenuItem( 'searchoptions_x', --2873 '~x'\9'egrep',2874 'setsearchoptions x',2875 '',2876 '',2877 NoDismiss)2878 DefMenuItem( 'searchoptions_w', --2879 '~w'\9'words',2880 'setsearchoptions w',2881 '',2882 '',2883 NoDismiss)2884 DefMenuSep() --------------------2885 2886 DefMenuItem( 'searchoptions_p', --2887 ''\9'change: re~place sets case*',2888 'setsearchoptions p',2889 '',2890 '',2891 NoDismiss)2892 DefMenuItem( 'searchoptions_k', --2893 '~k'\9'change: keep case of search',2894 'setsearchoptions k',2895 '',2896 '',2897 NoDismiss)2898 DefMenuSep() --------------------2899 2900 DefMenuItem( 'searchoptions_1', --2901 ''\9'change ~1 only*',2902 'setsearchoptions 1',2903 '',2904 '',2905 NoDismiss)2906 DefMenuItem( 'searchoptions_*', --2907 '~*'\9'change all',2908 'setsearchoptions *',2909 '',2910 '',2911 NoDismiss)2912 DefMenuSep() --------------------2913 2914 DefMenuItem( 'searchoptions_q', --2915 ''\9'change: ~quiet*',2916 'setsearchoptions q',2917 '',2918 '')2919 DefMenuItem( 'searchoptions_n', --2920 '~n'\9'change: msg how many changes',2921 'setsearchoptions n',2922 '',2923 '')2924 DefMenuSep() --------------------2925 2926 DefMenuItem( '', --2927 ''\9'Reset to initial ~default (*)',2928 'setsearchoptions RESET',2929 '',2930 '')2931 DefNextItemEndsSubMenu()2932 DefMenuItem( '', --2933 ''\9'Sa~ve as default',2934 'setsearchoptions SAVE',2935 '',2936 '')2937 DefMenuSep() --------------------2938 2939 defproc add_options_macros2940 universal NoDismiss2941 2942 UserDir = Get_Env( 'NEPMD_USERDIR')2943 UserDirName = substr( UserDir, lastpos( '\', UserDir) + 1)2944 2945 DefNextItemStartsSubMenu()2946 DefMenuItem( 'macros', -- Macros >2947 '~Macros',2948 '',2949 'Compile EPM macro files',2950 '')2951 DefMenuItem( '', -- Recompile new user macros2952 '~Recompile new user macros',2953 'RecompileNew',2954 'Recompile all new user macros and maybe restart EPM',2955 '')2956 DefMenuItem( '', -- Check user macros2957 'Chec~k user macros',2958 'RecompileNew CHECKONLY',2959 'Check your EPM macros for outdated/changed files',2960 '')2961 DefMenuSep() --------------------2962 2963 DefMenuItem( '', -- Compile current .E file2964 '~Compile current .E file',2965 'etpm =',2966 'Compile current macro file',2967 '')2968 DefMenuItem( '', -- Relink current .E file2969 'Re~link current .E file',2970 'relink',2971 'Compile current macro file, unlink and link it',2972 '')2973 DefMenuSep() --------------------2974 2975 DefMenuItem( 'editprofile', -- Edit PROFILE.ERX2976 'Edit ~PROFILE.ERX',2977 'e %NEPMD_USERDIR%\bin\profile.erx',2978 'Edit or create REXX configuration file',2979 '')2980 DefMenuItem( 'activateprofile', -- Activate PROFILE.ERX2981 '~Activate PROFILE.ERX',2982 'toggle_profile',2983 'Activate REXX configuration file',2984 '',2985 NoDismiss)2986 DefMenuItem( 'editmycnf', -- Edit MYCNF.E2987 'Edit MYC~NF.E',2988 'e %NEPMD_USERDIR%\macros\mycnf.e',2989 'Edit or create E const configuration file',2990 '')2991 DefMenuItem( 'editmystuff', -- Edit MYSTUFF.E2992 'Edit MY~STUFF.E',2993 'e %NEPMD_USERDIR%\macros\mystuff.e',2994 'Edit or create E macro additions',2995 '')2996 DefMenuSep() --------------------2997 2998 DefMenuItem( '', -- Open NETLABS\MACROS\*.E2999 'Open ~NETLABS\MACROS\*.E',3000 'o %NEPMD_ROOTDIR%\netlabs\macros\*.e',3001 '',3002 '')3003 DefMenuItem( '', -- Open MYEPM\MACROS\*.E3004 'Open 'upcase(UserDirName)'\MACROS\*.~E',3005 'o %NEPMD_USERDIR%\macros\*.e',3006 '',3007 '')3008 DefMenuSep() --------------------3009 3010 DefNextItemEndsSubMenu()3011 DefMenuItem( '', -- Open NEPMD.INI3012 'Open NEPMD.~INI',3013 'rx open %NEPMD_USERDIR%\bin\nepmd.ini',3014 '',3015 '')3016 1737 3017 1738 ; -------------------------------------------------------------------------------------- Run -------------------------- … … 3185 1906 '') 3186 1907 */ 1908 DefMenuSep() -------------------- 1909 1910 /* 1911 defproc add_options_macros 1912 universal NoDismiss 1913 */ 1914 UserDir = Get_Env( 'NEPMD_USERDIR') 1915 UserDirName = substr( UserDir, lastpos( '\', UserDir) + 1) 1916 1917 DefNextItemStartsSubMenu() 1918 DefMenuItem( 'macros', -- Macros > 1919 '~Macros', 1920 '', 1921 'Compile EPM macro files', 1922 '') 1923 1924 DefMenuItem( '', -- Recompile new user macros 1925 '~Recompile new user macros', 1926 'RecompileNew', 1927 'Recompile all new user macros and maybe restart EPM', 1928 '') 1929 DefMenuItem( '', -- Check user macros 1930 'Chec~k user macros', 1931 'RecompileNew CHECKONLY', 1932 'Check your EPM macros for outdated/changed files', 1933 '') 1934 DefMenuSep() -------------------- 1935 1936 DefMenuItem( '', -- Compile current .E file 1937 '~Compile current .E file', 1938 'etpm =', 1939 'Compile current macro file', 1940 '') 1941 DefMenuItem( '', -- Relink current .E file 1942 'Re~link current .E file', 1943 'relink', 1944 'Compile current macro file, unlink and link it', 1945 '') 1946 DefMenuSep() -------------------- 1947 1948 DefMenuItem( 'editprofile', -- Edit PROFILE.ERX 1949 'Edit ~PROFILE.ERX', 1950 'e %NEPMD_USERDIR%\bin\profile.erx', 1951 'Edit or create REXX configuration file', 1952 '') 1953 DefMenuItem( 'activateprofile', -- Activate PROFILE.ERX 1954 '~Activate PROFILE.ERX', 1955 'toggle_profile', 1956 'Activate REXX configuration file', 1957 '', 1958 NoDismiss) 1959 DefMenuItem( 'editmycnf', -- Edit MYCNF.E 1960 'Edit MYC~NF.E', 1961 'e %NEPMD_USERDIR%\macros\mycnf.e', 1962 'Edit or create E const configuration file', 1963 '') 1964 DefMenuItem( 'editmystuff', -- Edit MYSTUFF.E 1965 'Edit MY~STUFF.E', 1966 'e %NEPMD_USERDIR%\macros\mystuff.e', 1967 'Edit or create E macro additions', 1968 '') 1969 DefMenuSep() -------------------- 1970 1971 DefMenuItem( '', -- Open NETLABS\MACROS\*.E 1972 'Open ~NETLABS\MACROS\*.E', 1973 'o %NEPMD_ROOTDIR%\netlabs\macros\*.e', 1974 '', 1975 '') 1976 DefMenuItem( '', -- Open MYEPM\MACROS\*.E 1977 'Open 'upcase(UserDirName)'\MACROS\*.~E', 1978 'o %NEPMD_USERDIR%\macros\*.e', 1979 '', 1980 '') 1981 DefMenuSep() -------------------- 1982 1983 DefNextItemEndsSubMenu() 1984 DefMenuItem( '', -- Open NEPMD.INI 1985 'Open NEPMD.~INI', 1986 'rx open %NEPMD_USERDIR%\bin\nepmd.ini', 1987 '', 1988 '') 1989 3187 1990 return 3188 1991 … … 3361 2164 return 3362 2165 2166 ; -------------------------------------------------------------------------------------- Preferences ------------------ 2167 defc PrefsPopupMenu 2168 universal activemenu 2169 universal NoDismiss 2170 2171 menuname = 'prefspopup' -- 'preferences' is already used by the edit menu item 2172 activemenu = menuname 2173 2174 deletemenu menuname, 0, 0, 0 2175 2176 DefSubMenu( menuname, '') 2177 2178 add_prefs_editing() 2179 add_prefs_filesystem() 2180 add_prefs_startup() 2181 add_prefs_appearance() 2182 if NoDismiss > 0 then 2183 DefMenuSep() -------------------- 2184 2185 DefMenuItem( '', -- Close menu 2186 '~Close menu', 2187 '', 2188 '', 2189 '') 2190 endif -- nodismiss > 0 2191 2192 showmenu menuname, 1 -- 0 = standard menu (default for missing parameter), 1 = popup menu, 2 = undefined, 3 = UC menu (toolbar) 2193 2194 -- Popup menu: Only menuinits for the first level have to be executed 2195 -- additionally. The others are executed when their submenu item is 2196 -- selected. 2197 'postme menuinit_prefspopup' -- postme required 2198 2199 ; --------------------------------------------------------------------------- 2200 defproc add_prefs_editing 2201 universal NoDismiss 2202 universal WpsStarted 2203 2204 DefNextItemStartsSubMenu() 2205 DefMenuItem( '', -- Configuration presets > 2206 'Con~figuration presets', 2207 'Set basic configuration', 2208 '', 2209 '', 2210 NoDismiss) 2211 DefMenuItem( '', -- User, CUA 2212 '~User, CUA', 2213 'set_ConfigPreset user-cua', 2214 'Reset to standard user settings with CUA keyset', 2215 '', 2216 NoDismiss) 2217 DefMenuItem( '', -- Programmer, CUA (default) 2218 '~Programmer, CUA (default)', 2219 'set_ConfigPreset programmer-cua', 2220 'Reset to programmer settings with CUA keyset', 2221 '', 2222 NoDismiss) 2223 DefNextItemEndsSubMenu() 2224 DefMenuItem( '', -- Programmer, standard EPM 2225 'Programmer, standard ~EPM', 2226 'set_ConfigPreset programmer-epm', 2227 'Reset to standard EPM settings with line mode', 2228 '', 2229 NoDismiss) 2230 ; Add Home key etc. here? 2231 DefNextItemStartsSubMenu() 2232 DefMenuItem( 'keyssettings', -- Keys > 2233 '~Keys', 2234 '', 2235 'Configure key bindings', 2236 '', 2237 NoDismiss) 2238 DefMenuItem( 'defaultstreammode', -- Stream mode 2239 '~Stream mode', 2240 'toggle_default_stream', 2241 'Toggle between stream and line editing mode', 2242 HP_OPTIONS_STREAM, 2243 NoDismiss) 2244 DefMenuSep() -------------------- 2245 2246 DefMenuItem( 'blockactionbaraccelerators', -- Block Alt+letter keys from jumping to menu bar 2247 'Block Alt+le~tter keys from jumping to menu bar', 2248 'accel_toggle', 2249 'Enable for advanced mark operations (Ctrl+Alt works for menu)', 2250 HP_OPTIONS_CUAACCEL, 2251 NoDismiss) 2252 DefMenuItem( 'blockleftaltkey', -- Block left Alt key from jumping to menu bar 2253 'Block ~left Alt key from jumping to menu bar', 2254 'toggle_block_left_alt_key', 2255 'When enabled, use F10', 2256 '', 2257 NoDismiss) 2258 DefMenuItem( 'blockrightaltkey', -- Block right Alt key from jumping to menu bar 2259 'Block ~right Alt key from jumping to menu bar', 2260 'toggle_block_right_alt_key', 2261 'When enabled, use F10', 2262 '', 2263 NoDismiss) 2264 DefMenuSep() -------------------- 2265 2266 DefMenuItem( 'keydefs', -- Keyset additions: []... 2267 'Keyset ~additions: []...', 2268 'SelectKeyDefs', 2269 'Configure key def additions to the standard keyset', 2270 '', 2271 NoDismiss) 2272 DefMenuSep() -------------------- 2273 2274 DefNextItemEndsSubMenu() 2275 DefMenuItem( '', -- Edit STDKEYS.E 2276 '~Edit STDKEYS.E', 2277 'EditCreateUserMacro stdkeys.e', 2278 'Edit entire set of key definitions', 2279 '', 2280 NoDismiss) 2281 2282 DefNextItemStartsSubMenu() 2283 DefMenuItem( 'markingsettings', -- Marking > 2284 'Markin~g', 2285 '', 2286 '', 2287 '', 2288 NoDismiss) 2289 DefMenuItem( 'advancedmarking', -- Advanced marking 2290 '~Advanced marking', 2291 'toggle_cua_mark', 2292 ADVANCEDMARK_MENUP__MSG, 2293 HP_OPTIONS_CUATOGGLE, 2294 NoDismiss) 2295 DefMenuItem( 'defaultpaste', -- Default paste: [char] 2296 'Default ~paste: []', 2297 'toggle_default_paste', 2298 'Style for Sh+Ins/Alt+MB1, add Ctrl/Sh for alt. paste', 2299 '', 2300 NoDismiss) 2301 DefMenuItem( 'shiftmarkextends', -- Sh-mark always extends mark 2302 '~Sh-mark always extends mark', 2303 'toggle_shift_mark_extends', 2304 'Extend mark always or just at boundaries', 2305 '', 2306 NoDismiss) 2307 DefMenuItem( 'mousestyle', -- Default mouse mark: [char] 2308 'Default ~mouse mark: []', 2309 'toggle_mousestyle', 2310 'Mark style for MB1, use Ctrl+MB1 or MB3 for alt. mark', 2311 '', 2312 NoDismiss) 2313 DefMenuItem( 'dragalwaysmarks', -- Drag always marks 2314 '~Drag always marks', 2315 'toggle_drag_always_marks', 2316 'Every drag starts a new mark instead of a msg.', 2317 '', 2318 NoDismiss) 2319 DefNextItemEndsSubMenu() 2320 DefMenuItem( 'unmarkaftermove', -- Unmark after move 2321 '~Unmark after move', 2322 'toggle_unmark_after_move', 2323 'Unmark after doing a move mark', 2324 '', 2325 NoDismiss) 2326 2327 DefNextItemStartsSubMenu() 2328 DefMenuItem( 'cursorsettings', -- Cursor > 2329 'C~ursor', 2330 'Cursor and scroll settings', 2331 '', 2332 HP_OPTIONS_PREFERENCES, 2333 NoDismiss) 2334 DefMenuItem( 'cursoreverywhere', -- Allow cursor everywhere 2335 '~Allow cursor everywhere', 2336 'toggle_cursor_everywhere', 2337 'Cursor can be positioned after line end', 2338 '', 2339 NoDismiss) 2340 DefMenuItem( 'keepcursoronscreen', -- Keep cursor on screen 2341 '~Keep cursor on screen', 2342 'toggle_keep_cursor_on_screen', 2343 'Keep cursor visible on scroll bar scrolling', 2344 '') 2345 DefNextItemEndsSubMenu() 2346 DefMenuItem( 'scrollafterlocate', -- Scroll after locate []... 2347 '~Scroll after locate []...', 2348 'SetScrollAfterLocate', 2349 'View found string at a special v-pos.', 2350 '', 2351 NoDismiss) 2352 2353 DefNextItemStartsSubMenu() 2354 DefMenuItem( 'marginsandtabs', -- Margins and tabs > 2355 'Margins and ~tabs', 2356 'Default margins and tabs', 2357 '', 2358 '', 2359 NoDismiss) 2360 DefMenuItem( 'defaultmargins', -- Default margins... 2361 'Default ~margins []...', 2362 'DefaultMargins', 2363 'Change default margins (see also MODECNF.E)', 2364 '', 2365 NoDismiss) 2366 DefMenuItem( 'defaulttabs', -- Default tabs... 2367 'Default ~tabs []...', 2368 'DefaultTabs', 2369 'Change default tabs (see also MODECNF.E)', 2370 '', 2371 NoDismiss) 2372 DefMenuItem( 'defaulttabkey', -- Tabkey: Tab key enters tab char 2373 'Tab~key: tab key enters tab char', 2374 'toggle_default_tabkey', 2375 'Tabkey enters a tab char instead of spaces', 2376 '', 2377 NoDismiss) 2378 DefMenuItem( 'defaultmatchtab', -- Matchtab: tab stops at word boundaries of line above 2379 '~Matchtab: tab stops at word boundaries of line above', 2380 'toggle_default_matchtab', 2381 'Tabkey goes to word boundaries of prev. line', 2382 '', 2383 NoDismiss) 2384 DefNextItemEndsSubMenu() 2385 DefMenuItem( 'showtabs', -- Show tab chars 2386 '~Show tab chars', 2387 'toggle_tabglyph', 2388 'Show a circle for every tab char', 2389 '', 2390 NoDismiss) 2391 2392 DefNextItemStartsSubMenu() 2393 DefMenuItem( 'modesettings', -- Modes > 2394 'M~odes', 2395 'Configure general mode settings', 2396 '', 2397 '', 2398 NoDismiss) 2399 DefMenuItem( 'defaultkeywordhighlighting', -- Keyword highlighting 2400 'Keyword ~highlighting', 2401 'toggle_default_highlight', 2402 'Switch keyword highlighting on', 2403 '', 2404 NoDismiss) 2405 DefMenuItem( 'defaultmatchchars', -- MatchChars: auto-add closing brackets 2406 '~MatchChars: auto-add closing brackets', 2407 'toggle_default_match_chars', 2408 'Add closing bracket when typing opening one', 2409 '', 2410 NoDismiss) 2411 DefMenuItem( 'defaultbalance', -- Balance: search opening bracket while typing 2412 '~Balance: search opening bracket while typing', 2413 'toggle_default_balance', 2414 'Highlight opening bracket on typing the closing one', 2415 '', 2416 NoDismiss) 2417 DefMenuSep() -------------------- 2418 2419 DefMenuItem( 'defaultsyntaxexpansion', -- Syntax expansion 2420 '~Syntax expansion', 2421 'toggle_default_expand', 2422 'Let space and enter do syntax expansion', 2423 '', 2424 NoDismiss) 2425 DefMenuItem( 'selectcodingstyle', -- Select coding style [] for mode CURMODE... 2426 'Select ~coding style [] for mode #CURMODE#...', 2427 'SelectCodingStyle', 2428 'Select a previously defined coding style for current mode', 2429 '', 2430 NoDismiss) 2431 DefMenuSep() -------------------- 2432 2433 DefMenuItem( 'autorefreshmodefiles', -- Auto-check mode files 2434 '~Auto-check mode files', 2435 'toggle_modefiles_autorefresh', 2436 'Check for altered .hil/.ini files on file loading', 2437 '', 2438 NoDismiss) 2439 DefMenuItem( 'checkmodefilesnow', -- Check mode files now for mode CURMODE 2440 'Check mode files ~now for mode #CURMODE#', 2441 'CheckModeFiles', 2442 'Check for altered .hil/.ini files for current mode now', 2443 '', 2444 NoDismiss) 2445 DefMenuItem( 'openmodedirs', -- Open mode files directories for mode CURMODE 2446 'Open mode files ~directories for mode #CURMODE#', 2447 'OpenModeDirs', 2448 'Open dir(s) with .hil/.ini files', 2449 '', 2450 NoDismiss) 2451 DefMenuSep() -------------------- 2452 2453 DefMenuItem( 'editprofile2', -- Edit PROFILE.ERX 2454 'Edit ~PROFILE.ERX', 2455 'e %NEPMD_USERDIR%\bin\profile.erx', 2456 'Edit REXX configuration file', 2457 '', 2458 NoDismiss) 2459 DefNextItemEndsSubMenu() 2460 DefMenuItem( '', -- Edit MODECNF.E 2461 'Edit ~MODECNF.E', 2462 'EditCreateUserMacro modecnf.e', 2463 'Edit modes configuration incl. syntax expansion', 2464 '', 2465 NoDismiss) 2466 DefNextItemStartsSubMenu() 2467 DefMenuItem( 'searchoptions', -- Search options > 2468 '~Search options []', 2469 '', 2470 'View/change default search options', 2471 '', 2472 NoDismiss) 2473 DefMenuItem( 'searchoptions_+', -- 2474 '~+'\9'down: top to bottom*', 2475 'setsearchoptions +', 2476 '', 2477 '', 2478 NoDismiss) 2479 DefMenuItem( 'searchoptions_-', -- 2480 '~-'\9'up: bottom to top', 2481 'setsearchoptions -', 2482 '', 2483 '', 2484 NoDismiss) 2485 DefMenuSep() -------------------- 2486 2487 DefMenuItem( 'searchoptions_f', -- 2488 '~f'\9'foreward: left to right*', 2489 'setsearchoptions f', 2490 '', 2491 '', 2492 NoDismiss) 2493 DefMenuItem( 'searchoptions_r', -- 2494 '~r'\9'reverse: right to left', 2495 'setsearchoptions r', 2496 '', 2497 '', 2498 NoDismiss) 2499 DefMenuSep() -------------------- 2500 2501 DefMenuItem( 'searchoptions_u', -- 2502 ''\9'start at c~ursor*', 2503 'setsearchoptions u', 2504 '', 2505 '', 2506 NoDismiss) 2507 DefMenuItem( 'searchoptions_t', -- 2508 '~t'\9'start at top of file', 2509 'setsearchoptions t', 2510 '', 2511 '', 2512 NoDismiss) 2513 DefMenuItem( 'searchoptions_b', -- 2514 '~b'\9'start at bottom of file', 2515 'setsearchoptions b', 2516 '', 2517 '', 2518 NoDismiss) 2519 DefMenuSep() -------------------- 2520 2521 DefMenuItem( 'searchoptions_a', -- 2522 '~a'\9'all: in the whole file*', 2523 'setsearchoptions a', 2524 '', 2525 '', 2526 NoDismiss) 2527 DefMenuItem( 'searchoptions_m', -- 2528 '~m'\9'mark: in mark only', 2529 'setsearchoptions m', 2530 '', 2531 '', 2532 NoDismiss) 2533 DefMenuSep() -------------------- 2534 2535 DefMenuItem( 'searchoptions_e', -- 2536 '~e'\9'case-sensitive', 2537 'setsearchoptions e', 2538 '', 2539 '', 2540 NoDismiss) 2541 DefMenuItem( 'searchoptions_c', -- 2542 '~c'\9'ignore case*', 2543 'setsearchoptions c', 2544 '', 2545 '', 2546 NoDismiss) 2547 DefMenuSep() -------------------- 2548 2549 DefMenuItem( 'searchoptions_i', -- 2550 ''\9'~including search*', 2551 'setsearchoptions i', 2552 '', 2553 '', 2554 NoDismiss) 2555 DefMenuItem( 'searchoptions_^', -- options ~ and ^ are equivalent 2556 '~^'\9'excluding search', 2557 'setsearchoptions ^', 2558 '', 2559 '', 2560 NoDismiss) 2561 -------------------------- 2562 DefMenuItem( 'searchoptions_h', -- 2563 ''\9'c~hars*', 2564 'setsearchoptions h', 2565 '', 2566 '', 2567 'BREAKSEPARATOR' NoDismiss) 2568 DefMenuItem( 'searchoptions_g', -- 2569 '~g'\9'grep', 2570 'setsearchoptions g', 2571 '', 2572 '', 2573 NoDismiss) 2574 DefMenuItem( 'searchoptions_x', -- 2575 '~x'\9'egrep', 2576 'setsearchoptions x', 2577 '', 2578 '', 2579 NoDismiss) 2580 DefMenuItem( 'searchoptions_w', -- 2581 '~w'\9'words', 2582 'setsearchoptions w', 2583 '', 2584 '', 2585 NoDismiss) 2586 DefMenuSep() -------------------- 2587 2588 DefMenuItem( 'searchoptions_p', -- 2589 ''\9'change: re~place sets case*', 2590 'setsearchoptions p', 2591 '', 2592 '', 2593 NoDismiss) 2594 DefMenuItem( 'searchoptions_k', -- 2595 '~k'\9'change: keep case of search', 2596 'setsearchoptions k', 2597 '', 2598 '', 2599 NoDismiss) 2600 DefMenuSep() -------------------- 2601 2602 DefMenuItem( 'searchoptions_1', -- 2603 ''\9'change ~1 only*', 2604 'setsearchoptions 1', 2605 '', 2606 '', 2607 NoDismiss) 2608 DefMenuItem( 'searchoptions_*', -- 2609 '~*'\9'change all', 2610 'setsearchoptions *', 2611 '', 2612 '', 2613 NoDismiss) 2614 DefMenuSep() -------------------- 2615 2616 DefMenuItem( 'searchoptions_q', -- 2617 ''\9'change: ~quiet*', 2618 'setsearchoptions q', 2619 '', 2620 '', 2621 NoDismiss) 2622 DefMenuItem( 'searchoptions_n', -- 2623 '~n'\9'change: msg how many changes', 2624 'setsearchoptions n', 2625 '', 2626 '', 2627 NoDismiss) 2628 DefMenuSep() -------------------- 2629 2630 DefMenuItem( '', -- 2631 ''\9'Reset to initial ~default (*)', 2632 'setsearchoptions RESET', 2633 '', 2634 '', 2635 NoDismiss) 2636 DefNextItemEndsSubMenu() 2637 DefMenuItem( '', -- 2638 ''\9'Sa~ve as default', 2639 'setsearchoptions SAVE', 2640 '', 2641 '', 2642 NoDismiss) 2643 2644 DefMenuSep() -------------------- 2645 2646 ; --------------------------------------------------------------------------- 2647 defproc add_prefs_filesystem 2648 universal NoDismiss 2649 universal WpsStarted 2650 2651 DefNextItemStartsSubMenu() 2652 DefMenuItem( 'saveoptions', -- Save options > 2653 'Sa~ve options []', 2654 '', 2655 'View/change default save options', 2656 '', 2657 NoDismiss) 2658 DefMenuItem( 'saveoptions_ns', -- 2659 '/ns'\9'~don''t strip spaces', 2660 'setsaveoptions /ns', 2661 '', 2662 '', 2663 NoDismiss) 2664 DefMenuItem( 'saveoptions_s', -- 2665 '/~s'\9'strip trailing spaces*', 2666 'setsaveoptions /s', 2667 '', 2668 '', 2669 NoDismiss) 2670 DefMenuSep() -------------------- 2671 2672 DefMenuItem( 'saveoptions_nt', -- 2673 '/nt'\9'don''t compress s~paces*', 2674 'setsaveoptions /nt', 2675 '', 2676 '', 2677 NoDismiss) 2678 DefMenuItem( 'saveoptions_t', -- 2679 '/~t'\9'compress spaces to tabs (tabs = 8, buggy!)', 2680 'setsaveoptions /t', 2681 '', 2682 '', 2683 NoDismiss) 2684 DefMenuSep() -------------------- 2685 2686 DefMenuItem( 'saveoptions_ne', -- 2687 '/~ne'\9'no file end char*', 2688 'setsaveoptions /ne', 2689 '', 2690 '', 2691 NoDismiss) 2692 DefMenuItem( 'saveoptions_e', -- 2693 '/~e'\9'append a file end char', 2694 'setsaveoptions /e', 2695 '', 2696 '', 2697 NoDismiss) 2698 DefMenuSep() -------------------- 2699 2700 DefMenuItem( 'saveoptions_a', -- 2701 ''\9'~auto-line-end (maybe mixed)', 2702 'setsaveoptions /a', 2703 '', 2704 '', 2705 NoDismiss) 2706 DefMenuItem( 'saveoptions_o', -- 2707 '/~o'\9'force DOS line end (CRLF)*', 2708 'setsaveoptions /o', 2709 '', 2710 '', 2711 NoDismiss) 2712 DefMenuItem( 'saveoptions_l', -- 2713 '/~l'\9'force Unix line end (LF)', 2714 'setsaveoptions /l', 2715 '', 2716 '', 2717 NoDismiss) 2718 -- /u is the same as /l /ne 2719 DefMenuSep() -------------------- 2720 2721 DefMenuItem( '', -- 2722 ''\9'Reset to initial ~default (*)', 2723 'setsaveoptions RESET', 2724 '', 2725 '', 2726 NoDismiss) 2727 DefNextItemEndsSubMenu() 2728 DefMenuItem( '', -- 2729 ''\9'Sa~ve as default', 2730 'setsaveoptions SAVE', 2731 '', 2732 '', 2733 NoDismiss) 2734 2735 DefNextItemStartsSubMenu() 2736 DefMenuItem( 'readonlyandlock', -- Read-only and lock > 2737 '~Read-only and lock', 2738 '', 2739 '', 2740 '', 2741 NoDismiss) 2742 DefMenuItem( 'respectreadonly', -- Respect read-only 2743 '~Respect read-only', 2744 'toggle_respect_readonly', 2745 'Read-only file attribute disables edit mode', 2746 '', 2747 NoDismiss) 2748 DefNextItemEndsSubMenu() 2749 DefMenuItem( 'lockonmodify', -- Lock on modify 2750 '~Lock on modify', 2751 'toggle_lock_on_modify', 2752 'Deny write access for other applications', 2753 '', 2754 NoDismiss) 2755 2756 DefNextItemStartsSubMenu() 2757 DefMenuItem( 'autorestore', -- Auto-restore > 2758 '~Auto-restore', 2759 '', 2760 '', 2761 '', 2762 NoDismiss) 2763 DefMenuItem( 'restorecursorpos', -- Restore cursor position 2764 '~Restore cursor position', 2765 'toggle_restore_pos', 2766 'Restore of cursor pos. from file''s last save', 2767 '', 2768 NoDismiss) 2769 DefMenuSep() -------------------- 2770 2771 DefMenuItem( 'trackhistorylists', -- Track additional history lists 2772 '~Track additional history lists', 2773 'Toggle_History', 2774 'Enable edit, load and save history', 2775 '', 2776 NoDismiss) 2777 DefMenuSep() -------------------- 2778 2779 DefMenuItem( 'autosavelastring', -- Auto-save last ring 2780 'Auto-~save last ring', 2781 'Toggle_Save_Ring', 2782 'Save of ring on load and quit', 2783 '', 2784 NoDismiss) 2785 DefMenuItem( 'maxfilessavering', -- Max. [] files for save ring... 2786 'Max. [] files for save ring...', 2787 'RingMaxFiles', 2788 'Set limit of files to enable auto-save', 2789 '', 2790 NoDismiss) 2791 DefNextItemEndsSubMenu() 2792 DefMenuItem( 'autoloadlastring', -- Auto-load last ring 2793 'Auto-~load last ring', 2794 'Toggle_Restore_Ring', 2795 'Restore of ring if EPM is started without args', 2796 '', 2797 NoDismiss) 2798 DefNextItemStartsSubMenu() 2799 DefMenuItem( 'backup', -- Backup > 2800 '~Backup', 2801 '', 2802 '', 2803 '', 2804 NoDismiss) 2805 DefMenuItem( 'autosaveenabled', -- Autosave 2806 '~Autosave', 2807 'toggle_autosave', 2808 '', 2809 '', 2810 NoDismiss) 2811 DefMenuItem( 'autosavenumdialog', -- After [] changes... 2812 'After [] ~changes...', 2813 'AutosaveNum', 2814 '', 2815 '', 2816 NoDismiss) 2817 DefMenuSep() -------------------- 2818 2819 DefMenuItem( 'backupenabled', -- Backup 2820 '~Backup', 2821 'toggle_backup', 2822 '', 2823 '', 2824 NoDismiss) 2825 DefMenuItem( 'backupnumdialog', -- Keep [] backups... 2826 '~Keep [] backups...', 2827 'BackupNum', 2828 '', 2829 '', 2830 NoDismiss) 2831 DefMenuSep() -------------------- 2832 2833 DefMenuItem( 'backupdirdialog', -- Directory: []... 2834 '~Directory: []...', 2835 'BackupDir', 2836 '', 2837 '', 2838 NoDismiss) 2839 DefMenuItem( 'backuplistdir', -- List directory 2840 '~List directory', 2841 'ListBackupDir', 2842 '', 2843 '', 2844 NoDismiss) 2845 DefNextItemEndsSubMenu() 2846 DefMenuItem( 'backuplistfiles', -- List backups for current file 2847 'List backups for current ~file', 2848 'ListBackupDirCurrentFile', 2849 '', 2850 '', 2851 NoDismiss) 2852 2853 DefNextItemStartsSubMenu() 2854 DefMenuItem( 'directories', -- Directories > 2855 'Director~ies', 2856 '', 2857 '', 2858 '', 2859 NoDismiss) 2860 DefNextItemStartsSubMenu() 2861 DefMenuItem( 'workdir', -- Set work dir > 2862 'Set ~work dir', 2863 '', 2864 '', 2865 '', 2866 NoDismiss) 2867 DefMenuItem( 'workdirprogram', -- By program object 2868 '~By program object', 2869 'Set_ChangeWorkDir 0', 2870 'This is EPM''s default', 2871 '', 2872 NoDismiss) 2873 DefMenuItem( 'workdirprev', -- Use previous work dir 2874 '~Use previous work dir', 2875 'Set_ChangeWorkDir 1', 2876 'Keep work dir across EPM sessions', 2877 '', 2878 NoDismiss) 2879 DefMenuItem( 'workdirfile', -- To dir of selected file 2880 'To dir of ~selected file', 2881 'Set_ChangeWorkDir 2', 2882 'Change to dir of current file', 2883 '', 2884 NoDismiss) 2885 DefMenuSep() -------------------- 2886 2887 DefNextItemEndsSubMenu() 2888 DefMenuItem( '', -- To... 2889 '~To...', 2890 'CDDlg', 2891 'Show/change current work dir now', 2892 '', 2893 NoDismiss) 2894 DefNextItemStartsSubMenu() 2895 DefMenuItem( 'opendlgdir', -- Start Edit/Add file dialog at > 2896 '~Start Edit/Add file dialog at', 2897 '', 2898 '', 2899 '', 2900 NoDismiss) 2901 DefMenuItem( 'opendlgdirprev', -- Previous dir 2902 '~Previous dir', 2903 'set_OpenDlgDir 0', 2904 'Start at dir from last Open dialog', 2905 '', 2906 NoDismiss) 2907 DefMenuItem( 'opendlgdirwork', -- Work dir 2908 '~Work dir', 2909 'set_OpenDlgDir 1', 2910 'Start at work dir', 2911 '', 2912 NoDismiss) 2913 DefNextItemEndsSubMenu() 2914 DefMenuItem( 'opendlgdirfile', -- Dir of current file 2915 '~Dir of current file', 2916 'set_OpenDlgDir 2', 2917 'Start at dir of current file', 2918 '', 2919 NoDismiss) 2920 DefNextItemStartsSubMenu() 2921 DefMenuItem( 'saveasdlgdir', -- Start Save as dialog for .Untitled at > 2922 'Start Save-~as dialog for .Untitled at', 2923 '', 2924 '', 2925 '', 2926 NoDismiss) 2927 DefMenuItem( 'saveasdlgdirprev', -- Previous dir 2928 '~Previous dir', 2929 'set_SaveasDlgDir 0', 2930 'Start at dir from last saved file', 2931 '', 2932 NoDismiss) 2933 DefNextItemEndsSubMenu() 2934 DefMenuItem( 'saveasdlgdirwork', -- Work dir 2935 '~Work dir', 2936 'set_SaveasDlgDir 1', 2937 'Start at work dir', 2938 '', 2939 NoDismiss) 2940 DefMenuSep() -------------------- 2941 2942 DefNextItemEndsSubMenu() 2943 DefMenuItem( '', -- Edit EPM.ENV 2944 'Edit ~EPM.ENV', 2945 'EditCreateUserFile bin\epm.env', 2946 'Edit environment file', 2947 '', 2948 NoDismiss) 2949 2950 DefMenuSep() -------------------- 2951 2952 ; --------------------------------------------------------------------------- 2953 defproc add_prefs_startup 2954 universal NoDismiss 2955 universal WpsStarted 2956 2957 DefNextItemStartsSubMenu() 2958 DefMenuItem( 'editoptions', -- Edit options > 2959 '~Edit options []', 2960 '', 2961 'View/change default edit options', 2962 '', 2963 NoDismiss) 2964 DefMenuItem( 'editoptions_b', -- 2965 '/~b'\9'search both: ring and disk*', 2966 'seteditoptions /b', 2967 '', 2968 '', 2969 NoDismiss) 2970 DefMenuItem( 'editoptions_c', -- 2971 '/~c'\9'create a new file', 2972 'seteditoptions /c', 2973 '', 2974 '', 2975 NoDismiss) 2976 DefMenuItem( 'editoptions_d', -- 2977 '/~d'\9'create new if on disk', 2978 'seteditoptions /d', 2979 '', 2980 '', 2981 NoDismiss) 2982 DefMenuSep() -------------------- 2983 2984 DefMenuItem( 'editoptions_nt', -- 2985 '/~nt'\9'expand tabs (tabs = 8)', 2986 'seteditoptions /nt', 2987 '', 2988 '', 2989 NoDismiss) 2990 DefMenuItem( 'editoptions_t', -- 2991 '/~t'\9'don''t expand tabs*', 2992 'seteditoptions /t', 2993 '', 2994 '', 2995 NoDismiss) 2996 ; In EPM 6 there's no difference between /u and /l anymore. 2997 ; EPM breaks lines at CRCRLF, CRLF, CR and LF, not dependent on /u or /l. 2998 ; EPM adds CRLF when Enter is pressed. That can't be changed with an option. 2999 ; /u and /l are senseless now. 3000 ; Per default all line ends are kept as on file loading. Even 'unterminated' 3001 ; is possible for the last line. (But it's not visible, if the last line is 3002 ; terminated or not. EPM won't add a blank line, if the last line is terminated.) 3003 ; Line ends can be forced to CRLF or CR on save. That applies also to the last line. 3004 ; DefMenuSep() -------------------- 3005 ; 3006 ; DefMenuItem( 'editoptions_u', -- 3007 ; '/~u'\9'Unix line end (LF)', 3008 ; 'seteditoptions /u', 3009 ; '', 3010 ; '') 3011 ; DefMenuItem( 'editoptions_l', -- 3012 ; '/~l'\9'DOS line end (CRLF)*', 3013 ; 'seteditoptions /l', 3014 ; '', 3015 ; '') 3016 DefMenuSep() -------------------- 3017 3018 DefMenuItem( '', -- 3019 ''\9'~Reset to initial default (*)', 3020 'seteditoptions RESET', 3021 '', 3022 '', 3023 NoDismiss) 3024 DefNextItemEndsSubMenu() 3025 DefMenuItem( '', -- 3026 ''\9'Sa~ve as default', 3027 'seteditoptions SAVE', 3028 '', 3029 '', 3030 NoDisMiss) 3031 if WpsStarted then 3032 DefNextItemStartsSubMenu() 3033 DefMenuItem( 'prg', -- Program objects > 3034 '~Program objects', 3035 '', 3036 '', 3037 '', 3038 NoDismiss) 3039 DefMenuItem( 'prgnewwindow', -- Open in same window 3040 '~Open in same window (/r)', 3041 'toggle_new_same_window', 3042 'Open file objects in topmost EPM window', 3043 '', 3044 NoDismiss) 3045 DefMenuItem( 'prgfullfiledialog', -- Use full file dialog 3046 'Use full ~file dialog (/o)', 3047 'toggle_full_file_dialog', 3048 'Show file dialog instead of history lists', 3049 '', 3050 NoDismiss) 3051 DefMenuItem( '', -- Set startup dir... 3052 'Set ~startup dir...', 3053 'StartupDirDlg', 3054 'Select startup dir for several EPM objects', 3055 '', 3056 NoDismiss) 3057 DefMenuItem( '', -- Set associations... 3058 'Set ~associations...', 3059 'SelectAssoc', 3060 'Configure WPS associations for EPM objects', 3061 '', 3062 NoDismiss) 3063 DefMenuSep() -------------------- 3064 3065 DefNextItemEndsSubMenu() 3066 DefMenuItem( '', -- Edit list of objects 3067 'Edit ~list of objects', 3068 'EditCreateUserFile bin\objects.ini', 3069 'Edit list with configurable program objects', 3070 '', 3071 NoDismiss) 3072 endif -- WpsStarted 3073 3074 DefMenuSep() -------------------- 3075 3076 ; --------------------------------------------------------------------------- 3077 defproc add_prefs_appearance 3078 universal NoDismiss 3079 universal WpsStarted 3080 3081 DefNextItemStartsSubMenu() 3082 DefMenuItem( 'menu', -- Menu > 3083 'M~enu', 3084 '', 3085 '', 3086 '', 3087 NoDismiss) 3088 DefMenuItem( '', -- Select menu 3089 'Select ~menu...', 3090 'ChangeMenu', 3091 'Open a listbox and change or refresh the menu', 3092 '', 3093 NoDismiss) 3094 DefNextItemEndsSubMenu() 3095 DefMenuItem( 'nodismiss', -- Nodismiss menus 3096 '~Nodismiss menus', 3097 'toggle_nodismiss', 3098 'Keep menu open after selecting menu items', 3099 '', 3100 NoDismiss) 3101 DefNextItemStartsSubMenu() 3102 DefMenuItem( 'infobars', -- Info bars > 3103 '~Info bars', 3104 '', 3105 '', 3106 '', 3107 NoDismiss) 3108 DefMenuItem( 'showlongname', -- Show .LONGNAME 3109 'Show .~LONGNAME', 3110 'toggle_longname', 3111 'Show .LONGNAME EA as filename in titlebar', 3112 '', 3113 NoDismiss) 3114 DefMenuItem( 'messageline', -- Message line 3115 MSG_LINE_MENU__MSG, 3116 'toggleframe 2', 3117 MSG_LINE_MENUP__MSG, 3118 HP_FRAME_MESSAGE, 3119 NoDismiss) 3120 DefMenuItem( 'statusbar', -- Status bar 3121 'Status ~bar', 3122 'toggleframe 1', 3123 STATUS_LINE_MENUP__MSG, 3124 HP_FRAME_STATUS, 3125 NoDismiss) 3126 DefMenuItem( 'infoattop', -- Info at top 3127 INFOATTOP_MENU__MSG, 3128 'toggleframe 32', 3129 INFOATTOP_MENUP__MSG, 3130 HP_FRAME_EXTRAPOS, 3131 NoDismiss) 3132 DefMenuItem( 'prompting', -- Prompting 3133 PROMPTING_MENU__MSG, 3134 'toggleprompt', 3135 PROMPTING_MENUP__MSG, 3136 HP_FRAME_PROMPT, 3137 NoDismiss) 3138 DefMenuSep() -------------------- 3139 3140 DefMenuItem( '', -- Configure title bar... 3141 'Configure ~title bar...', 3142 'ConfigInfoLine TITLE', 3143 'Change layout of titletext', 3144 '', 3145 NoDismiss) 3146 DefMenuItem( '', -- Configure status bar... 3147 'Configure status ~bar...', 3148 'ConfigInfoLine STATUS', 3149 'Change layout of status bar', 3150 '', 3151 NoDismiss) 3152 DefNextItemEndsSubMenu() 3153 DefMenuItem( '', -- Configure separator... 3154 'Configure ~separator...', 3155 'ConfigInfoLine SEP', 3156 'Change layout of separator for title and status bar', 3157 '', 3158 NoDismiss) 3159 DefNextItemStartsSubMenu() 3160 DefMenuItem( 'toolbar', -- Toolbar > 3161 '~Toolbar', 3162 '', 3163 '', 3164 '', 3165 NoDismiss) 3166 DefMenuItem( 'toolbarenabled', -- Enabled 3167 '~Enabled', 3168 'toggle_toolbar', 3169 TOGGLETOOLBAR_MENUP__MSG, 3170 HP_TOOLBAR_TOGGLE, 3171 NoDismiss) 3172 DefMenuItem( '', -- Select... 3173 '~Select...', 3174 'LoadToolbar', 3175 'Open a listbox and load, reload or delete a toolbar', 3176 '', 3177 NoDismiss) 3178 DefMenuSep() -------------------- 3179 3180 DefNextItemStartsSubMenu() 3181 DefMenuItem( 'toolbarstyle', -- Style > 3182 'St~yle', 3183 '', 3184 'Configure toolbar style', 3185 '', 3186 NoDismiss) 3187 DefMenuItem( 'toolbartext', -- Text 3188 '~Text', 3189 'toggle_toolbar_text', 3190 'Show button text', 3191 '', 3192 NoDismiss) 3193 DefMenuSep() -------------------- 3194 3195 DefMenuItem( 'toolbarautosize', -- Automatic size 3196 '~Automatic size', 3197 'toggle_toolbar_autosize', 3198 'Adjust button sizes to the .bmp sizes', 3199 '', 3200 NoDismiss) 3201 DefMenuItem( 'toolbarsize', -- Size: [26x26]... 3202 '~Size: [x]...', 3203 'ToolbarSize', 3204 'Default = 26x26, add 4x4 to the .bmp size', 3205 '', 3206 NoDismiss) 3207 DefNextItemEndsSubMenu() 3208 DefMenuItem( 'toolbarscaling', -- Scaling: [and] 3209 'S~caling: []', 3210 'toggle_toolbar_scaling', 3211 'In most cases "and" looks best', 3212 '', 3213 NoDismiss) 3214 DefMenuSep() -------------------- 3215 3216 DefMenuItem( '', -- Save as... 3217 'Save ~as...', 3218 'SaveToolbar', 3219 '', 3220 '', 3221 NoDismiss) 3222 DefMenuSep() -------------------- 3223 3224 DefMenuItem( '', -- Import... 3225 '~Import...', 3226 'ImportToolbar', 3227 '', 3228 '', 3229 NoDismiss) 3230 DefNextItemEndsSubMenu() 3231 DefMenuItem( '', -- Export... 3232 'E~xport...', 3233 'ExportToolbar', 3234 '', 3235 '', 3236 NoDismiss) 3237 DefNextItemStartsSubMenu() 3238 DefMenuItem( 'backgroundbitmap', -- Background bitmap > 3239 'Bac~kground bitmap', 3240 '', 3241 '', 3242 '', 3243 NoDismiss) 3244 DefMenuItem( 'backgroundbitmapenabled', -- Enabled 3245 '~Enabled', 3246 'toggle_bitmap', 3247 TOGGLEBITMAP_MENUP__MSG, 3248 HP_FRAME_BITMAP, 3249 NoDismiss) 3250 DefNextItemEndsSubMenu() 3251 DefMenuItem( '', -- Select... 3252 '~Select...', 3253 'SetBackgroundBitmap SELECT', 3254 'Select a background bitmap', 3255 '', 3256 NoDismiss) 3257 DefNextItemStartsSubMenu() 3258 DefMenuItem( 'fontsandcolors', -- Fonts and colors > 3259 'Fonts and co~lors', 3260 '', 3261 '', 3262 '', 3263 NoDismiss) 3264 DefMenuItem( '', -- Color palette... 3265 'Color ~palette...', 3266 'SelectColorPal', 3267 'Modify EPM''s 16-color palette (e.g. used for highlighting)', 3268 '', 3269 NoDismiss) 3270 DefNextItemEndsSubMenu() 3271 DefMenuItem( '', -- Colors and fonts... 3272 '~Colors and fonts...', 3273 'PostMe ConfigDlg' 1023 - 2 - 16, -- 2 = color page bit, 16 = fonts page bit, 1023 = sum for all pages 3274 'Use either the old configuration dialog or drag''n''drop', 3275 '', 3276 NoDismiss) 3363 3277 3364 3278 ; --------------------------------------------------------------------------- … … 3389 3303 3390 3304 ; --------------------------------------------------------------------------------------- 3391 ; The following is individual commands on 5.51+; all part of ProcessMenuInit cmd on earlier versions.3392 ; ---------------------------------------------------------------------------------------3393 3305 ; The menuinit_<mid_name> is called by defc ProcessMenuInit, when the menu id <mid_name> 3394 3306 ; is selected. The defc must exist and must be added to the 'definedsubmenus' array var, … … 3635 3547 SetMenuAttribute( GetAVar('mid_prevfile'), MIA_DISABLED, on) 3636 3548 3637 defc menuinit_menu 3638 universal nodismiss 3639 universal MenuItemsHidden 3640 SetMenuAttribute( GetAVar('mid_nodismiss'), MIA_CHECKED, not (nodismiss = 32)) 3641 SetMenuAttribute( GetAVar('mid_hidemenuitems'), MIA_CHECKED, not MenuItemsHidden) 3642 3643 defc menuinit_infobars 3644 universal show_longnames 3645 universal menu_prompt 3646 SetMenuAttribute( GetAVar('mid_showlongname'), MIA_CHECKED, not show_longnames) 3647 SetMenuAttribute( GetAVar('mid_messageline'), MIA_CHECKED, not queryframecontrol(2)) 3648 SetMenuAttribute( GetAVar('mid_statusbar'), MIA_CHECKED, not queryframecontrol(1)) 3649 SetMenuAttribute( GetAVar('mid_infoattop'), MIA_CHECKED, not queryframecontrol(32)) 3650 SetMenuAttribute( GetAVar('mid_prompting'), MIA_CHECKED, not menu_prompt) 3651 3652 defc menuinit_toolbar 3653 SetMenuAttribute( GetAVar('mid_toolbarenabled'), MIA_CHECKED, not queryframecontrol(EFRAMEF_TOOLBAR)) 3654 3655 defc menuinit_toolbarstyle 3656 parse value GetToolbarSetup() with \1 Style \1 Cx \1 Cy \1 . 3657 fText = not (Style bitand 16) 3658 fAutosize = not (Style bitand 4) 3659 fFlat = not (Style bitand 8) 3660 fScaleDel = (not (Style bitand 32)) and (not (Style bitand 64)) 3661 fScaleOr = (Style bitand 32) and (Style bitand 64) 3662 fScaleAnd = (Style bitand 32) and (not (Style bitand 64)) 3663 3664 SetMenuAttribute( GetAVar('mid_toolbartext'), MIA_CHECKED, not fText) 3665 SetMenuAttribute( GetAVar('mid_toolbarautosize'), MIA_CHECKED, not fAutosize) 3666 SetMenuAttribute( GetAVar('mid_toolbarsize'), MIA_DISABLED, not fAutosize) 3667 SetMenuAttribute( GetAVar('mid_toolbarscaling'), MIA_DISABLED, not fAutosize) 3668 new = Cx'x'Cy 3669 parse value GetAVar('mtxt_toolbarsize') with next'['x']'rest 3670 SetMenuText( GetAVar('mid_toolbarsize'), next'['new']'rest) 3671 if fScaleDel then 3672 new = 'delete' 3673 elseif fScaleOr then 3674 new = 'or' 3549 ; ------------------------------------ Run ---------------------------------- 3550 defc menuinit_run 3551 is_shell = leftstr( .filename, 15) = '.command_shell_' 3552 SetMenuAttribute( GetAVar('mid_writetoshell'), MIA_DISABLED, is_shell) 3553 SetMenuAttribute( GetAVar('mid_sendbreaktoshell'), MIA_DISABLED, is_shell) 3554 3555 defc menuinit_configureshell 3556 universal nepmd_hini 3557 KeyPath = '\NEPMD\User\Shell\FilenameCompletion' 3558 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 3559 SetMenuAttribute( GetAVar('mid_filenamecompletion'), MIA_CHECKED, not on) 3560 KeyPath = '\NEPMD\User\Shell\Alias' 3561 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 3562 SetMenuAttribute( GetAVar('mid_alias'), MIA_CHECKED, not on) 3563 file = ResolveEnvVars('%NEPMD_USERDIR%\bin\alias.cfg') 3564 file_exist = exist(file) 3565 if file_exist then 3566 SetMenuText( GetAVar('mid_editalias'), 'Edit ALIAS.~CFG') 3675 3567 else 3676 new = 'and' 3677 endif 3678 parse value GetAVar('mtxt_toolbarscaling') with next'['x']'rest 3679 SetMenuText( GetAVar('mid_toolbarscaling'), next'['new']'rest) 3680 3681 defc menuinit_backgroundbitmap 3682 universal bitmap_present 3683 SetMenuAttribute( GetAVar('mid_backgroundbitmapenabled'), MIA_CHECKED, not bitmap_present) 3684 3685 ; ------------------------------------ Options ------------------------------ 3686 defc menuinit_options 3568 SetMenuText( GetAVar('mid_editalias'), 'Create ALIAS.~CFG') 3569 endif 3570 3571 defc menuinit_treecommands 3572 is_tree = upcase( leftstr( .filename, 5)) = '.TREE' 3573 SetMenuAttribute( GetAVar('mid_treesort'), MIA_DISABLED, is_tree) 3574 SetMenuAttribute( GetAVar('mid_treeit') , MIA_DISABLED, is_tree) 3575 3576 ; ------------------------------------ Keyword help ------------------------- 3577 defc menuinit_keywordhelp 3578 universal nepmd_hini 3579 KeyPath = '\NEPMD\User\KeywordHelp\NewView\UseIfFound' 3580 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 3581 SetMenuAttribute( GetAVar('mid_usenewview'), MIA_CHECKED, not on) 3582 SetMenuAttribute( GetAVar('mid_usenewviewxsearch'), MIA_DISABLED, on) 3583 KeyPath = '\NEPMD\User\KeywordHelp\NewView\ExtendedSearch' 3584 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 3585 SetMenuAttribute( GetAVar('mid_usenewviewxsearch'), MIA_CHECKED, not on) 3586 3587 ; ------------------------------------ Preferences -------------------------- 3588 defc menuinit_prefspopup 3687 3589 universal default_edit_options 3688 3590 universal default_save_options … … 3986 3888 endif 3987 3889 3988 ; ------------------------------------ Run ---------------------------------- 3989 defc menuinit_run 3990 is_shell = leftstr( .filename, 15) = '.command_shell_' 3991 SetMenuAttribute( GetAVar('mid_writetoshell'), MIA_DISABLED, is_shell) 3992 SetMenuAttribute( GetAVar('mid_sendbreaktoshell'), MIA_DISABLED, is_shell) 3993 3994 defc menuinit_configureshell 3995 universal nepmd_hini 3996 KeyPath = '\NEPMD\User\Shell\FilenameCompletion' 3997 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 3998 SetMenuAttribute( GetAVar('mid_filenamecompletion'), MIA_CHECKED, not on) 3999 KeyPath = '\NEPMD\User\Shell\Alias' 4000 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 4001 SetMenuAttribute( GetAVar('mid_alias'), MIA_CHECKED, not on) 4002 file = ResolveEnvVars('%NEPMD_USERDIR%\bin\alias.cfg') 4003 file_exist = exist(file) 4004 if file_exist then 4005 SetMenuText( GetAVar('mid_editalias'), 'Edit ALIAS.~CFG') 3890 defc menuinit_menu 3891 universal nodismiss 3892 SetMenuAttribute( GetAVar('mid_nodismiss'), MIA_CHECKED, not (nodismiss = 32)) 3893 3894 defc menuinit_infobars 3895 universal show_longnames 3896 universal menu_prompt 3897 SetMenuAttribute( GetAVar('mid_showlongname'), MIA_CHECKED, not show_longnames) 3898 SetMenuAttribute( GetAVar('mid_messageline'), MIA_CHECKED, not queryframecontrol(2)) 3899 SetMenuAttribute( GetAVar('mid_statusbar'), MIA_CHECKED, not queryframecontrol(1)) 3900 SetMenuAttribute( GetAVar('mid_infoattop'), MIA_CHECKED, not queryframecontrol(32)) 3901 SetMenuAttribute( GetAVar('mid_prompting'), MIA_CHECKED, not menu_prompt) 3902 3903 defc menuinit_toolbar 3904 SetMenuAttribute( GetAVar('mid_toolbarenabled'), MIA_CHECKED, not queryframecontrol(EFRAMEF_TOOLBAR)) 3905 3906 defc menuinit_toolbarstyle 3907 parse value GetToolbarSetup() with \1 Style \1 Cx \1 Cy \1 . 3908 fText = not (Style bitand 16) 3909 fAutosize = not (Style bitand 4) 3910 fFlat = not (Style bitand 8) 3911 fScaleDel = (not (Style bitand 32)) and (not (Style bitand 64)) 3912 fScaleOr = (Style bitand 32) and (Style bitand 64) 3913 fScaleAnd = (Style bitand 32) and (not (Style bitand 64)) 3914 3915 SetMenuAttribute( GetAVar('mid_toolbartext'), MIA_CHECKED, not fText) 3916 SetMenuAttribute( GetAVar('mid_toolbarautosize'), MIA_CHECKED, not fAutosize) 3917 SetMenuAttribute( GetAVar('mid_toolbarsize'), MIA_DISABLED, not fAutosize) 3918 SetMenuAttribute( GetAVar('mid_toolbarscaling'), MIA_DISABLED, not fAutosize) 3919 new = Cx'x'Cy 3920 parse value GetAVar('mtxt_toolbarsize') with next'['x']'rest 3921 SetMenuText( GetAVar('mid_toolbarsize'), next'['new']'rest) 3922 if fScaleDel then 3923 new = 'delete' 3924 elseif fScaleOr then 3925 new = 'or' 4006 3926 else 4007 SetMenuText( GetAVar('mid_editalias'), 'Create ALIAS.~CFG') 4008 endif 4009 4010 defc menuinit_treecommands 4011 is_tree = upcase( leftstr( .filename, 5)) = '.TREE' 4012 SetMenuAttribute( GetAVar('mid_treesort'), MIA_DISABLED, is_tree) 4013 SetMenuAttribute( GetAVar('mid_treeit') , MIA_DISABLED, is_tree) 4014 4015 ; ------------------------------------ Keyword help ------------------------- 4016 defc menuinit_keywordhelp 4017 universal nepmd_hini 4018 KeyPath = '\NEPMD\User\KeywordHelp\NewView\UseIfFound' 4019 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 4020 SetMenuAttribute( GetAVar('mid_usenewview'), MIA_CHECKED, not on) 4021 SetMenuAttribute( GetAVar('mid_usenewviewxsearch'), MIA_DISABLED, on) 4022 KeyPath = '\NEPMD\User\KeywordHelp\NewView\ExtendedSearch' 4023 on = (NepmdQueryConfigValue( nepmd_hini, KeyPath) <> 0) 4024 SetMenuAttribute( GetAVar('mid_usenewviewxsearch'), MIA_CHECKED, not on) 4025 4026 ; The above is all part of ProcessMenuInit cmd on old versions. ------------ 3927 new = 'and' 3928 endif 3929 parse value GetAVar('mtxt_toolbarscaling') with next'['x']'rest 3930 SetMenuText( GetAVar('mid_toolbarscaling'), next'['new']'rest) 3931 3932 defc menuinit_backgroundbitmap 3933 universal bitmap_present 3934 SetMenuAttribute( GetAVar('mid_backgroundbitmapenabled'), MIA_CHECKED, not bitmap_present) 4027 3935 4028 3936 ; ---------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.