summaryrefslogtreecommitdiffstats
path: root/src/inkscape.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2017-07-21 07:05:09 +0000
committerMartin Owens <doctormo@gmail.com>2017-07-21 07:05:09 +0000
commit78cebbf91af8d91681d4ff18b7c1a8b25f2c431a (patch)
treeb7248e16ce80578c0325dfdcb98c49dd443443e4 /src/inkscape.cpp
parentroot dir tidying: Remove old .pod files (diff)
downloadinkscape-78cebbf91af8d91681d4ff18b7c1a8b25f2c431a.tar.gz
inkscape-78cebbf91af8d91681d4ff18b7c1a8b25f2c431a.zip
Use menus.xml for menus, load a basic File>Quit menu as backup.
Diffstat (limited to 'src/inkscape.cpp')
-rw-r--r--src/inkscape.cpp15
1 files changed, 3 insertions, 12 deletions
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);
}