Re: Code academy: icons

2016-02-19 Thread Edward K. Ream
On Sat, Feb 6, 2016 at 3:17 PM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

> On Sat, 6 Feb 2016 14:36:29 -0600
> "'Terry Brown' via leo-editor"  wrote:
>
> > If you'd tested
> > 'icons' instead of 'lineYOffset', you'd have seen no problem.
>
> I see you were following an example that tested 'lineYOffset'.  Also, I
> see no use of 'lineYOffset' in the code base except setting to 3 when
> icons are added and 0 when they're deleted, I think it's debris from
> the old Tk interface.
>
> So I've deleted all reference to it, and you'll need to use
>
>   aList = [p.copy() for p in c.all_unique_positions()
>if 'icons' in p.u]
>
> for getting the list of nodes with icons.
>
> Hope that's not breaking too much of anything for anyone - banking on
> most people other that Edward ;-) picking 'icons' rather than
> 'lineYOffset' as a text target :-)
>

​Excellent.  'icons' is obviously a much better key into p.v.u.

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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-02-07 Thread Richard Andersen
Thank you so much, Terry.   

That really helps clarify.  

I'll switch to 'icons' in my code.   Will also update my full build from the 
trunk in the next day or two well. 

-Richard

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-02-06 Thread 'Terry Brown' via leo-editor
On Sat, 6 Feb 2016 14:36:29 -0600
"'Terry Brown' via leo-editor"  wrote:

> If you'd tested
> 'icons' instead of 'lineYOffset', you'd have seen no problem.

I see you were following an example that tested 'lineYOffset'.  Also, I
see no use of 'lineYOffset' in the code base except setting to 3 when
icons are added and 0 when they're deleted, I think it's debris from
the old Tk interface.

So I've deleted all reference to it, and you'll need to use 

  aList = [p.copy() for p in c.all_unique_positions()
   if 'icons' in p.u]

for getting the list of nodes with icons.

Hope that's not breaking too much of anything for anyone - banking on
most people other that Edward ;-) picking 'icons' rather than
'lineYOffset' as a text target :-)

Cheers -Terry

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-02-06 Thread 'Terry Brown' via leo-editor
On Sat, 6 Feb 2016 11:00:38 -0800 (PST)
Richard Andersen  wrote:

[snip]

> ''' create a listing of all nodes which have icons '''
> 
> aList = [p.copy() for p in c.all_unique_positions() if 'lineYOffset'
> in p.u] #print('\n'.join([p.h for p in aList]))
> g.es_print('\n'.join([p.h for p in aList]))
> 
> ... because the nodes show up in the list produced by Script 3 and
> nothing I can do (including running the "delete Todo from all"
> function from within todo.py) is removing the data remnant.   I have
> checked to make sure that there are no Tags on the nodes either.

What you're doing makes sense, you're just tripping over a bit of cruft
in the code base.  Todo.py uses icons, but icons are separate, so
delete Todo isn't relevant.  The problem is that 

c.editCommands.deleteNodeIcons(p=p)

doesn't clean up p.u as fully as it might:

insert an icon...

V {'icons': [{'file': 
u'/mnt/usr1/usr1/home/tbrown/t/Package/leo/git/leo-editor/leo/Icons/Tango/16x16/devices/battery.png',
'on': 'VNode',
'relPath': u'Tango/16x16/devices/battery.png',
'type': 'file',
'where': 'beforeHeadline',
'xoffset': 2,
'xpad': 1,
'yoffset': 0}],
 'lineYOffset': 3}

delete all icons

V {'lineYOffset': 0}

c.editCommands.deleteNodeIcons(p=p) should delete both 'icons' *and*
'lineYOffset' from p.u, but it leaves that remnant.  If you'd tested
'icons' instead of 'lineYOffset', you'd have seen no problem.  I guess
it is setting it back to zero, but seeing that's the default / assumed,
deleting it would be cleaner, I'll make that change on trunk, but you
can just check 'icons' instead as a work around / avoidance.

Cheers -Terry terry_n_br...@yahoo.com

> It's a puzzler for me -- probably a no-brainer for many others.   
> 
> -Richard
> 
> On Sunday, January 31, 2016 at 6:34:21 AM UTC-8, Terry Brown wrote:
> >
> > On Sat, 30 Jan 2016 18:18:17 -0600 
> > "Edward K. Ream"  wrote: 
> >
> > > On Sat, Jan 30, 2016 at 5:57 PM, Largo84  > > > 
> > wrote: 
> > > 
> > > I struggled w/ Git at first too, but found that Sourcetree 
> > > >  made
> > > > it a lot easier for me. 
> >
> > GitHub has recently (< 6 months?) released a "GitHub desktop" 
> > https://desktop.github.com/ 
> > app. which seems ok, I usually use the command-line (or gitk for 
> > review). But the desktop app. might help some. 
> >
> > Cheers -Terry 
> >
> > > ​I too started with SourceTree.  Alas, it has severe performance 
> > > problems. Imo, its best feature is gui-oriented selective adding.
> > > You can do something similar on the command line with git add -p,
> > > but I never have. 
> > > 
> > > I finally got fed up with the performance problems (and small
> > > fonts, which they refused to fix) and switched to gitk.  Works
> > > fine for routine tasks. ​ 
> > > 
> > > > I still don't really 'get Git', but I'm using it nonetheless.
> > > > For pull requests only, it's pretty simple. 
> > > 
> > > ​Yes, me too. 
> > > 
> > > 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-02-06 Thread Richard Andersen
Would certainly appreciate understanding where my mistake is in my code 
below.It's rather perplexing because the GUI is doing what I want, but 
something isn't changing within the underlying data structure.

The icon manipulations scripts are really great, except for one.

Adding icons (script 1 here) and deleting icons (script 2 here) are working 
well for me in the UI, but some hidden remnants must still exist (after 
running script 3 here)...


*=== script 1 (I created an @button script) ===*

@language python

''' add 3 icons to a node '''

table = (
'edittrash.png',
'connect_no.png',
'error.png',
)
for icon in table:
fn = g.os_path_finalize_join(g.app.loadDir,
'..', 'Icons', 'Tango', '16x16', 'status', icon)
if g.os_path_exists(fn):
c.editCommands.insertIconFromFile(path=fn)


*=== script 2 (I created an @button script) ===*

@language python

''' remove icons from the node '''

c.editCommands.deleteNodeIcons(p=p)


*=== script 3 ===*

@language python

''' create a listing of all nodes which have icons '''

aList = [p.copy() for p in c.all_unique_positions() if 'lineYOffset' in p.u]
#print('\n'.join([p.h for p in aList]))
g.es_print('\n'.join([p.h for p in aList]))


... because the nodes show up in the list produced by Script 3 and nothing 
I can do (including running the "delete Todo from all" function from within 
todo.py) is removing the data remnant.   I have checked to make sure that 
there are no Tags on the nodes either.

It's a puzzler for me -- probably a no-brainer for many others.   

-Richard



On Sunday, January 31, 2016 at 6:34:21 AM UTC-8, Terry Brown wrote:
>
> On Sat, 30 Jan 2016 18:18:17 -0600 
> "Edward K. Ream"  wrote: 
>
> > On Sat, Jan 30, 2016 at 5:57 PM, Largo84  
> wrote: 
> > 
> > I struggled w/ Git at first too, but found that Sourcetree 
> > >  made it a 
> > > lot easier for me. 
>
> GitHub has recently (< 6 months?) released a "GitHub desktop" 
> https://desktop.github.com/ 
> app. which seems ok, I usually use the command-line (or gitk for 
> review). But the desktop app. might help some. 
>
> Cheers -Terry 
>
> > ​I too started with SourceTree.  Alas, it has severe performance 
> > problems. Imo, its best feature is gui-oriented selective adding. You 
> > can do something similar on the command line with git add -p, but I 
> > never have. 
> > 
> > I finally got fed up with the performance problems (and small fonts, 
> > which they refused to fix) and switched to gitk.  Works fine for 
> > routine tasks. ​ 
> > 
> > > I still don't really 'get Git', but I'm using it nonetheless. For 
> > > pull requests only, it's pretty simple. 
> > 
> > ​Yes, me too. 
> > 
> > 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-31 Thread 'Terry Brown' via leo-editor
On Sat, 30 Jan 2016 18:18:17 -0600
"Edward K. Ream"  wrote:

> On Sat, Jan 30, 2016 at 5:57 PM, Largo84  wrote:
> 
> I struggled w/ Git at first too, but found that Sourcetree
> >  made it a
> > lot easier for me.

GitHub has recently (< 6 months?) released a "GitHub desktop"
https://desktop.github.com/
app. which seems ok, I usually use the command-line (or gitk for
review). But the desktop app. might help some.

Cheers -Terry

> ​I too started with SourceTree.  Alas, it has severe performance
> problems. Imo, its best feature is gui-oriented selective adding. You
> can do something similar on the command line with git add -p, but I
> never have.
> 
> I finally got fed up with the performance problems (and small fonts,
> which they refused to fix) and switched to gitk.  Works fine for
> routine tasks. ​
> 
> > I still don't really 'get Git', but I'm using it nonetheless. For
> > pull requests only, it's pretty simple.
> 
> ​Yes, me too.
> 
> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread Edward K. Ream
On Sat, Jan 30, 2016 at 11:33 AM, Richard Andersen 
wrote:

> Sorry if this is a really basic question.
>
> I'm running the Leo 5.1 release.How do I take advantage of changes
> such as this one described here, where very recent changes have been made
> to Leo's core?
>

​Use git, as described yesterday.

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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread 'Terry Brown' via leo-editor
On Sat, 30 Jan 2016 13:23:20 -0600
"Edward K. Ream"  wrote:

> On Sat, Jan 30, 2016 at 11:33 AM, Richard Andersen
>  wrote:
> 
> > Sorry if this is a really basic question.
> >
> > I'm running the Leo 5.1 release.How do I take advantage of
> > changes such as this one described here, where very recent changes
> > have been made to Leo's core?
> 
> ​Use git, as described yesterday.

I know this is the canonical answer :-) but would point out that you
can also download
https://github.com/leo-editor/leo-editor/archive/master.zip
as linked here
http://leoeditor.com/download.html (the "Latest" link).

Which gives you the latest code without using git.

Cheers -Terry

> 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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread Edward K. Ream
On Sat, Jan 30, 2016 at 1:50 PM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

​> ​
you
​ ​
can also download

> https://github.com/leo-editor/leo-editor/archive/master.zip
> as linked here
> http://leoeditor.com/download.html (the "Latest" link).
>
> Which gives you the latest code without using git.
>

​Thanks for pointing this out. Any tool like bzr or git has a learning
curve. Downloading daily snapshots can keep people current without that
cost.

Having said that, if you want to contribute to Leo the only way to do so
directly is to use git.  More importantly, perhaps, git is a truly great
tool. It has so many indirect benefits.  For example, it can tell you what
files have changed, which makes it much less scary to fool around with code.

Edward



>
> Cheers -Terry
>
> > 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 post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
--
Edward K. Ream: edream...@gmail.com Leo: http://leoeditor.com/
--

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread Richard Andersen
Sorry if this is a really basic question.

I'm running the Leo 5.1 release.How do I take advantage of changes such 
as this one described here, where very recent changes have been made to 
Leo's core?

-Richard

On Friday, January 29, 2016 at 8:24:06 AM UTC-8, Edward K. Ream wrote:
>
> On Fri, Jan 29, 2016 at 9:08 AM, Edward K. Ream  > wrote:
>
> You can delete the icons using the delete-node-icons command.
>>
>
> ​With a minor change to Leo's core, it is now easy to delete the icons of 
> the node at position p:
>
> c.editCommands.deleteNodeIcons(p=p)
>
> As Terry points out, other code works too, but the above is the clearest, 
> imo, because it is higher level and more descriptive.
>
> EKR
>

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread Largo84
I struggled w/ Git at first too, but found that Sourcetree 
 made it a lot 
easier for me. I still don't really 'get Git', but I'm using it 
nonetheless. For pull requests only, it's pretty simple.

Rob...

On Saturday, January 30, 2016 at 5:11:06 PM UTC-5, Richard Andersen wrote:
>
> Thanks, guys.
>
> I downloaded the latest .zip folder and have the latest Leo working.
>
> I'll need to explore git further, as it looks like it would allow me to 
> stay current more efficiently than the .zip download.I'm glad to know 
> about both options.
>
> -Richard
>
> On Saturday, January 30, 2016 at 12:14:11 PM UTC-8, Edward K. Ream wrote:
>>
>>
>>
>> On Sat, Jan 30, 2016 at 1:50 PM, 'Terry Brown' via leo-editor <
>> leo-e...@googlegroups.com> wrote:
>>
>> ​> ​
>> you
>> ​ ​
>> can also download
>>
>>> https://github.com/leo-editor/leo-editor/archive/master.zip
>>> as linked here
>>> http://leoeditor.com/download.html (the "Latest" link).
>>>
>>> Which gives you the latest code without using git.
>>>
>>
>> ​Thanks for pointing this out. Any tool like bzr or git has a learning 
>> curve. Downloading daily snapshots can keep people current without that 
>> cost.
>>
>> Having said that, if you want to contribute to Leo the only way to do so 
>> directly is to use git.  More importantly, perhaps, git is a truly great 
>> tool. It has so many indirect benefits.  For example, it can tell you what 
>> files have changed, which makes it much less scary to fool around with code.
>>
>> Edward
>>
>>  
>>
>>>
>>> Cheers -Terry
>>>
>>> > 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+...@googlegroups.com.
>>> To post to this group, send email to leo-e...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/leo-editor.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> -- 
>>
>> --
>> Edward K. Ream: edre...@gmail.com Leo: http://leoeditor.com/
>>
>> --
>>
>

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread Richard Andersen
Thanks, guys.

I downloaded the latest .zip folder and have the latest Leo working.

I'll need to explore git further, as it looks like it would allow me to 
stay current more efficiently than the .zip download.I'm glad to know 
about both options.

-Richard

On Saturday, January 30, 2016 at 12:14:11 PM UTC-8, Edward K. Ream wrote:
>
>
>
> On Sat, Jan 30, 2016 at 1:50 PM, 'Terry Brown' via leo-editor <
> leo-e...@googlegroups.com > wrote:
>
> ​> ​
> you
> ​ ​
> can also download
>
>> https://github.com/leo-editor/leo-editor/archive/master.zip
>> as linked here
>> http://leoeditor.com/download.html (the "Latest" link).
>>
>> Which gives you the latest code without using git.
>>
>
> ​Thanks for pointing this out. Any tool like bzr or git has a learning 
> curve. Downloading daily snapshots can keep people current without that 
> cost.
>
> Having said that, if you want to contribute to Leo the only way to do so 
> directly is to use git.  More importantly, perhaps, git is a truly great 
> tool. It has so many indirect benefits.  For example, it can tell you what 
> files have changed, which makes it much less scary to fool around with code.
>
> Edward
>
>  
>
>>
>> Cheers -Terry
>>
>> > 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+...@googlegroups.com .
>> To post to this group, send email to leo-e...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/leo-editor.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> --
> Edward K. Ream: edre...@gmail.com  Leo: http://leoeditor.com/
>
> --
>

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-30 Thread Edward K. Ream
On Sat, Jan 30, 2016 at 5:57 PM, Largo84  wrote:

I struggled w/ Git at first too, but found that Sourcetree
>  made it a lot
> easier for me.
>

​I too started with SourceTree.  Alas, it has severe performance problems.
Imo, its best feature is gui-oriented selective adding. You can do
something similar on the command line with git add -p, but I never have.

I finally got fed up with the performance problems (and small fonts, which
they refused to fix) and switched to gitk.  Works fine for routine tasks.
​


> I still don't really 'get Git', but I'm using it nonetheless. For pull
> requests only, it's pretty simple.
>

​Yes, me too.

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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 9:08 AM, Edward K. Ream  wrote:

You can delete the icons using the delete-node-icons command.
>

​With a minor change to Leo's core, it is now easy to delete the icons of
the node at position p:

c.editCommands.deleteNodeIcons(p=p)

As Terry points out, other code works too, but the above is the clearest,
imo, because it is higher level and more descriptive.

EKR

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 10:01 AM, Edward K. Ream 
wrote:

​
​> ​
I would have thought that calling c.editCommands.deleteNodeIcons() should
work.

​Never mind.  I made several errors.

I changed deleteNodeIcons by adding a p keyword argument so that it could
work on any node, not just c.p.  But I passed p==p to it rather than p=p.
Heh.  It's a new kind of error for me...

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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-29 Thread 'Terry Brown' via leo-editor



 From: Edward K. Ream 
 To: leo-editor  
 Sent: Friday, January 29, 2016 9:08 AM
 Subject: Code academy: icons
   
During our conference call, someone asked whether nodes may have more than one 
icon.  Indeed they can.

For example, running this script will insert three icons. Running the script 
again will insert three more.  You can delete the icons using the 
delete-node-icons command. I'm having trouble deleting icons programmatically.  
I'm investigating.


c.editCommands.setIconList(p, [])c.redraw()
If you don't want to delete them all:icons = c.editCommands.getIconList(p)icons 
= [i for i in icons if ]c.editCommands.setIconList(p, 
icons)

also, add a True param. at end of setIconList call to mark node dirty (changed, 
save required) if desired.
Cheers -Terry


table = (
    'edittrash.png',
    'connect_no.png',
    'error.png',
)
for icon in table:
    fn = g.os_path_finalize_join(g.app.loadDir,
        '..', 'Icons', 'Tango', '16x16', 'status', icon)
    if g.os_path_exists(fn):
        c.editCommands.insertIconFromFile(path=fn)

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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


   

-- 
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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Code academy: icons

2016-01-29 Thread Edward K. Ream
On Fri, Jan 29, 2016 at 9:30 AM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:

​>> ​I'm having trouble deleting icons programmatically.  I'm
investigating.​

c.editCommands.setIconList(p, [])
> c.redraw()
>
> If you don't want to delete them all:
>


> icons = c.editCommands.getIconList(p)
> icons = [i for i in icons if ]
>

​Thanks for this.  ​However, I would have thought that calling
c.editCommands.deleteNodeIcons() should work.  Don't see why not, since
delete-node-icons does work.  Any ideas?

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 post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.