Re: Update re: new model

2018-08-10 Thread Edward K. Ream
On Fri, Aug 10, 2018 at 4:47 PM, Terry Brown wrote: > textEdited seems to fire on every key stroke: > Have you tried the same for the outline editors? Edward -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and

Re: Update re: new model

2018-08-07 Thread Edward K. Ream
On Mon, Aug 6, 2018 at 9:29 PM, Terry Brown wrote: Another way to avoid the surprise of finding GUI involvement in a write > string to file operation would be to make changes to p.h immediate, > like changes to p.b. So p.h changes as you type in the headline > line-edit, then endEditing()

Re: Update re: new model

2018-08-06 Thread Terry Brown
On Mon, 6 Aug 2018 14:48:18 -0500 "Edward K. Ream" wrote: > > AttributeError.  Basically it comes down to requiring, or not > > requiring, the user to do > > if c.gui: > >   c.gui.endEditing() > > (or `c.gui and c.gui.endEditing()`) > > > That's a lot of work, a lot of infrastructure, a lot of

Re: Update re: new model

2018-08-06 Thread Edward K. Ream
On Mon, Aug 6, 2018 at 1:13 PM, Terry Brown wrote: On Mon, Aug 6, 2018 at 9:09 AM Edward K. Ream wrote: > > > Scripts, plugins and Leo itself should be able to call c.endEditing() > anytime, anywhere. Period. Even if the call does not actually make a lot > of sense, c.endEditing should

Re: Update re: new model

2018-08-06 Thread Terry Brown
On Mon, Aug 6, 2018 at 9:09 AM Edward K. Ream wrote: > > On Saturday, August 4, 2018 at 2:39:26 PM UTC-5, vitalije wrote: > > > initialization code should be kept free and clean of any gui calls. > Leo's guiding architectural principle is: There shall be no global > architectural dependencies.

Re: Update re: new model

2018-08-06 Thread Edward K. Ream
On Saturday, August 4, 2018 at 2:39:26 PM UTC-5, vitalije wrote: > initialization code should be kept free and clean of any gui calls. Debatable. > Either writeFromString must not call gui methods like endEditing, either reload_settings, init_env in abbrevCommands must not call

Re: Update re: new model

2018-08-05 Thread vitalije
> > Works for me. However, the tree widget has a light background, even when > using a dark theme. > ATM new tree widget uses hard-coded defaults which I defined to look like a brand new Leo tree without any user configuration. Other than that I added some code to parse global qt stylesheet

Re: Update re: new model

2018-08-04 Thread Edward K. Ream
On Sat, Aug 4, 2018 at 2:39 PM, vitalije wrote: > >> Instead initialization code should be kept free and clean of any gui >> calls. Either writeFromString must not call gui methods like endEditing, >> either reload_settings, init_env in abbrevCommands must not call >> writeFromString. >> >> def

Re: Update re: new model

2018-08-04 Thread Edward K. Ream
On Sat, Aug 4, 2018 at 2:29 PM, vitalije wrote: > Revision 5c8fa20 > > contains fix. > Works for me. However, the tree widget has a light background, even when using a dark theme. > > This is a perfect

Re: Update re: new model

2018-08-04 Thread vitalije
> > > Instead initialization code should be kept free and clean of any gui > calls. Either writeFromString must not call gui methods like endEditing, > either reload_settings, init_env in abbrevCommands must not call > writeFromString. > > def writeFromString(self, root, s,

Re: Update re: new model

2018-08-04 Thread vitalije
Revision 5c8fa20 contains fix. This is a perfect example of the initialization mess. From the traceback it is clearly that this exception was raised during load of settings. It is not possible that

Re: Update re: new model

2018-08-04 Thread Edward K. Ream
On Sat, Aug 4, 2018 at 11:56 AM, Edward K. Ream wrote: > Thanks. On a bike ride with Rebecca. Will try later > Copied leo/core/leoDataModel.py. Now I get: >python c:\leo.repo\leo-editor\launchLeo.py --gui=qttabs --gui=qttabs leo\core\leoPy.leo leo\plugins\leoPlugins.leo

Re: Update re: new model

2018-08-04 Thread Edward K. Ream
Thanks. On a bike ride with Rebecca. Will try later On Sat, Aug 4, 2018 at 11:48 AM Terry Brown wrote: > On Sat, 4 Aug 2018 10:39:03 -0500 > "Edward K. Ream" wrote: > > > ModuleNotFoundError: No module named 'leo.core.leoDataModel' > > > > What should I do? > > Is it this, from an earlier

Re: Update re: new model

2018-08-04 Thread vitalije
Yes it is. Thanks I forgot to put the link. Vitalije On Saturday, August 4, 2018 at 6:48:34 PM UTC+2, Terry Brown wrote: > > On Sat, 4 Aug 2018 10:39:03 -0500 > "Edward K. Ream" > wrote: > > > ModuleNotFoundError: No module named 'leo.core.leoDataModel' > > > > What should I do? > > Is it

Re: Update re: new model

2018-08-04 Thread Terry Brown
On Sat, 4 Aug 2018 10:39:03 -0500 "Edward K. Ream" wrote: > ModuleNotFoundError: No module named 'leo.core.leoDataModel' > > What should I do? Is it this, from an earlier post? "Note, anyone who wants to try this branch, the code needs the latest version of leoDataModel.py file in leo/core/

Re: Update re: new model

2018-08-04 Thread vitalije
File leoDataModel.py is not added to Leo yet, because it is in another repository. You should obtain the latest version of this file and put it in the leo/core/ folder. Having same file in two different repositories would make confusion and unnecessary merge conflicts, so, I prefer not to add

Re: Update re: new model

2018-08-04 Thread vitalije
> Must say I'm surprised by the "draw the tree yourself" approach, but > will see how it pans out. > > I was also considering the other possibility: using QGraphicsScene and QGraphicsItem. That approach would be most similar to the miniTkLeo where tree is drawn in Tk.Canvas by adjusting

Re: Update re: new model

2018-08-04 Thread vitalije
Rev 35cabb5 fixes top row being different background color. In fact it was not different background color but headline edit widget appeared automatically on double click (even if double click was not in

Re: Update re: new model

2018-08-03 Thread Terry Brown
Outline -> Insert/Delete Icons -> Insert Icon just places persistent icons with no particularly meaning to any plugin, even though I was using icons from the todo plugin. I think you might see the coloring of the "top" node issue if you experiment with an outline with a really small number of

Re: Update re: new model

2018-08-03 Thread vitalije
How do you add those icons? When I click in any icon in the Task pane, it always replaces previous icon with the new one. I see that icons are smaller than in old tree. Rev 9d7adae1c now respects setting `@int icon-height` when drawing icons. Vitalije -- You received this message because

Re: Update re: new model

2018-08-03 Thread vitalije
I don't know how you got this top node in the different background color. I have pushed slightly changed version. Icons are now painted over background rectangle. Also I have enlarged font size used for tree. Must say I'm surprised by the "draw the tree yourself" approach, but > will see how

Re: Update re: new model

2018-08-03 Thread Terry Brown
Works better. Attached shows a couple of issues - top node background is a different color, and adding icons shrinks icons vertically, at least the first time you add one. Must say I'm surprised by the "draw the tree yourself" approach, but will see how it pans out. Cheers -Terry On Fri, Aug 3,

Re: Update re: new model

2018-08-03 Thread vitalije
@Terry, please try 5ee7b406 . When running without theme and without myLeoSettings.leo it couldn't find icons for the NewTreeWidget. Now some defaults are set. Vitalije -- You received this message

Re: Update re: new model

2018-08-03 Thread Terry Brown
Just FYI the tree did not render for me. Leo 5.7.4 devel, build 20180607085129, Thu Jun 7 08:51:29 CDT 2018 Git repo info: branch = ltm-leo, commit = eb3b09169816 Python 3.6.6, PyQt version 5.6.2 Windows 10 AMD64 (build 10.0.14393) SP0 isPython3: True probing with g.log(p.h) suggested node

Re: Update re: new model

2018-08-03 Thread vitalije
Revision eb3b09169 added support for visual declutter in NewTreeWidget. It also supports styling via themes qt style sheet like Leo tree currently does. All unit tests pass. I am going to use this code

Re: Update re: new model

2018-08-02 Thread jkn
On Wednesday, August 1, 2018 at 3:20:11 PM UTC+1, vitalije wrote: > > > >> A small point; I suggest not calling the current code 'leo legacy...'. >> There is a presumption there that is unwarranted, I think. >> >> > Sorry about that and thanks for the hint. English is not my first > language.

Re: Update re: new model

2018-08-01 Thread vitalije
NewTreeWidget inherits QFrame and draws everything on its own. Vitalije -- 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.

Re: Update re: new model

2018-08-01 Thread Terry Brown
re style sheet, I think almost all styling has worked by applying the full stylesheet once to the top level window widget, from where it's inherited by all widgets that are descendants of that widget. I know there's a performance penalty for applying a large stylesheet frequently, not sure what

Re: Update re: new model

2018-08-01 Thread vitalije
> > A small point; I suggest not calling the current code 'leo legacy...'. > There is a presumption there that is unwarranted, I think. > > Sorry about that and thanks for the hint. English is not my first language. What would be correct way to label it "master branch Leo"? The latest

Re: Update re: new model

2018-08-01 Thread jkn
Hi Vitalije On Tuesday, July 31, 2018 at 2:50:54 PM UTC+1, vitalije wrote: > > Rev 81b1c1422 > adds > > support for executing old scripts. It has only 7 added lines. > > It also turns off auto-scrolling

Re: Update re: new model

2018-07-31 Thread vitalije
Rev 879a1227 fixed the issue with chapter selection using combobox in the toolbar. I have also added few helper methods in new model to make chapterController and chapter searching methods more

Re: Update re: new model

2018-07-31 Thread vitalije
Rev 81b1c1422 adds support for executing old scripts. It has only 7 added lines. It also turns off auto-scrolling that I used in the beginning when new Leo tree was without its scrollbars. Playing with

Re: Update re: new model

2018-07-30 Thread vitalije
> > > I'm eager to see the code. Could you publish what you have? I promise not > to touch it :-) > >> There are also new things I have learned about Leo and I wish to discuss >> them but right now I am a bit exhausted and I have to rest for the next few >> days. >> > > I have just pushed

Re: Update re: new model

2018-07-30 Thread Edward K. Ream
On Sat, Jul 28, 2018 at 2:40 PM, vitalije wrote: I have incorporated new data model into Leo and all unit tests pass. > A few more comments. Two days ago I had a version which passed all tests for the first time. > However, there have been serious speed issues. Running all tests with new >

Re: Update re: new model

2018-07-30 Thread john lunzer
This *is* exciting. One of my more pressing questions: if a future front end were written which does not use PyQt/PySide, would it benefit from the same speedups during drawing? On Saturday, July 28, 2018 at 3:40:15 PM UTC-4, vitalije wrote: > > I have incorporated new data model into Leo and

Re: Update re: new model

2018-07-29 Thread Edward K. Ream
On Sat, Jul 28, 2018 at 2:40 PM, vitalije wrote: > I have incorporated new data model into Leo and all unit tests pass. > Thanks for this update. This is exciting news. I look forward to studying what you have done. Edward -- You received this message because you are subscribed to the

Update re: new model

2018-07-28 Thread vitalije
I have incorporated new data model into Leo and all unit tests pass. I have estimated two weeks would be enough for the task, and today is fifteenth day since I have started (see other thread ). Running all unit tests with