diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-01-25 18:23:25 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-01-25 19:42:19 -0500 |
commit | eed307713b8ef4da5e4edf0aa8d85aa5c32a6d4f (patch) | |
tree | c6d9baebf136274e37a3def209c4d7de8f504ed4 /examples | |
parent | c76cccd437b12daa07c417d4587a5516b0d4aac3 (diff) | |
download | gtk+-eed307713b8ef4da5e4edf0aa8d85aa5c32a6d4f.tar.gz |
GtkBuilder: change format of menus
Change the format of GtkBuilder <menu> to be more in-line with the style
of the rest of GtkBuilder so that we can do translation in a consistent
way.
The format is now substantially more difficult to hand-write, but tools
should be along soon.
There is an xslt program attached to the bug to help you convert your
existing .ui files from the old format to the new one.
https://bugzilla.gnome.org/show_bug.cgi?id=668696
Diffstat (limited to 'examples')
-rw-r--r-- | examples/bloatpad.c | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/examples/bloatpad.c b/examples/bloatpad.c index ba8164a708..4178580262 100644 --- a/examples/bloatpad.c +++ b/examples/bloatpad.c @@ -275,25 +275,50 @@ bloat_pad_startup (GApplication *application) "<interface>" " <menu id='app-menu'>" " <section>" - " <item label='_New Window' action='app.new' accel='<Primary>n'/>" + " <item>" + " <attribute name='label'>_New Window</attribute>" + " <attribute name='action'>app.new</attribute>" + " <attribute name='accel'><Primary>n</attribute>" + " </item>" " </section>" " <section>" - " <item label='_About Bloatpad' action='app.about'/>" + " <item>" + " <attribute name='label'>_About Bloatpad</attribute>" + " <attribute name='action'>app.about</attribute>" + " </item>" " </section>" " <section>" - " <item label='_Quit' action='app.quit' accel='<Primary>q'/>" + " <item>" + " <attribute name='label'>_Quit</attribute>" + " <attribute name='action'>app.quit</attribute>" + " <attribute name='accel'><Primary>q</attribute>" + " </item>" " </section>" " </menu>" " <menu id='menubar'>" - " <submenu label='_Edit'>" + " <submenu>" + " <attribute name='label'>_Edit</attribute>" " <section>" - " <item label='_Copy' action='win.copy' accel='<Primary>c'/>" - " <item label='_Paste' action='win.paste' accel='<Primary>v'/>" + " <item>" + " <attribute name='label'>_Copy</attribute>" + " <attribute name='action'>win.copy</attribute>" + " <attribute name='accel'><Primary>c</attribute>" + " </item>" + " <item>" + " <attribute name='label'>_Parse</attribute>" + " <attribute name='action'>win.parse</attribute>" + " <attribute name='accel'><Primary>v</attribute>" + " </item>" " </section>" " </submenu>" - " <submenu label='_View'>" + " <submenu>" + " <attribute name='label'>_View</attribute>" " <section>" - " <item label='_Fullscreen' action='win.fullscreen'/>" + " <item>" + " <attribute name='label'>_Fullscreen</attribute>" + " <attribute name='action'>win.fullscreen</attribute>" + " <attribute name='accel'>F11</attribute>" + " </item>" " </section>" " </submenu>" " </menu>" |