Commit 5cfa679b authored by Alexander Volkov's avatar Alexander Volkov
Browse files

Load translations for kImageAnnotator

parent 707509e4
......@@ -106,6 +106,9 @@ if(kImageAnnotator_FOUND)
find_package(X11 REQUIRED)
find_package(kColorPicker REQUIRED)
set(KIMAGEANNOTATOR_FOUND 1)
if(NOT kImageAnnotator_VERSION VERSION_LESS 0.5.0)
set(KIMAGEANNOTATOR_CAN_LOAD_TRANSLATIONS 1)
endif()
endif()
# add the spectacle.upd file
......
......@@ -16,4 +16,7 @@
/* Define to 1 if we have kImageAnnotator */
#cmakedefine KIMAGEANNOTATOR_FOUND 1
/* Define the minor version of kImageAnnotator */
#cmakedefine KIMAGEANNOTATOR_CAN_LOAD_TRANSLATIONS 1
#endif
......@@ -11,6 +11,10 @@
#include "SpectacleCore.h"
#include "SpectacleDBusAdapter.h"
#ifdef KIMAGEANNOTATOR_CAN_LOAD_TRANSLATIONS
#include <kImageAnnotator/KImageAnnotator.h>
#endif
#include <QApplication>
#include <QCommandLineParser>
#include <QDBusConnection>
......@@ -71,6 +75,10 @@ int main(int argc, char **argv)
// For some reason this does not work properly if behind an if
KDBusService service(KDBusService::Unique, &lCore);
#ifdef KIMAGEANNOTATOR_CAN_LOAD_TRANSLATIONS
kImageAnnotator::loadTranslations();
#endif
// Delay initialisation after we now we are in the single instance or new-instance was passed, to avoid doing it each time spectacle executable is called
lCore.init();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment