[Trac #559] icons inside activities are not loaded

Zarro Boogs per Child bugtracker at laptop.org
Wed Jan 3 10:02:01 EST 2007


#559: icons inside activities are not loaded
------------------------+---------------------------------------------------
 Reporter:  ywwg        |        Owner:  ywwg   
     Type:  defect      |       Status:  new    
 Priority:  high        |    Milestone:  BTest-2
Component:  distro      |   Resolution:         
 Keywords:  sugar-love  |  
------------------------+---------------------------------------------------
Comment (by godiard):

 I have a posible solution:

 {{{
 [gonzalo at ned activity]$ diff -ubB bundle.py.ori bundle.py
 --- bundle.py.ori       2007-01-02 14:36:31.000000000 -0300
 +++ bundle.py   2007-01-03 12:36:15.000000000 -0300
 @@ -50,6 +51,10 @@

          if cp.has_option(section, 'icon'):
              self._icon = cp.get(section, 'icon')
 +
 logging.debug(os.path.join(os.path.dirname(info_path),self._icon+".svg"))
 +            if
 os.path.isfile(os.path.join(os.path.dirname(info_path),self._icon+".svg")):
 +               self._icon =
 os.path.join(os.path.dirname(info_path),self._icon+".svg")
 +

          if cp.has_option(section, 'activity_version'):
              self._activity_version = int(cp.get(section,
 'activity_version'))

 [gonzalo at ned graphics]$ diff -ubB canvasicon.py.ori canvasicon.py
 --- canvasicon.py.ori   2007-01-02 14:36:31.000000000 -0300
 +++ canvasicon.py       2007-01-03 12:36:24.000000000 -0300
 @@ -51,6 +51,10 @@
              return rsvg.Handle(data=data)

      def get_handle(self, name, color, size):
 +       if os.path.isfile(name):
 +            icon = self._read_icon(name, color)
 +            return icon
 +
          info = self._theme.lookup_icon(name, int(size), 0)

          if color:
 }}}
 Its ok?

-- 
Ticket URL: <http://dev.laptop.org/ticket/559#comment:2>
One Laptop Per Child <http://laptop.org/>



More information about the Bugs mailing list