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 10:13:20 +0000
commitff77be2148923c44b92d0c638343bf0c1370bcf8 (patch)
tree8029a84403f38636d13546af7fb06d5087bb5a60 /src/inkscape-application.cpp
parentAdd missing xml file. (diff)
downloadinkscape-ff77be2148923c44b92d0c638343bf0c1370bcf8.tar.gz
inkscape-ff77be2148923c44b92d0c638343bf0c1370bcf8.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");