#4311 HIGH Update.: Need cancel button icon in search field

Zarro Boogs per Child bugtracker at laptop.org
Sun Nov 18 10:25:59 EST 2007


#4311: Need cancel button icon in search field
-------------------------------+--------------------------------------------
  Reporter:  Eben              |       Owner:  rwh              
      Type:  defect            |      Status:  new              
  Priority:  high              |   Milestone:  Update.1         
 Component:  journal-activity  |     Version:                   
Resolution:                    |    Keywords:  Update.1? review-
  Verified:  0                 |  
-------------------------------+--------------------------------------------
Changes (by tomeu):

 * cc: tomeu (added)
  * keywords:  Update.1? review? => Update.1? review-


Comment:

 {{{
 from sugar.graphics.icon import _SVGLoader
 }}}

 Should we make this class public? I could use it also for the icons in
 comboboxes (see #4420). Marco?

 {{{
 color = sugar.profile.get_color()
 entities = {'fill_color': color.get_fill_color(),
             'stroke_color': color.get_stroke_color()}
 }}}

 SVG icons will always get colored with the xo colors? Eben? Perhaps the
 colors should be arguments of the set_icon_from_name method.

 {{{
 def remove_icon(self, position):
     empty_image = gtk.Image()
     _sugarext.IconEntry.set_icon(self, position, empty_image)
 }}}

 IconEntry already has an API for removing an icon:
 icon_entry.set_icon(position, None). Not sure how we should document that,
 though :/

 {{{
 self._cancel_shown = None
 }}}

 Please initialize all member variables in the constructor.

 {{{
 self.connect('key_press_event', self._keypress_event_cb)
 }}}

 Why only connect to key-press-event when the cancel button is added? We
 only want to respond to the Escape key after a cancel button has been
 added? Perhaps we should connect in the constructor?

-- 
Ticket URL: <http://dev.laptop.org/ticket/4311#comment:7>
One Laptop Per Child <http://dev.laptop.org>
OLPC bug tracking system



More information about the Bugs mailing list