diff options
author | David King <amigadave@amigadave.com> | 2013-11-12 09:17:39 +0000 |
---|---|---|
committer | David King <amigadave@amigadave.com> | 2013-11-12 09:25:14 +0000 |
commit | 24d86997c3500f50e0dee947983bb9e42e02573c (patch) | |
tree | 86cc00fafe32af8599a67bc66891dcb42147631f /src | |
parent | db7b638aa5c462441962078477b647458b476508 (diff) | |
download | cheese-24d86997c3500f50e0dee947983bb9e42e02573c.tar.gz |
Move application menu into GtkBuilder resource
Diffstat (limited to 'src')
-rw-r--r-- | src/cheese-application.vala | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/cheese-application.vala b/src/cheese-application.vala index 8cc46f10..aef5ad43 100644 --- a/src/cheese-application.vala +++ b/src/cheese-application.vala @@ -113,23 +113,9 @@ public class Cheese.Application : Gtk.Application Window.set_default_icon_name ("cheese"); // Create the menus. - var menu = new GLib.Menu (); - var section = new GLib.Menu (); - menu.append_section (null, section); - var item = new GLib.MenuItem (_("_Fullscreen"), "app.fullscreen"); - item.set_attribute ("accel", "s", "F11"); - section.append_item (item); - section.append (_("P_references"), "app.preferences"); - section = new GLib.Menu (); - menu.append_section (null, section); - item = new GLib.MenuItem (_("_Help"), "app.help"); - item.set_attribute ("accel", "s", "F1"); - section.append_item (item); - section.append (_("_About"), "app.about"); - item = new GLib.MenuItem (_("_Quit"), "app.quit"); - item.set_attribute ("accel", "s", "<Primary>q"); - section.append_item (item); - set_app_menu (menu); + var builder = new Gtk.Builder.from_resource ("/org/gnome/Cheese/cheese-appmenu.ui"); + var appmenu = builder.get_object ("appmenu") as GLib.MenuModel; + this.set_app_menu (appmenu); this.add_accelerator ("space", "app.shoot", null); |