mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
menu: add View menu with fullscreen item
This commit is contained in:
parent
ab4afec78b
commit
ff0b99ecbf
1 changed files with 20 additions and 0 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue