Commit 871e2070 authored by Paolo Borelli's avatar Paolo Borelli

Use the new autometic menu support in gtk

parent 7f2087b2
......@@ -2,7 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/clocks">
<file>css/gnome-clocks.css</file>
<file preprocess="xml-stripblanks">ui/menu.ui</file>
<file preprocess="xml-stripblanks">gtk/menus.ui</file>
<file preprocess="xml-stripblanks">ui/window.ui</file>
<file preprocess="xml-stripblanks">ui/worldlocationdialog.ui</file>
<file preprocess="xml-stripblanks">ui/world.ui</file>
......
<?xml version="1.0"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<menu id="appmenu">
<menu id="app-menu">
<section>
<item>
<attribute name="label" translatable="yes">_Help</attribute>
......
......@@ -55,10 +55,6 @@ public class Application : Gtk.Application {
css_provider,
Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
var builder = Utils.load_ui ("menu.ui");
var app_menu = builder.get_object ("appmenu") as MenuModel;
set_app_menu (app_menu);
add_accelerator ("<Primary>n", "win.new", null);
add_accelerator ("<Primary>a", "win.select-all", null);
}
......
......@@ -464,9 +464,8 @@ public class ContentView : Gtk.Bin {
});
header_bar.pack_end (cancel_button);
var builder = Utils.load_ui ("menu.ui");
selection_menu = builder.get_object ("selection-menu") as GLib.MenuModel;
var app = (Gtk.Application) GLib.Application.get_default ();
selection_menu = app.get_menu_by_id ("selection-menu");
selection_menubutton = new Gtk.MenuButton ();
selection_menubutton_label = new Gtk.Label (_("Click on items to select them"));
Gtk.Arrow selection_menubutton_arrow = new Gtk.Arrow (Gtk.ArrowType.DOWN, Gtk.ShadowType.NONE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment