예제 #1
0
        void HandleMonitorMountRemoved(object o, MountRemovedArgs args)
        {
            // Manually get the mount as gio-sharp translates it to the wrong managed object
            var mount = GLib.MountAdapter.GetObject((GLib.Object)args.Args [0]);

            if (mount.Volume == null)
            {
                return;
            }

            VolumeRemoved(mount.Volume);
        }
예제 #2
0
        void HandleMountRemoved(object o, MountRemovedArgs args)
        {
            // FIXME: due to a bug in GIO#, this will crash when trying to get args.Mount
            Mount m = MountAdapter.GetObject(args.Args[0] as GLib.Object);

            if (Mounts.Any(d => d.Mnt.Handle == m.Handle))
            {
                MountItem mntToRemove = Mounts.First(d => d.Mnt.Handle == m.Handle);

                Mounts.Remove(mntToRemove);
                Items = Mounts.Cast <AbstractDockItem> ();
                mntToRemove.Dispose();

                Log <MountProvider> .Info("{0} unmounted.", m.Name);
            }
        }
예제 #3
0
 void HandleMonitorMountRemoved(object o, MountRemovedArgs args)
 {
     Hyena.Log.Debug("Gio.Manager: received MountRemoved signal");
     VolumeChanged(args.Mount.Volume);
 }