diff options
author | Matthias Clasen <maclas@gmx.de> | 2003-08-26 00:13:59 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2003-08-26 00:13:59 +0000 |
commit | 720bdb8daf6727700eb6df80bc057a93d45b277a (patch) | |
tree | 878a7ce87050325d0f8001974142c2174a8b046a /tests | |
parent | 2be259b24a5cd25efc8375207ac1a3bc1ceb9c62 (diff) | |
download | gdk-pixbuf-720bdb8daf6727700eb6df80bc057a93d45b277a.tar.gz |
Use gssize for length, not gsize.
2003-08-26 Matthias Clasen <maclas@gmx.de>
* gtk/gtkuimanager.[hc] (gtk_ui_manager_add_ui_from_string): Use gssize
for length, not gsize.
* gtk/gtkuimanager.c: Refactor the XML format a bit: rename <Root> to
<ui> and make it optional in strings. Rename verb to action, <dockitem>
to <toolbar>, <menu> to <menubar>, <submenu> to <menu>.
* demos/gtk-demo/appwindow.c:
* tests/testactions.c:
* tests/testmerge.c:
* tests/merge-1.ui:
* tests/merge-2.ui:
* tests/merge-3.ui: Adjust to the new XML format.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/merge-1.ui | 36 | ||||
-rw-r--r-- | tests/merge-2.ui | 38 | ||||
-rw-r--r-- | tests/merge-3.ui | 32 | ||||
-rw-r--r-- | tests/testactions.c | 80 |
4 files changed, 93 insertions, 93 deletions
diff --git a/tests/merge-1.ui b/tests/merge-1.ui index 8ff6a72b2..30fac10f8 100644 --- a/tests/merge-1.ui +++ b/tests/merge-1.ui @@ -1,20 +1,22 @@ <!--*- xml -*--> -<Root> - <menu> - <submenu name="FileMenu" verb="StockFileMenuAction"> - <menuitem name="Open" verb="OpenAction" /> - </submenu> - <submenu name="EditMenu" verb="StockEditMenuAction"> - <menuitem name="Cut" verb="CutAction" /> - </submenu> +<ui> + <menubar> + <menu name="FileMenu" action="StockFileMenuAction"> + <menuitem name="Open" action="OpenAction" /> + </menu> + <menu name="EditMenu" action="StockEditMenuAction"> + <menuitem name="Cut" action="CutAction" /> + </menu> <placeholder name="TestPlaceholder" /> - </menu> - <dockitem name="toolbar1"> - <placeholder name="ToolbarPlaceholder" /> - <toolitem name="NewButton" verb="NewAction" /> - <toolitem name="CutButton" verb="CutAction" /> - <toolitem name="CopyButton" verb="CopyAction" /> - <toolitem name="PasteButton" verb="PasteAction" /> + </menubar> + <toolbar name="toolbar1"> + <placeholder name="ToolbarPlaceholder"> + <toolitem name="nb2" action="NewAction" /> + </placeholder> + <toolitem name="NewButton" action="NewAction" /> + <toolitem name="CutButton" action="CutAction" /> + <toolitem name="CopyButton" action="CopyAction" /> + <toolitem name="PasteButton" action="PasteAction" /> <placeholder name="JustifyToolItems"/> - </dockitem> -</Root> + </toolbar> +</ui> diff --git a/tests/merge-2.ui b/tests/merge-2.ui index cf32ecfcc..8a059298d 100644 --- a/tests/merge-2.ui +++ b/tests/merge-2.ui @@ -1,27 +1,27 @@ <!--*- xml -*--> -<Root> - <menu> - <submenu name="FileMenu" verb="StockFileMenuAction"> - <menuitem name="New" verb="NewAction" pos="top" /> +<ui> + <menubar> + <menu name="FileMenu" action="StockFileMenuAction"> + <menuitem name="New" action="NewAction" pos="top" /> <separator /> - <menuitem name="Quit" verb="QuitAction" /> - </submenu> - <submenu name="HelpMenu" verb="StockHelpMenuAction"> - <menuitem name="About" verb="AboutAction" /> - </submenu> - </menu> - <dockitem name="toolbar1"> + <menuitem name="Quit" action="QuitAction" /> + </menu> + <menu name="HelpMenu" action="StockHelpMenuAction"> + <menuitem name="About" action="AboutAction" /> + </menu> + </menubar> + <toolbar name="toolbar1"> <placeholder name="ToolbarPlaceholder"> - <toolitem name="Quit" verb="QuitAction" /> + <toolitem name="Quit" action="QuitAction" /> <separator /> </placeholder> - </dockitem> + </toolbar> <popups> - <popup name="FileMenu" verb="StockFileMenuAction"> - <menuitem name="New" verb="NewAction" pos="top" /> - <submenu name="HelpMenu" verb="StockHelpMenuAction"> - <menuitem name="About" verb="AboutAction" /> - </submenu> + <popup name="FileMenu" action="StockFileMenuAction"> + <menuitem name="New" action="NewAction" pos="top" /> + <menu name="HelpMenu" action="StockHelpMenuAction"> + <menuitem name="About" action="AboutAction" /> + </menu> </popup> </popups> -</Root> +</ui> diff --git a/tests/merge-3.ui b/tests/merge-3.ui index 397930d27..9fce79cb2 100644 --- a/tests/merge-3.ui +++ b/tests/merge-3.ui @@ -1,23 +1,23 @@ <!--*- xml -*--> -<Root> - <menu> - <submenu name="FileMenu" verb="StockFileMenuAction"> - <menuitem name="New" verb="New2Action" /> - </submenu> +<ui> + <menubar> + <menu name="FileMenu" action="StockFileMenuAction"> + <menuitem name="New" action="New2Action" /> + </menu> <placeholder name="TestPlaceholder"> - <submenu name="Test"> - <menuitem name="Cut" verb="CutAction" /> - </submenu> + <menu name="Test"> + <menuitem name="Cut" action="CutAction" /> + </menu> </placeholder> - </menu> - <dockitem name="toolbar1"> + </menubar> + <toolbar name="toolbar1"> <placeholder name="JustifyToolItems"> <separator name="first-sep"/> - <toolitem name="Left" verb="justify-left"/> - <toolitem name="Centre" verb="justify-center"/> - <toolitem name="Right" verb="justify-right"/> - <toolitem name="Fill" verb="justify-fill"/> + <toolitem name="Left" action="justify-left"/> + <toolitem name="Centre" action="justify-center"/> + <toolitem name="Right" action="justify-right"/> + <toolitem name="Fill" action="justify-fill"/> <separator name="second-sep" /> </placeholder> - </dockitem> -</Root> + </toolbar> +</ui> diff --git a/tests/testactions.c b/tests/testactions.c index 131d0ccd2..9a3ae0820 100644 --- a/tests/testactions.c +++ b/tests/testactions.c @@ -141,58 +141,56 @@ static guint n_entries = G_N_ELEMENTS (entries); /* XML description of the menus for the test app. The parser understands * a subset of the Bonobo UI XML format, and uses GMarkup for parsing */ static const gchar *ui_info = -"<Root>\n" -" <menu>\n" -" <submenu name=\"Menu _1\" verb=\"Menu1Action\">\n" -" <menuitem name=\"cut\" verb=\"cut\" />\n" -" <menuitem name=\"copy\" verb=\"copy\" />\n" -" <menuitem name=\"paste\" verb=\"paste\" />\n" +" <menubar>\n" +" <menu name=\"Menu _1\" action=\"Menu1Action\">\n" +" <menuitem name=\"cut\" action=\"cut\" />\n" +" <menuitem name=\"copy\" action=\"copy\" />\n" +" <menuitem name=\"paste\" action=\"paste\" />\n" " <separator name=\"sep1\" />\n" -" <menuitem name=\"bold1\" verb=\"bold\" />\n" -" <menuitem name=\"bold2\" verb=\"bold\" />\n" +" <menuitem name=\"bold1\" action=\"bold\" />\n" +" <menuitem name=\"bold2\" action=\"bold\" />\n" " <separator name=\"sep2\" />\n" -" <menuitem name=\"toggle-cnp\" verb=\"toggle-cnp\" />\n" +" <menuitem name=\"toggle-cnp\" action=\"toggle-cnp\" />\n" " <separator name=\"sep3\" />\n" -" <menuitem name=\"quit\" verb=\"quit\" />\n" -" </submenu>\n" -" <submenu name=\"Menu _2\" verb=\"Menu2Action\">\n" -" <menuitem name=\"cut\" verb=\"cut\" />\n" -" <menuitem name=\"copy\" verb=\"copy\" />\n" -" <menuitem name=\"paste\" verb=\"paste\" />\n" +" <menuitem name=\"quit\" action=\"quit\" />\n" +" </menu>\n" +" <menu name=\"Menu _2\" action=\"Menu2Action\">\n" +" <menuitem name=\"cut\" action=\"cut\" />\n" +" <menuitem name=\"copy\" action=\"copy\" />\n" +" <menuitem name=\"paste\" action=\"paste\" />\n" " <separator name=\"sep4\"/>\n" -" <menuitem name=\"bold\" verb=\"bold\" />\n" +" <menuitem name=\"bold\" action=\"bold\" />\n" " <separator name=\"sep5\"/>\n" -" <menuitem name=\"justify-left\" verb=\"justify-left\" />\n" -" <menuitem name=\"justify-center\" verb=\"justify-center\" />\n" -" <menuitem name=\"justify-right\" verb=\"justify-right\" />\n" -" <menuitem name=\"justify-fill\" verb=\"justify-fill\" />\n" +" <menuitem name=\"justify-left\" action=\"justify-left\" />\n" +" <menuitem name=\"justify-center\" action=\"justify-center\" />\n" +" <menuitem name=\"justify-right\" action=\"justify-right\" />\n" +" <menuitem name=\"justify-fill\" action=\"justify-fill\" />\n" " <separator name=\"sep6\"/>\n" -" <menuitem name=\"customise-accels\" verb=\"customise-accels\" />\n" +" <menuitem name=\"customise-accels\" action=\"customise-accels\" />\n" " <separator name=\"sep7\"/>\n" -" <menuitem verb=\"toolbar-icons\" />\n" -" <menuitem verb=\"toolbar-text\" />\n" -" <menuitem verb=\"toolbar-both\" />\n" -" <menuitem verb=\"toolbar-both-horiz\" />\n" +" <menuitem action=\"toolbar-icons\" />\n" +" <menuitem action=\"toolbar-text\" />\n" +" <menuitem action=\"toolbar-both\" />\n" +" <menuitem action=\"toolbar-both-horiz\" />\n" " <separator name=\"sep8\"/>\n" -" <menuitem verb=\"toolbar-small-icons\" />\n" -" <menuitem verb=\"toolbar-large-icons\" />\n" -" </submenu>\n" -" </menu>\n" -" <dockitem name=\"toolbar\">\n" -" <toolitem name=\"cut\" verb=\"cut\" />\n" -" <toolitem name=\"copy\" verb=\"copy\" />\n" -" <toolitem name=\"paste\" verb=\"paste\" />\n" +" <menuitem action=\"toolbar-small-icons\" />\n" +" <menuitem action=\"toolbar-large-icons\" />\n" +" </menu>\n" +" </menubar>\n" +" <toolbar name=\"toolbar\">\n" +" <toolitem name=\"cut\" action=\"cut\" />\n" +" <toolitem name=\"copy\" action=\"copy\" />\n" +" <toolitem name=\"paste\" action=\"paste\" />\n" " <separator name=\"sep9\" />\n" -" <toolitem name=\"bold\" verb=\"bold\" />\n" +" <toolitem name=\"bold\" action=\"bold\" />\n" " <separator name=\"sep10\" />\n" -" <toolitem name=\"justify-left\" verb=\"justify-left\" />\n" -" <toolitem name=\"justify-center\" verb=\"justify-center\" />\n" -" <toolitem name=\"justify-right\" verb=\"justify-right\" />\n" -" <toolitem name=\"justify-fill\" verb=\"justify-fill\" />\n" +" <toolitem name=\"justify-left\" action=\"justify-left\" />\n" +" <toolitem name=\"justify-center\" action=\"justify-center\" />\n" +" <toolitem name=\"justify-right\" action=\"justify-right\" />\n" +" <toolitem name=\"justify-fill\" action=\"justify-fill\" />\n" " <separator name=\"sep11\"/>\n" -" <toolitem name=\"quit\" verb=\"quit\" />\n" -" </dockitem>\n" -"</Root>\n"; +" <toolitem name=\"quit\" action=\"quit\" />\n" +" </toolbar>\n"; static void add_widget (GtkUIManager *merge, |