public void HandleRemoveCommand (object sender, EventArgs args)
{
// Don't steal characters from any text entries
if (Window.Focus is Gtk.Entry && Gtk.Global.CurrentEvent is Gdk.EventKey) {
Window.Focus.ProcessEvent (Gtk.Global.CurrentEvent);
return;
}
Photo[] photos = SelectedPhotos ();
if (photos.Length == 0)
return;
string header = Catalog.GetPluralString ("Remove the selected photo from F-Spot?",
"Remove the {0} selected photos from F-Spot?",
photos.Length);
header = String.Format (header, photos.Length);
string msg = Catalog.GetString ("If you remove photos from the F-Spot catalog all tag information will be lost. The photos remain on your computer and can be imported into F-Spot again.");
string ok_caption = Catalog.GetString ("_Remove from Catalog");
if (ResponseType.Ok == HigMessageDialog.RunHigConfirmation (GetToplevel (sender), DialogFlags.DestroyWithParent,
MessageType.Warning, header, msg, ok_caption)) {
Database.Photos.Remove (photos);
UpdateQuery ();
}
}