Basic Layout of the Leo GUI

2018-03-17 Thread rengel
One thing I never understood about the Leo GUI :

Why is the tab bar with the open files right below the title bar, but above 
the menu bar and the tool bar?

Imagine a car where the accelerator and the brake were switched.

In almost every other application (I know of) the order is:

title bar
menu bar
tool bar
breadcrumbs (if used)
tab bar (if used)

An application that exemplifies this order very well is PyCharm.
Like Leo it has  an outline structure and several resizeable panes, each 
with multiple tabs for open files and functions. 

This order implies a natural hierarchy and reflects some of the paramount 
principles of GUI design: 
- Don't surprise the user. 
- Utilize prior knowledge.

If someone is interested, there is more on this topic in 'GUI Bloopers 2.0: 
Common User Interface Design Don'ts and Dos' (just google for 'GUI 
bloopers).






-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


ENB: Prototyping themes without changing code

2018-03-17 Thread Edward K. Ream
This is an Engineering Notebook post.  It describes recent thoughts and 
test.

Recently I been struggling to understand what, exactly, any new theme code 
should do.

*Aha*: I can test themes without altering a line of code!  There are two 
parts of this strategy...

*Part 1: Use a minimal test file*

The *test_theme.bat* script *simulates* difficult theme-related code by 
loading two files, a very small test file, *test_theme.leo*, and an actual 
theme file, say EKRLight.leo.

test_theme.leo contains nothing but settings that we *don't *want to put in 
theme files:

@bool minibuffer_find_mode = False
@bool show-tips = False
@bool use-gutter = False

So now EKRLight.leo contains only an @theme tree, not the settings above.

Finally, I changed the F5 @command script so that it executes 
test_theme.bat.



*Part 2: Disable myLeoSettings.leo*Even though I'm running the F5 script 
from one copy of Leo, I can disable myLeoSettings.leo by renaming it.  
Doing so revealed several unbound @-constants in leoSettings.leo.  They 
have all been fixed.

*Summary*

1. Loading EKRLight.leo *last* is an excellent simulation of theming that 
required *no* changes to the existing theme-related code.  Something like 
this:

leo test_theme.leo EKRLight.leo

The test is even better when myLeoSettings.leo has been disabled.

2. leoSettings.leo now apparently contains no unbound @-constants.  This 
should make testing theme files significantly easier.

3. The script above suggests the way forward. Something like:

leo test_theme.leo --theme=EKRLight.leo

This would load EKRLight.leo last, as required, but would then close 
EKRLight.leo.

Following this super simple strategy is important.  Messing with settings 
will be hard enough.  That's next.

Finally, we can replace --theme by a setting in myLeoSettings.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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: OT: A better way to code, by Mike Bostock

2018-03-17 Thread Edward K. Ream
On Sat, Mar 17, 2018 at 7:11 AM, Xavier G. Domingo (xgid) <
xgdomi...@gmail.com> wrote:

> I have to admit that we are on the same boat here! After 30 years of
> programming, with 20+ programming languages including rare gems like
> CLIPPER and CHILL, I knew I was at home when I found Python. And I'm not
> going to change this, at least on this life! But I know that we *can get
> the goal with Python* (maybe with some help from the javascript world,
> but under control :-) ). My focus is NOT so much on the data visualization
> side of the question, but on the "talking code" side of it, to say it in
> some way.
>

​An exciting goal.  I'll help you any way I can.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Difference between drag and drop and copy-paste a node

2018-03-17 Thread Edward K. Ream
On Thursday, March 15, 2018 at 9:06:49 PM UTC-5, GPiette wrote:

However, if I drag and drop the same node containing accents with the left 
> mouse button, the dropped copy sees its accents changed to a UTF-8 
> multi-character equivalent, both in the node name and also in the text body 
> of that mouse-moved node.
>

Following up on #819: Drag and drop does not preserve encoding 


There is a missing piece of the puzzle somewhere. For drags within a file, 
the relevant code is LeoQTreeWidget.*intra*FileDrop. This either moves or 
clones nodes.  In neither case can text change. Indeed, moves and clones 
merely change pointers from one node to another.

There are several ways can imagine trouble happening:

1. Dragging between separate .leo files.  In that case the relevant code is 
def *inter*FileDrop(self, fn, p, s).  That does a paste from the clipboard:

pasted = c.fileCommands.getLeoOutlineFromClipboard(s, reassignIndices=True)

There might be encoding issues there.  Are you talking about inter-file 
drags?

2. Perhaps the changes happened later, after reloading Leo.

Did the changes happen immediately or after reloading Leo?

Finally, is there any reason why you truly need the @encoding directive.  
There is more likelihood of success if you can use defaults that match your 
system.  The relevant settings are in leoSettings.leo in the node 
@settings-->Unicode options.  You might try changing those, after backing 
everything up...

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Difference between drag and drop and copy-paste a node

2018-03-17 Thread Edward K. Ream
On Sat, Mar 17, 2018 at 11:35 AM, Terry Brown  wrote:

> I've noticed you can drag nodes into the body, pasting xml. I wonder if
> what seems like an intra file drag becomes inter file (xml from clipboard)
> if the mouse moves out of the tree widget?
>

​I had forgotten that.  This may be the what the OP did.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Difference between drag and drop and copy-paste a node

2018-03-17 Thread Terry Brown
I've noticed you can drag nodes into the body, pasting xml. I wonder if what 
seems like an intra file drag becomes inter file (xml from clipboard) if the 
mouse moves out of the tree widget?


On March 17, 2018 10:30:02 AM CDT, "Edward K. Ream"  wrote:
>On Thursday, March 15, 2018 at 9:06:49 PM UTC-5, GPiette wrote:
>
>However, if I drag and drop the same node containing accents with the
>left 
>> mouse button, the dropped copy sees its accents changed to a UTF-8 
>> multi-character equivalent, both in the node name and also in the
>text body 
>> of that mouse-moved node.
>>
>
>Following up on #819: Drag and drop does not preserve encoding 
>
>
>There is a missing piece of the puzzle somewhere. For drags within a
>file, 
>the relevant code is LeoQTreeWidget.*intra*FileDrop. This either moves
>or 
>clones nodes.  In neither case can text change. Indeed, moves and
>clones 
>merely change pointers from one node to another.
>
>There are several ways can imagine trouble happening:
>
>1. Dragging between separate .leo files.  In that case the relevant
>code is 
>def *inter*FileDrop(self, fn, p, s).  That does a paste from the
>clipboard:
>
>pasted = c.fileCommands.getLeoOutlineFromClipboard(s,
>reassignIndices=True)
>
>There might be encoding issues there.  Are you talking about inter-file
>
>drags?
>
>2. Perhaps the changes happened later, after reloading Leo.
>
>Did the changes happen immediately or after reloading Leo?
>
>Finally, is there any reason why you truly need the @encoding
>directive.  
>There is more likelihood of success if you can use defaults that match
>your 
>system.  The relevant settings are in leoSettings.leo in the node 
>@settings-->Unicode options.  You might try changing those, after
>backing 
>everything up...
>
>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 leo-editor+unsubscr...@googlegroups.com.
>To post to this group, send email to leo-editor@googlegroups.com.
>Visit this group at https://groups.google.com/group/leo-editor.
>For more options, visit https://groups.google.com/d/optout.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: OT: A better way to code, by Mike Bostock

2018-03-17 Thread Xavier G. Domingo (xgid)
I have to admit that we are on the same boat here! After 30 years of 
programming, with 20+ programming languages including rare gems like 
CLIPPER and CHILL, I knew I was at home when I found Python. And I'm not 
going to change this, at least on this life! But I know that we *can get 
the goal with Python* (maybe with some help from the javascript world, but 
under control :-) ). My focus is NOT so much on the data visualization side 
of the question, but on the "talking code" side of it, to say it in some 
way.

The main limits to this goal are ourselves. Always!

I will be glad to have you in this journey for the live code! Do we start?

Xavier

On Saturday, March 17, 2018 at 6:50:28 AM UTC-3, Edward K. Ream wrote:
>
>
> ​As I understand him, Offray would agree with you.  It's a highly laudable 
> goal.  I just don't want to give up python to accomplish it.
>
> 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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Please consider becoming a Leo dev, even if you aren't a programmer

2018-03-17 Thread Xavier G. Domingo (xgid)
OK, thanks for your comments. I'll take a look and see what get's my 
attention and let you know.

On Saturday, March 17, 2018 at 6:54:58 AM UTC-3, Edward K. Ream wrote:
>
>
>
> On Sat, Mar 17, 2018 at 12:15 AM, Xavier G. Domingo (xgid) <
> xgdo...@gmail.com > wrote:
>
>> Hi Edward, this is a great idea! I'll take your offer!
>>
>
> ​Excellent.  Glad to hear it.​
>  
>
> I've been trying to get into Leo's code for some time now, so this is an 
>> opportunity I cannot miss. But what makes it a so great idea for me is that 
>> I happened to find Leo when I started a personal quest, after about 30 
>> years of programming, to *learn to program again, from scratch!* So this 
>> is for me the perfect match for both goals.
>>
>> I've had very few time lately, but I expect to have some more in the 
>> coming months, so let's try.
>>
>> But let me warn you: I always like to understand why things work as they 
>> do and will try hard to change them for better if I can... so I may be a 
>> "problematic student" in a sense. ;-) Do you get the challenge?
>>
>
> ​All good. Part of understanding code deeply is what I call "knowing where 
> the bodies are hidden" ;-) That is, knowing which part of the code are much 
> more ugly than one would want.
>
> But doing something about the ugly bits is typically difficult or 
> impossible.  For starters, I recommend the easy things on the to-do list. 
> They are typically marked with the First label 
> 
> .
>
> 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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: OT: A better way to code, by Mike Bostock

2018-03-17 Thread Edward K. Ream
On Sat, Mar 17, 2018 at 12:51 AM, Xavier G. Domingo (xgid) <
xgdomi...@gmail.com> wrote:

> Hi Matt, thanks for sharing this!
>
> It seems that Bostock is a strong follower of Bret Victor, which I've
> found always quite inspiring on better ways of programming. The work at
> observablehq.com  seems strongly focused
> on intensive data manipulation and visualization, but the general idea of
> "live code" it's something I think we all should be after in some way, to
> make someday programming be a real joy for anyone. I'm on this quest also!
>

​As I understand him, Offray would agree with you.  It's a highly laudable
goal.  I just don't want to give up python to accomplish it.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Please consider becoming a Leo dev, even if you aren't a programmer

2018-03-17 Thread Edward K. Ream
On Sat, Mar 17, 2018 at 12:15 AM, Xavier G. Domingo (xgid) <
xgdomi...@gmail.com> wrote:

> Hi Edward, this is a great idea! I'll take your offer!
>

​Excellent.  Glad to hear it.​


I've been trying to get into Leo's code for some time now, so this is an
> opportunity I cannot miss. But what makes it a so great idea for me is that
> I happened to find Leo when I started a personal quest, after about 30
> years of programming, to *learn to program again, from scratch!* So this
> is for me the perfect match for both goals.
>
> I've had very few time lately, but I expect to have some more in the
> coming months, so let's try.
>
> But let me warn you: I always like to understand why things work as they
> do and will try hard to change them for better if I can... so I may be a
> "problematic student" in a sense. ;-) Do you get the challenge?
>

​All good. Part of understanding code deeply is what I call "knowing where
the bodies are hidden" ;-) That is, knowing which part of the code are much
more ugly than one would want.

But doing something about the ugly bits is typically difficult or
impossible.  For starters, I recommend the easy things on the to-do list.
They are typically marked with the First label

.

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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


#789 -- Building Sphinx documentation

2018-03-17 Thread drmikecrowe
Hey folks,

Was going to take a stab at #789 
.  However, need some 
in leo/doc/html, doing a "make html" creates _build/html, but there's no 
index.html and other missing files.

Can somebody give me some guidance on what I'm missing?

If I copy index.html, default.css, leo_rst.css, silver_city.css to their 
respective directories, I can (sorta) get the site running locally, but I 
feel I'm missing a step.

If I use the search.html page, no results returned.  I debugged a little, 
and it's like the _sources directory isn't properly populated (further 
thinking I'm missing a step)

Any guidance?

-- 
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 leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.