From ff0b99ecbf53840bdf4f512ebaf12befced48596 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Tue, 21 Dec 2010 13:18:38 +0200 Subject: [PATCH] menu: add View menu with fullscreen item --- mediainfo/src/mi-app.vala | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/mediainfo/src/mi-app.vala b/mediainfo/src/mi-app.vala index 9240b0aada..aa55a23b03 100644 --- a/mediainfo/src/mi-app.vala +++ b/mediainfo/src/mi-app.vala @@ -88,6 +88,17 @@ public class MediaInfo.App : Window sub_menu.append (item); item.activate.connect (Gtk.main_quit); + item = new MenuItem.with_label (_("View")); + menu_bar.append (item); + + sub_menu = new Menu (); + item.set_submenu (sub_menu); + + // TODO: need F11 accelerator + CheckMenuItem citem = new CheckMenuItem.with_label (_("Full Screen")); + sub_menu.append (citem); + citem.toggled.connect (on_fullscreen_toggled); + // TODO: add "help" menu with "about" item return (menu_bar); @@ -105,5 +116,14 @@ public class MediaInfo.App : Window } chooser.set_preview_widget_active (res); } + + private void on_fullscreen_toggled (CheckMenuItem item) + { + if (item.active) { + fullscreen(); + } else { + unfullscreen(); + } + } }