Add movie list window reference to the movie list menu
authorPhilipp Zabel <philipp.zabel@gmail.com>
Fri, 30 Oct 2009 22:44:55 +0000 (23:44 +0100)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Mon, 9 Nov 2009 17:47:36 +0000 (18:47 +0100)
This allows to set dialogs opened from this menu to be transient for the
movie list window only and to access the movie list window's properties.

src/movie-list-menu.vala
src/movie-list-window.vala

index 75a9f52..5c91f7c 100644 (file)
@@ -21,6 +21,11 @@ using Hildon;
 
 public class MovieListMenu : AppMenu {
        public TreeSortable sortable;
+       private MovieListWindow movie_list_window;
+
+       public MovieListMenu (MovieListWindow window) {
+               movie_list_window = window;
+       }
 
        construct {
                // Add sort buttons as view menu filters
index e0b2940..9a31de7 100644 (file)
@@ -30,7 +30,7 @@ public class MovieListWindow : StackableWindow {
 
        construct {
                // View menu
-               var menu = new MovieListMenu ();
+               var menu = new MovieListMenu (this);
 
                set_main_menu (menu);