[Bugs] #626 UNSP: spurious storage devices in Frame on bootup

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Tue Apr 7 06:12:58 EDT 2009


#626: spurious storage devices in Frame on bootup
------------------------------------------+---------------------------------
    Reporter:  tomeu                      |          Owner:  tomeu            
        Type:  defect                     |         Status:  new              
    Priority:  Unspecified by Maintainer  |      Milestone:  0.84             
   Component:  sugar                      |        Version:  Git as of bugdate
    Severity:  Blocker                    |     Resolution:                   
    Keywords:                             |   Distribution:  SoaS             
Status_field:  New                        |  
------------------------------------------+---------------------------------

Comment(by tomeu):

 This seems to work here:

 {{{
 diff --git a/extensions/deviceicon/volume.py
 b/extensions/deviceicon/volume.py
 index 5c4c49e..1dcabfb 100644
 --- a/extensions/deviceicon/volume.py
 +++ b/extensions/deviceicon/volume.py
 @@ -109,6 +109,9 @@ def _mount_removed_cb(volume_monitor, mount, tray):
      del _icons[mount]

  def _add_device(mount, tray):
 +    if mount.get_drive() is None or not
 mount.get_drive().is_media_removable():
 +        return
 +
      icon = DeviceView(mount)
      _icons[mount] = icon
      tray.add_device(icon)
 diff --git a/src/jarabe/journal/volumestoolbar.py
 b/src/jarabe/journal/volumestoolbar.py
 index b21832e..69516c4 100644
 --- a/src/jarabe/journal/volumestoolbar.py
 +++ b/src/jarabe/journal/volumestoolbar.py
 @@ -78,6 +78,9 @@ class VolumesToolbar(gtk.Toolbar):
      def _add_button(self, mount):
          logging.debug('VolumeToolbar._add_button: %r' % mount.get_name())

 +        if mount.get_drive() is None or not
 mount.get_drive().is_media_removable():
 +            return
 +
          button = VolumeButton(mount)
          button.props.group = self._volume_buttons[0]
          button.connect('toggled', self._button_toggled_cb)
 }}}

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


More information about the Bugs mailing list