Ok, great clarification,I understand now my assumption was wrong hehe.. Thanks!
On Monday, June 24, 2013 2:50:35 PM UTC+2, Terry wrote: > > On Mon, 24 Jun 2013 02:19:29 -0700 (PDT) > Fidel Pérez <[email protected] <javascript:>> wrote: > > > Thank you for your reply and clarifications Terry. > > > > My point would be that, if someone is focusing so much on the icon > caption, > > he wants the button to be pressed (not to be used-through-a-command) so > the > > command wont be important or necessary, since there will be a well named > > button for that, which actually is not going to refer to the command > anyway > > (since, as you posted, the name for the command will have to be very > > different from the icon caption). > > I don't think you should assume no one will want to use the command > name. Perhaps not in the case you're working on, but in general the > flexibility should be there to allow buttons to have both a usable > command name and arbitrary button text. Which means supplying two > pieces of text, the command name always, and, in cases where you don't > want that to be the button text, the button text as well. > > So I'd go with the button_text approach. > > Cheers -Terry > > > So since the user losses the reference to the command anyway, why make > it > > so complex, when simply through adding the LiteralCaption=False/True we > are > > doing the same thing but in a very easy to use and intuitive way, for > this > > case scenario? > > > > On Sunday, June 23, 2013 9:34:47 PM UTC+2, Terry wrote: > > > > > On Sun, 23 Jun 2013 05:19:25 -0700 (PDT) > > > Fidel Pérez <[email protected] <javascript:>> 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! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > g > -- 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.
