On Mon, 10 Nov 2014 05:15:34 -0800 (PST)
"Edward K. Ream" <[email protected]> wrote:
> The cycle-all-focus command is difficult to do properly because it
> cycles through a list of widgets that changes as tabs are added to
> the Log pane. It has been buggy from day one.
>
> An alternative would be to create a set of commands each of which
> puts focus in a particular pane, for example, the spell tab, or the
> tab created by the print-binding command. That is, each command that
> creates a log tab would create a corresponding "focus-to-x" command.
I wonder if there's an easy way to do that by convention of widget
names. This code:
names = {}
def show_names(nd):
names.setdefault(str(nd.objectName()), set()).add(nd)
for nd in nd.children():
show_names(nd)
show_names(c.frame.top)
for name in sorted(names):
g.es("% 4d %s" % (len(names[name]), name))
g.es(len(names))
reports 207 widget names with their usage count.
Maybe just something like
g.add_focus_to_target(widget_name)
which would create the corresponding Alt-X focus-to-* command.
Also some sort of g.wrapper for
c.frame.top.findChild("widget_name").setFocus(Qt.OtherFocusReason)
Cheers -Terry
> This is more appealing now that Leo supports alt-x history. You
> would just have to complete focus-to-<tab> once, and thereafter you
> could use Alt-x up/down to pick the desired command.
>
> In short, I would like to replace cycle-all-focus with focus-to-x
> commands. I shall do nothing until I hear all your comments.
>
> 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.