On Sun, 23 Jun 2013 05:19:25 -0700 (PDT)
Fidel Pérez <[email protected]> wrote:
> If someone confirms me its worth it, I will learn to use github then edit
> that line in the git code and propose it... I dont know anything about
> github and it will probably be a while for me to learn, so please only
> confirm if you are willing to accept that change hehehe.
Leo's source is hosted on Launchpad, not Github :)
> > createIconButton (self,text,command,statusLine,bg=None,kind=None,
> >> LiteralCaption=False)
Hmm, so if LiteralCaption == True, text shouldn't be adjusted before
being used to title the button. But it will need to be adjusted to
create the command name. Which is ok, I'm just wondering if this might
be more flexible:
createIconButton(self,text,command,statusLine,bg=None,kind=None,
button_text=None)
If button_text != None then it's used to title the button. This would
allow things like
createIconButton('add braces',command,statusLine,bg=None,kind=None,
button_text="{}")
Etc. In the above it would be hard to adjust "{}" to make a sensible
command name, if that were the only text supplied.
The button_text approach is flexible, it's just a bit odd, would need
to be doc'ed clearly.
Cheers -Terry
> >
> >
> > By default it wouldnt affect or change anything now, but it would make
> > available for the user to define the literal caption of the button,
> > regardless of the cleaned-up-command-name, which would look great for
> > button interfaces (as the one Im making which main purpose is actually to
> > attract new users...)
> >
> > I just tested it and it by editing leopluginsref.py and looks great!! (Prev
> > change <http://i.imgur.com/y0SKjRY.png>) (After
> > change<http://i.imgur.com/QObPTO2.png>)
> > (After change button with working command <http://i.imgur.com/Zn8K43s.png>
> > )
> >
> > The only changes to be made in the function are the following:
> >
> > createIconButton (self,text,command,statusLine,bg=None,kind=None
> >> ,LiteralCaption=False)
> >
> >
> > Then switch from this snapshot <http://i.imgur.com/kubyFkt.png> for this
> > one <http://i.imgur.com/JRVNrUN.png> just by adding this:
> >
> > if LiteralCaption:
> >> truncatedText=text
> >> else:
> >
> >
> > Done!
> >
> >
> >
> >
> >
>
--
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/groups/opt_out.