public VolumeSource(Gnome.Vfs.Volume vol) { this.Volume = vol; this.Name = vol.DisplayName; try { mount_point = new Uri(vol.ActivationUri).LocalPath; } catch (System.Exception e) { System.Console.WriteLine(e); } uri = mount_point; if (this.Icon == null) { this.Icon = PixbufUtils.LoadThemeIcon(vol.Icon, 32); } if (this.IsIPodPhoto) { this.Icon = PixbufUtils.LoadThemeIcon("gnome-dev-ipod", 32); } if (this.Icon == null && this.IsCamera) { this.Icon = PixbufUtils.LoadThemeIcon("gnome-dev-media-cf", 32); } try { if (this.Icon == null) { this.Icon = new Gdk.Pixbuf(vol.Icon); } } catch (System.Exception e) { System.Console.WriteLine(e.ToString()); } }
public VolumeSource(Gnome.Vfs.Volume vol) { this.Volume = vol; this.Name = vol.DisplayName; try { mount_point = new Uri(vol.ActivationUri).LocalPath; } catch (System.Exception e) { System.Console.WriteLine(e); } uri = mount_point; if (this.Icon == null) { this.Icon = GtkUtil.TryLoadIcon(FSpot.Global.IconTheme, vol.Icon, 32, (Gtk.IconLookupFlags) 0); } if (this.IsIPodPhoto) { this.Icon = GtkUtil.TryLoadIcon(FSpot.Global.IconTheme, "multimedia-player", 32, (Gtk.IconLookupFlags) 0); } if (this.Icon == null && this.IsCamera) { this.Icon = GtkUtil.TryLoadIcon(FSpot.Global.IconTheme, "media-flash", 32, (Gtk.IconLookupFlags) 0); } try { if (this.Icon == null) { this.Icon = new Gdk.Pixbuf(vol.Icon); } } catch (System.Exception e) { System.Console.WriteLine(e.ToString()); } }