[Bugs] #1357 IMME: Don't automount all the volumes at startup

Sugar Labs Bugs bugtracker-noreply at sugarlabs.org
Tue Oct 13 06:02:24 EDT 2009


#1357: Don't automount all the volumes at startup
--------------------------+-------------------------------------------------
    Reporter:  erikos     |          Owner:  tomeu      
        Type:  defect     |         Status:  reopened   
    Priority:  Immediate  |      Milestone:  0.86       
   Component:  sugar      |        Version:  0.84.x     
    Severity:  Major      |     Resolution:             
    Keywords:             |   Distribution:  Unspecified
Status_field:  Assigned   |  
--------------------------+-------------------------------------------------

Comment(by tomeu):

 Just checked the Nautilus source and wrote in python the func that decides
 which drives, volumes and mounts should be displayed in the sidebar:

 {{{
 import gio

 monitor = gio.volume_monitor_get()
 for drive in monitor.get_connected_drives():
     if drive.get_volumes():
         for volume in drive.get_volumes():
             mount = volume.get_mount()
             if mount is not None:
                 print 'Mount: %r %r %r' % (mount.get_icon(),
 mount.get_root(), mount.get_name())
             else:
                 print 'Volume: %r %r' % (volume.get_icon(),
 volume.get_name())
     elif drive.is_media_removable() and not
 drive.is_media_check_automatic():
         print 'Drive: %r %r' % (drive.get_icon(), drive.get_name())

 for volume in monitor.get_volumes():
     if volume.get_drive() is not None:
         continue
     mount = volume.get_mount()
     if mount is not None:
         print 'Mount: %r %r %r' % (mount.get_icon(), mount.get_root(),
 mount.get_name())
     else:
         print 'Volume: %r %r' % (volume.get_icon(), volume.get_name())

 for mount in monitor.get_mounts():
     if mount.is_shadowed() or mount.get_volume() is not None:
         continue
     print 'Mount: %r %r %r' % (mount.get_icon(), mount.get_root(),
 mount.get_name())

 }}}

 What is printed is what we should be displaying, except probably the
 drive.

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


More information about the Bugs mailing list