Catalog plugin: remove watched movies list from "Add to catalog" action
authorPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 14 Jul 2010 21:42:31 +0000 (23:42 +0200)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Wed, 14 Jul 2010 21:42:31 +0000 (23:42 +0200)
This will be replaced by the "Rate" action.

src/plugins/catalog-plugin.vala

index 8f72985..de2cf0e 100644 (file)
@@ -84,7 +84,7 @@ class CatalogPlugin : Plugin {
                int i = 0;
                var available_sources = new List<MovieSource> ();
                foreach (CatalogSource s in sources) {
-                       if (!s.contains (movie)) {
+                       if (!s.contains (movie) && s.table != "Watched") {
                                available_sources.append ((MovieSource) s);
                                i++;
                        }
@@ -130,31 +130,6 @@ class CatalogPlugin : Plugin {
                                        var banner = (Banner) Banner.show_information_with_markup (window, null, _("'%s' added to list of loaned movies").printf (movie.title, source.get_name ()));
                                        banner.set_timeout (1500);
                                }
-                       } else if (source.table == "Watched") {
-                               var dialog = new Gtk.Dialog ();
-                               dialog.set_title (_("Add to watched movies"));
-
-                               var rating = new RatingWidget ();
-                               var date = new Hildon.DateButton (SizeType.FINGER_HEIGHT, ButtonArrangement.VERTICAL);
-                               date.set_title (_("Watched on"));
-                               date.set_alignment (0.0f, 0.5f, 1.0f, 1.0f);
-
-                               content = (Gtk.VBox) dialog.get_content_area ();
-                               content.pack_start (rating, true, false, 0);
-                               content.pack_start (date, true, false, 0);
-
-                               dialog.add_button (_("Done"), Gtk.ResponseType.OK);
-                               dialog.show_all ();
-                               res = dialog.run ();
-                               dialog.destroy ();
-                               if (res == Gtk.ResponseType.OK) {
-                                       if (rating.get_rating () > 0)
-                                               movie.rating = 10 * rating.get_rating ();
-                                       source.add_movie (movie);
-
-                                       var banner = (Banner) Banner.show_information_with_markup (window, null, _("'%s' added to list of watched movies").printf (movie.title, source.get_name ()));
-                                       banner.set_timeout (1500);
-                               }
                        } else {
                                source.add_movie (movie);