Re: Last call before deprecating the nested_splitter plugin

2024-05-25 Thread Edward K. Ream
On Fri, May 24, 2024 at 5:03 PM Thomas Passin  wrote:

The plugin should be pretty easy to get working again, and it does not use
> the nested splitter. One thing to know.  It depends on an HTML template
> file to load the CKEditor and the body content into the Qt widget.  That
> template file exists in Leo's plugins directory but it's not in
> LeoPyRef.leo.  It's named *cke_template.html*.


Good to know. I'll try to remember not to delete it, hehe.

No, I'm not volunteering to get this thing working either.  But it wouldn't
> take much, I think.
>

Thanks for your investigations. Long term, #3931  justifies all
the recent confusion. I'm working on 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3-ou8e9OJEDz06Z9OkShKqfZ402%2BAbsJv7k4yXE8qiyA%40mail.gmail.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread Thomas Passin
I looked at this a bit.  It swaps in an instance of the CKEditor for the 
Leo body editor.  CKEditor is a commercial product whose most basic level 
is under the GPL2 license, and so can be used at no charge.  It's written 
in javascript and runs in a browser.  It's a WYSIWYG )(rich text) editor.  
The plugin loads the Qt browser QWidget, loads the CKEditor code, and you 
can edit your node in full WYSIWYG glory.

The plugin should be pretty easy to get working again, and it does not use 
the nested splitter. One thing to know.  It depends on an HTML template 
file to load the CKEditor and the body content into the Qt widget.  That 
template file exists in Leo's plugins directory but it's not in 
LeoPyRef.leo.  It's named *cke_template.html*.

Using the CK Editor, if you edit a node with it, when you save the node 
will become a rich text HTML file (depending on how you save it).  It won't 
be an ordinary text node any more.  You would have to view it using the CK 
Editor mode - or I *think* that VR3 would render it but this is not tested.

No, I'm not volunteering to get this thing working either.  But it wouldn't 
take much, I think.

On Friday, May 24, 2024 at 12:00:49 PM UTC-4 Edward K. Ream wrote:

> On Friday, May 24, 2024 at 10:49:59 AM UTC-5 Edward K. Ream wrote:
>
> > I shall reinstate plugin, but I am not willing to fix it.
>
> Rev 0d2a7c4 
> 
>  
> in devel reinstates the plugin itself.
>
> #3931  will help 
> create an @file node for it in leoPyRef.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c0912f49-a381-4a70-a6e0-700c94331d55n%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread Edward K. Ream
On Friday, May 24, 2024 at 10:49:59 AM UTC-5 Edward K. Ream wrote:

> I shall reinstate plugin, but I am not willing to fix it.

Rev 0d2a7c4 

 
in devel reinstates the plugin itself.

#3931  will help 
create an @file node for it in leoPyRef.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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c8ec23f5-e147-42b3-8186-183f485f372fn%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread Edward K. Ream
On Friday, May 24, 2024 at 6:29:43 AM UTC-5 Edward K. Ream wrote:

On Fri, May 24, 2024 at 5:59 AM jkn wrote:

jkn@tower:~/leo-editor$ find . -iname "*rich*" 
./leo/plugins/richtext.py


How strange.  Please send me the file.


Mystery partly solved.

gitk reports that I deleted that file at rev cf89a85 on March 23 of this 
year.
I probably deleted the file because it won't work with Qt6. The plugin uses 
QtWebKit.

On March 25 the GitHub version of Leo started requiring PyQt6, so nobody 
has used this plugin with the GitHub version of Leo.

#3930  suggests 
reinstating and porting the plugin so it works on Qt6.
I shall reinstate plugin, but I am not willing to fix it. Does anyone want 
to volunteer?

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/d2eaf8ed-f16b-4877-987f-70edc8d6e4den%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread jkn
sent via email

On Friday, May 24, 2024 at 12:29:43 PM UTC+1 Edward K. Ream wrote:

> On Fri, May 24, 2024 at 5:59 AM jkn  wrote:
>
>> jkn@tower:~/leo-editor$ find . -iname "*rich*" 
>> ./leo/plugins/richtext.py
>>
>
> How strange.  Please send me the file.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/331e1992-832f-45b0-b8c5-c183eff7a3ffn%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread Edward K. Ream
On Fri, May 24, 2024 at 5:59 AM jkn  wrote:

> jkn@tower:~/leo-editor$ find . -iname "*rich*"
> ./leo/plugins/richtext.py
>

How strange.  Please send me the file.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1fMo30SSHRRBxE%2Bwi4TtqFsicd7-E-usv02EVZt%3DByQg%40mail.gmail.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread jkn
jkn@tower:~/leo-editor$ find . -iname "*rich*" 
./leo/plugins/richtext.py

on my system...


On Friday, May 24, 2024 at 11:42:49 AM UTC+1 Edward K. Ream wrote:

> On Thursday, May 23, 2024 at 2:16:00 PM UTC-5 Edward K. Ream wrote:
>
> On Thu, May 23, 2024 at 10:39 AM Thomas wrote:
>
> [The free_layout.get_top_splitter] method is used by the *richtext* 
> plugin as well as the flc itself.
>
>
> Good catch. I'll convert the richtext plugin.
>
>
> Where is this plugin? An external search for *text.py finds three files, 
> none of which looks like richtext.py.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/1b91d17a-6bdd-4fd6-8f36-7a84ade8cc0an%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-24 Thread Edward K. Ream
On Thursday, May 23, 2024 at 2:16:00 PM UTC-5 Edward K. Ream wrote:

On Thu, May 23, 2024 at 10:39 AM Thomas wrote:

[The free_layout.get_top_splitter] method is used by the *richtext* plugin 
as well as the flc itself.


Good catch. I'll convert the richtext plugin.


Where is this plugin? An external search for *text.py finds three files, 
none of which looks like richtext.py.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/da150ddf-d146-4b7f-9a69-38b4c421a719n%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-23 Thread Edward K. Ream
On Thu, May 23, 2024 at 10:39 AM Thomas Passin  wrote:

[The free_layout.get_top_splitter] method is used by the *richtext* plugin
> as well as the flc itself.
>

Good catch. I'll convert the richtext plugin.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1yEDjZ0Y%3DVRZtHUDHDMdqA09D442PCs-2f0-Aqk%3Dq7Mw%40mail.gmail.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-23 Thread Thomas Passin
Speaking of which, the free layout controller still has this method:

def get_top_splitter(self) -> Optional[Wrapper]:
"""Return the top splitter of c.frame.top."""
f = self.c.frame
if hasattr(f, 'top') and f.top:
child = f.top.findChild(*NestedSplitter*)  *<*
return child and child.top()
return None

This method is used by the *richtext* plugin as well as the flc itself.

*qt_gui* also has a method by this name but it has been updated to return 
the 'main_splitter'.
On Thursday, May 23, 2024 at 10:52:37 AM UTC-4 Edward K. Ream wrote:

> On Thu, May 23, 2024 at 7:00 AM Thomas Passin  wrote:
>
> Is it correct that the "main" splitter is the one whose splitter bar runs 
>> all the way either from top to bottom or from side to side, depending on 
>> orientation?
>>
>
> Yes, kinda. But you shouldn't take my word for it. Consult the code!
>
> Search for 'main_splitter'. Find *dw.createMainLayout*.
>
> The answer to your question are these lines:
>
> main_splitter = QtWidgets.QSplitter(parent)
> main_splitter.setOrientation(Orientation.Vertical)
> secondary_splitter = QtWidgets.QSplitter(main_splitter)
>
> What's the parent?  cff createMainLayout. The caller is 
> *dw.createMainWindow*. The parent is *dw.centralwidget*.
>
> main_splitter, secondary_splitter = 
> self.createMainLayout(self.centralwidget)
>
> Consult the rest of dw.createMainWindow for further details.
>
> Thomas, you will learn a lot by answering your own questions. You can do 
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/c5ecfcf9-37ad-48c2-8aa4-ca25dbf5aa14n%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-23 Thread Edward K. Ream
On Thu, May 23, 2024 at 7:00 AM Thomas Passin  wrote:

Is it correct that the "main" splitter is the one whose splitter bar runs
> all the way either from top to bottom or from side to side, depending on
> orientation?
>

Yes, kinda. But you shouldn't take my word for it. Consult the code!

Search for 'main_splitter'. Find *dw.createMainLayout*.

The answer to your question are these lines:

main_splitter = QtWidgets.QSplitter(parent)
main_splitter.setOrientation(Orientation.Vertical)
secondary_splitter = QtWidgets.QSplitter(main_splitter)

What's the parent?  cff createMainLayout. The caller is
*dw.createMainWindow*. The parent is *dw.centralwidget*.

main_splitter, secondary_splitter =
self.createMainLayout(self.centralwidget)

Consult the rest of dw.createMainWindow for further details.

Thomas, you will learn a lot by answering your own questions. You can do 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1OmWn76G9j%2Bvsr%3DpS31k8T9O9CJZN0nNKzSA%3D8hARU8A%40mail.gmail.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-23 Thread Thomas Passin
Is it correct that the "main" splitter is the one whose splitter bar runs 
all the way either from top to bottom or from side to side, depending on 
orientation?

On Thursday, May 23, 2024 at 5:10:32 AM UTC-4 Edward K. Ream wrote:

> On Wed, May 22, 2024 at 5:50 PM Thomas Passin  wrote:
>
> I'd like to have a command to place the log frame into its own panel next 
>> to the body editor's. 
>>
> ...
>
>> So there should be three built-in layouts instead of two, and there 
>> should be a command or commands similar to *toggle-split-direction* to 
>> activate any of them.
>>
>
> Such enhancements would be a separate issue. They might affect VR and VR3, 
> but we can deal with that later. 
>
> I also don't like the name "secondary_splitter".
>>
>
> The main splitter contains the secondary splitter. See the code for 
> details. I don't think any other name will be much better.
>
> Qt object names are for debugging and as targets for 
> qt_gui.find_widget_by_name. Changing the names would be yet another 
> breaking change. I don't want to go there.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/a1298cd5-4eba-4ad9-a568-505092b04cden%40googlegroups.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-23 Thread Edward K. Ream
On Wed, May 22, 2024 at 5:50 PM Thomas Passin  wrote:

I'd like to have a command to place the log frame into its own panel next
> to the body editor's.
>
...

> So there should be three built-in layouts instead of two, and there should
> be a command or commands similar to *toggle-split-direction* to activate
> any of them.
>

Such enhancements would be a separate issue. They might affect VR and VR3,
but we can deal with that later.

I also don't like the name "secondary_splitter".
>

The main splitter contains the secondary splitter. See the code for
details. I don't think any other name will be much better.

Qt object names are for debugging and as targets for
qt_gui.find_widget_by_name. Changing the names would be yet another
breaking change. I don't want to go there.

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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1sm%2BBm1u5_jGeUNhPttBT0Qe7obo6%2BAfvz_M1venUm1A%40mail.gmail.com.


Re: Last call before deprecating the nested_splitter plugin

2024-05-22 Thread Thomas Passin
I think one thing is missing.  I'd like to have a command to place the log 
frame into its own panel next to the body editor's.  This layout has the 
tree pane vertically on the left, the body in the middle, and the log frame 
on the right.  I'm sure I could come up with a script to do this, but I 
think there should be a Leo command for it.  The reason is that there are 
times when you want to see many lines in the log frame.  It could be a 
stack trace, the output of key bindings, or an app like my bookmark app or 
RPCalc, that opens in the log frame.  And when VR/VR3 gets opened sharing 
the log frame panel the height crunch gets even worse.

So there should be three built-in layouts instead of two, and there should 
be a command or commands similar to *toggle-split-direction* to activate 
any of them.

I also don't like the name "secondary_splitter".  I have no way to know 
which is "primary" and which is "secondary", and I don't see why I should 
have to or what the distinction is.  Better splitter names would be a good 
thing (sorry I don't have any suggestions yet, but I don't understand the 
distinction so I can't offer any!).

On Wednesday, May 22, 2024 at 5:04:20 PM UTC-4 Edward K. Ream wrote:

> Imo, PR #3911  is 
> ready to be merged into devel.
>
> Please let me know if you disagree.
>
> 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 view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/49e4a351-a293-448a-993c-c2a843a1a025n%40googlegroups.com.