summaryrefslogtreecommitdiffstats
path: root/src/inkscape.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-07-28 22:05:28 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-07-28 22:05:28 +0000
commit3eb67b103fe69a3b42ec16d085a2cb3a58a596b7 (patch)
tree986b33696b0a7f229589b85bd13e6fdb2cbd022a /src/inkscape.cpp
parentfix typo, update CI (diff)
parentShow a control point for the center of a spiral (diff)
downloadinkscape-3eb67b103fe69a3b42ec16d085a2cb3a58a596b7.tar.gz
inkscape-3eb67b103fe69a3b42ec16d085a2cb3a58a596b7.zip
Merge gitlab.com:inkscape/inkscape
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);
}