From 78cebbf91af8d91681d4ff18b7c1a8b25f2c431a Mon Sep 17 00:00:00 2001 From: Martin Owens Date: Fri, 21 Jul 2017 03:05:09 -0400 Subject: Use menus.xml for menus, load a basic File>Quit menu as backup. --- src/inkscape.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src/inkscape.cpp') diff --git a/src/inkscape.cpp b/src/inkscape.cpp index 24a744bbd..8dfff3c63 100644 --- a/src/inkscape.cpp +++ b/src/inkscape.cpp @@ -746,24 +746,15 @@ Application::crash_handler (int /*signum*/) */ bool Application::load_menus() { - gchar *fn = Inkscape::IO::Resource::profile_path(MENUS_FILE); + using namespace Inkscape::IO::Resource; + Glib::ustring filename = get_filename(UIS, MENUS_FILE); gchar *menus_xml = 0; gsize len = 0; - if ( g_file_get_contents(fn, &menus_xml, &len, NULL) ) { - // load the menus_xml file - _menus = sp_repr_read_mem(menus_xml, len, NULL); - - g_free(menus_xml); - menus_xml = 0; - } - g_free(fn); - fn = 0; - + _menus = sp_repr_read_file(filename.c_str(), NULL); if ( !_menus ) { _menus = sp_repr_read_mem(menus_skeleton, MENUS_SKELETON_SIZE, NULL); } - return (_menus != 0); } -- cgit v1.2.3