X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fplugins%2Fcatalog-plugin.vala;h=de2cf0e1dd4678c3e2dd4e630521a687f281a91d;hb=dda1b1ece01fa8bf31eaea7406d0bad2b131c9e2;hp=3616e346ea9d52e5f2240e54bec27b6d1245f948;hpb=a227131f3236592460414b7f632a82d08c1db0d0;p=cinaest diff --git a/src/plugins/catalog-plugin.vala b/src/plugins/catalog-plugin.vala index 3616e34..de2cf0e 100644 --- a/src/plugins/catalog-plugin.vala +++ b/src/plugins/catalog-plugin.vala @@ -84,13 +84,13 @@ class CatalogPlugin : Plugin { int i = 0; var available_sources = new List (); foreach (CatalogSource s in sources) { - if (!s.contains (movie)) { + if (!s.contains (movie) && s.table != "Watched") { available_sources.append ((MovieSource) s); i++; } } - var source_list = new SourceListView (available_sources, true); + var source_list = new SourceListView (available_sources, true, window); var content = (VBox) dialog.get_content_area (); content.pack_start (source_list, true, true, 0); @@ -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); @@ -202,7 +177,7 @@ class CatalogPlugin : Plugin { dialog.set_transient_for (window); dialog.set_title (_("Select active movie lists")); - var source_list = new SourceListView (sources, false); + var source_list = new SourceListView (sources, false, window); source_list.set_hildon_ui_mode (UIMode.EDIT); var selection = source_list.get_selection (); @@ -337,8 +312,8 @@ class CatalogSource : MovieSource { return description; } - public override bool get_editable () { - return true; + public override SourceFlags get_flags () { + return SourceFlags.EDITABLE; } }