You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to project...@googlegroups.com
How does one go about using a custom icon with an action?
I created a 32x32 PNG icon from a picture and pointed to it in Icon().
When I run the application nothing shows up and I get no error, so I am
not sure where to go from here?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to project...@googlegroups.com, Jeroen Dierckx
On 03/22/2013 05:33 AM, Jeroen Dierckx wrote:
> Hello Adrian,
>
> Have you assigned it to the action member "icon"?
> Is the image in the "art" directory?
>
> Try using an icon that is shipped with Camelot first, something like:
>
> class MyAction( Action ):
>
> verbose_name = 'My Action'
> icon = Icon( 'tango/16x16/mimetypes/x-office-document.png' )
>
> Do you see this one?
I called it as shown below:
new_plant_action = OpenNewView(self.get_related_admin(Plant))
new_plant_action.verbose_name = "New Plant"
new_plant_action.icon = Icon('tango/32x32/mimetypes/plant.png')
and yes the stock icons worked.
Hmmm, on a different machine it works. Both machines have the same
version of OS, OpenSUSE 12.2 and I thought the same versions of
libraries. Will have to investigate further.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to project...@googlegroups.com, Jeroen Dierckx
On 03/22/2013 06:40 AM, Adrian Klaver wrote:
> On 03/22/2013 05:33 AM, Jeroen Dierckx wrote:
>> Hello Adrian,
>>
>> Have you assigned it to the action member "icon"?
>> Is the image in the "art" directory?
>>
>> Try using an icon that is shipped with Camelot first, something like:
>>
>> class MyAction( Action ):
>>
>> verbose_name = 'My Action'
>> icon = Icon( 'tango/16x16/mimetypes/x-office-document.png' )
>>
>> Do you see this one?
>
> I called it as shown below:
>
> new_plant_action = OpenNewView(self.get_related_admin(Plant))
> new_plant_action.verbose_name = "New Plant"
> new_plant_action.icon = Icon('tango/32x32/mimetypes/plant.png')
>
> and yes the stock icons worked.
>
> Hmmm, on a different machine it works. Both machines have the same
> version of OS, OpenSUSE 12.2 and I thought the same versions of
> libraries. Will have to investigate further
Figured it out. On the machine where I was not seeing the icon I had an
old installation of Camelot that was on the PYTHONPATH before the one I
thought I was using. Removing the older version cured the issue.