On Tue, 10 Jun 2014 06:33:48 -0500 "Edward K. Ream" <[email protected]> wrote:
> On Mon, Jun 9, 2014 at 12:20 PM, 'Terry Brown' via leo-editor > <[email protected]> wrote: > > > E.g. from the Settings menu: > > > > Settings -> Appearance -> Fonts > > > > would open myLeoSettings.leo at the appropriate place (copying > > nodes in from LeoSettings.leo if needed), so the user would be > > looking at a node with the following children: > > > > @string body-text-font = Courier New > > @string log-text-font = Courier New > > @int body-text-font-size = 17px > > @int log-text-font-size = 12px > > > > etc. - something along those lines. The "pick-font" button I just > > added is just a convenience so the user can find font names on their > > system easily. > > > > The body of the node with those children would have some simple > > instructions, probably "Click the reload-styles button after making > > changes here". > > > > Once the infrastructure's set up we should be able to build out the > > Settings menu entries quite quickly. By infrastructure I mean the > > Settings -> Appearance -> Fonts entry knowing which node to copy > > from LeoSettings to myLeoSettings, if it's not already copied, > > where the stylesheet needs to be, etc. etc. > > A clever idea. However, I don't understand how this would work. Are > the "copied" nodes actually cross-file clones? No, just a one time "copy on demand" from leoSettings.leo to myLeoSettings.leo. Currently Settings -> Personal settings creates myLeoSettings.leo if it doesn't exist, copying @enabledplugins from leoSettings.leo and creating a stub @keys -> @shortcuts node. So we could add an ID of some sort to nodes in leoSettings.leo, so they could be used by a data structure like this: [ ("Appearance", [ ("Fonts", "FONT_SETTINGS"), ("Colors", "COLOR_SETTINGS"), ("Active frame", "ACTIVE_FRAME"), ]), ("Layout", [ ("Tabs", "TAB_SETTINGS"), ("Width", "WIDTH_SETTINGS"), ]), ("Abbreviations", [ etc. etc. ]), ] I.e. a list of tuples making up menu and sub-menu items under the Settings Menu: Appearance Fonts Colors Active frame Layout Tabs Width etc. which, when selected, search myLeoSettings.leo for the relevant entry and, if it's not there already, copy it over from leoSettings.leo. So the actual settings mechanism is exactly as it is now, it's just easier to navigate and more automated in the "only what you need" leoSettings.leo to myLeoSettings.leo copying. It's the simplest thing that could possibly work(TM) :-) The ID could be handled any number of ways, gnx, UNL, uA, but I'm inclined to just use text at the bottom of the organizer nodes, which would be used to present instructions for preference editing. E.g. (using '|' to indicate body text lines, all other lines are node headlines): Font settings | After you've changed the font settings below, click the | reload-styles button to update the appearance of Leo. | You can use the pick-font button to find font names on | your system. | | SETTINGS_NODE: FONT_SETTINGS @string body-text-font = Courier New @string log-text-font = Courier New @int body-text-font-size = 17px @int log-text-font-size = 12px Cheers -Terry > That is, suppose you present these nodes to the user, and they make > changes to the nodes. How are the nodes in the various files > updated? > > And where do the "copied" nodes appear? In a separate, newly created > outline? In a leoSettings.leo? > > Edward > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
