[Bugs] #4173 sugar UNSP: Adjusting sliders via touch in Speaker or Speech frame device dismisses the palette

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Sat Nov 24 04:28:54 EST 2012


#4173: Adjusting sliders via touch in Speaker or Speech frame device dismisses the
palette
------------------------------------------+---------------------------------
    Reporter:  garycmartin                |          Owner:  erikos     
        Type:  defect                     |         Status:  new        
    Priority:  Unspecified by Maintainer  |      Milestone:  0.98       
   Component:  sugar                      |        Version:  0.97.x     
    Severity:  Unspecified                |       Keywords:  13.1.0     
Distribution:  Unspecified                |   Status_field:  Unconfirmed
------------------------------------------+---------------------------------

Comment(by erikos):

 Quick changes I did for testing.

 {{{
 diff --git a/extensions/deviceicon/speaker.py
 b/extensions/deviceicon/speaker.py
 index c541675..329a8a7 100644
 --- a/extensions/deviceicon/speaker.py
 +++ b/extensions/deviceicon/speaker.py
 @@ -48,6 +48,7 @@ class DeviceView(TrayIcon):

          self.set_palette_invoker(FrameWidgetInvoker(self))
          self.palette_invoker.props.toggle_palette = True
 +        self.palette_invoker.props.lock_palette = True

          self._model = DeviceModel()
          self._model.connect('notify::level',
 self.__speaker_status_changed_cb)
 diff --git a/extensions/deviceicon/speech.py
 b/extensions/deviceicon/speech.py
 index 79b50a6..7122331 100644
 --- a/extensions/deviceicon/speech.py
 +++ b/extensions/deviceicon/speech.py
 @@ -47,6 +47,7 @@ class SpeechDeviceView(TrayIcon):
          TrayIcon.__init__(self, icon_name=_ICON_NAME,
 xo_color=self._color)
          self.set_palette_invoker(FrameWidgetInvoker(self))
          self.palette_invoker.props.toggle_palette = True
 +        self.palette_invoker.props.lock_palette = True

          self._manager = speech.get_speech_manager()
 }}}

 {{{
 diff --git a/src/sugar3/graphics/palettewindow.py
 b/src/sugar3/graphics/palettewindow.py
 index 7063681..28218e2 100644
 --- a/src/sugar3/graphics/palettewindow.py
 +++ b/src/sugar3/graphics/palettewindow.py
 @@ -1198,14 +1198,14 @@ class WidgetInvoker(Invoker):
              return False
          alloc = widget.get_allocation()
          arrow_size = style.TOOLBAR_ARROW_SIZE / 2
 -        y = alloc.height - arrow_size
 +        y = alloc.y
          x = (alloc.width - arrow_size) / 2
          context = widget.get_style_context()
          context.add_class('toolitem')
          if self.locked:
 -            Gtk.render_arrow(context, cr, 0, x, y, arrow_size)
 -        else:
              Gtk.render_arrow(context, cr, math.pi, x, y, arrow_size)
 +        else:
 +            Gtk.render_arrow(context, cr, 0, x, y, arrow_size)
 }}}

 The arrow drawing we would need to make dependent on where the icon is
 (toolbar or frame), or add an option.

-- 
Ticket URL: <http://bugs.sugarlabs.org/ticket/4173#comment:3>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list