Commit 342ac783 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko Committed by Adrien Plazas
Browse files

example: Use a menu model for primary menu


Signed-off-by: Alexander Mikhaylenko's avatarAlexander Mikhaylenko <alexm@gnome.org>
parent b9a36848
......@@ -3,25 +3,14 @@
<interface>
<requires lib="gtk+" version="3.16"/>
<requires lib="libhandy" version="1.0"/>
<object class="GtkPopover" id="menu_popover">
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="spacing">6</property>
<property name="margin">18</property>
<property name="orientation">vertical</property>
<property name="width_request">200</property>
<child>
<object class="GtkModelButton">
<property name="action-name">app.preferences</property>
<property name="can-focus">True</property>
<property name="text" translatable="yes">Preferences</property>
<property name="visible">True</property>
</object>
</child>
</object>
</child>
</object>
<menu id="primary_menu">
<section>
<item>
<attribute name="label" translatable="yes">Preferences</attribute>
<attribute name="action">app.preferences</attribute>
</item>
</section>
</menu>
<template class="HdyDemoWindow" parent="GtkApplicationWindow">
<property name="can_focus">False</property>
<property name="title">Handy Demo</property>
......@@ -48,7 +37,8 @@
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="focus_on_click">False</property>
<property name="popover">menu_popover</property>
<property name="menu_model">primary_menu</property>
<property name="use_popover">True</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
......
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