122
122
public FileItem (string path)
124
124
this.path = path;
125
this.name = System.IO.Path.GetFileName (Path);
129
short_path = ShortPath (Path);
130
if (short_path == "~")
131
// Sowing only "~" looks too abbreviated.
134
description = short_path;
138
if (icon == "x-directory/normal") {
140
} else if (icon.StartsWith ("image")) {
141
icon = "gnome-mime-image";
143
icon = icon.Replace ('/', '-');
144
icon = string.Format ("gnome-mime-{0}", icon);
146
} catch (NullReferenceException) {
127
151
public virtual string Name {
129
return System.IO.Path.GetFileName (Path);
133
157
public virtual string Description {
137
short_path = ShortPath (Path);
138
if (short_path == "~")
139
// Sowing only "~" looks too abbreviated.
146
163
public virtual string Icon {
152
if (icon == "x-directory/normal") {
154
} else if (icon.StartsWith ("image")) {
155
icon = "gnome-mime-image";
157
icon = icon.Replace ('/', '-');
158
icon = string.Format ("gnome-mime-{0}", icon);
160
} catch (NullReferenceException) {