summaryrefslogtreecommitdiffstats
path: root/src/inkscape-application.cpp
diff options
context:
space:
mode:
authorAlexander Valavanis <valavanisalex@gmail.com>2018-11-18 10:13:20 +0000
committerAlexander Valavanis <valavanisalex@gmail.com>2018-11-18 12:39:15 +0000
commitb56ca9620b03c3d2d11551150676b86f507938fa (patch)
treeb36241c27a010804326469783f9d866ca8bde06d /src/inkscape-application.cpp
parentAdd missing xml file. (diff)
downloadinkscape-b56ca9620b03c3d2d11551150676b86f507938fa.tar.gz
inkscape-b56ca9620b03c3d2d11551150676b86f507938fa.zip
Fix resource file location
Diffstat (limited to 'src/inkscape-application.cpp')
-rw-r--r--src/inkscape-application.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/inkscape-application.cpp b/src/inkscape-application.cpp
index e03a47044..76f001a3d 100644
--- a/src/inkscape-application.cpp
+++ b/src/inkscape-application.cpp
@@ -31,6 +31,9 @@
#include "helper/gettext.h" // gettext init
#endif // ENABLE_NLS
+#include "io/resource.h"
+using Inkscape::IO::Resource::UIS;
+
// This is a bit confusing as there are two ways to handle command line arguments and files
// depending on if the Gio::APPLICATION_HANDLES_OPEN and/or Gio::APPLICATION_HANDLES_COMMAND_LINE
// flags are set. If the open flag is set and the command line not, the all the remainng arguments
@@ -182,13 +185,15 @@ InkscapeApplication::on_startup2()
// ========================= Builder ==========================
_builder = Gtk::Builder::create();
+ Glib::ustring app_builder_file = get_filename(UIS, "inkscape-application.xml");
+
try
{
- _builder->add_from_file("ink-application.xml");
+ _builder->add_from_file(app_builder_file);
}
catch (const Glib::Error& ex)
{
- std::cerr << "InkscapeApplication: ink_application.xml file not read! " << ex.what() << std::endl;
+ std::cerr << "InkscapeApplication: " << app_builder_file << " file not read! " << ex.what() << std::endl;
}
auto object = _builder->get_object("menu-application");