If the source is editable, movies can be deleted from it.
src/main.vala
src/movie-list-menu.vala
src/movie-list-window.vala
+src/movie-menu.vala
src/plugins/catalog-plugin.vala
src/plugins/imdb-plugin.vala
src/plugins/google-plugin.vala
actions.append (action);
}
}
+ if (store.get_editable ()) {
+ var button = new Gtk.Button.with_label (_("Delete movie"));
+ button.clicked.connect (on_delete_movie);
+ append (button);
+ }
show_all ();
}
+
+ private void on_delete_movie () {
+ var dialog = new Note.confirmation (parent_window, _("Delete movie '%s'?").printf (movie.title));
+ var res = dialog.run ();
+
+ if (res == Gtk.ResponseType.OK) {
+ store.remove (movie);
+ }
+ dialog.destroy ();
+ }
}