src/movie-list-store.c \
src/movie-list-view.c \
src/movie-list-window.c \
+ src/movie-menu.c \
src/movie-window.c \
src/plugin-interface.c \
src/plugin-registrar.c \
src/movie-list-store.vala \
src/movie-list-view.vala \
src/movie-list-window.vala \
+ src/movie-menu.vala \
src/movie-window.vala \
src/plugin-interface.vala \
src/plugin-registrar.vala \
--- /dev/null
+/* This file is part of Cinaest.
+ *
+ * Copyright (C) 2009 Philipp Zabel
+ *
+ * Cinaest is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Cinaest is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Cinaest. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+using Hildon;
+using Osso;
+
+public class MovieMenu : AppMenu {
+ private Movie movie;
+ private List<MovieAction> actions;
+
+ public MovieMenu (Movie _movie) {
+ movie = _movie;
+
+ foreach (Plugin plugin in CinaestProgram.plugins) {
+ foreach (MovieAction action in plugin.get_actions (movie)) {
+ var button = new Gtk.Button.with_label (action.name);
+ button.clicked.connect (action.execute);
+ append (button);
+ actions.append (action);
+ }
+ }
+
+ show_all ();
+ }
+}
+
public class MovieWindow : StackableWindow {
private Movie movie;
+ private MovieMenu menu;
private Gdk.Pixbuf no_poster;
private MoviePoster.Factory poster_factory;
private Image image;
movie = movie_;
set_title (movie.title);
+ // View menu
+ menu = new MovieMenu (movie);
+
+ set_main_menu (menu);
+
// Poster
image = new Image ();
image.set_size_request (268, 424);