summaryrefslogtreecommitdiffstats
path: root/office/re-typeset/paths.diff
diff options
context:
space:
mode:
Diffstat (limited to 'office/re-typeset/paths.diff')
-rw-r--r--office/re-typeset/paths.diff41
1 files changed, 41 insertions, 0 deletions
diff --git a/office/re-typeset/paths.diff b/office/re-typeset/paths.diff
new file mode 100644
index 0000000000..097d326bef
--- /dev/null
+++ b/office/re-typeset/paths.diff
@@ -0,0 +1,41 @@
+diff -Naur re-typeset-1.2.0/re-typeset-src/mainwindow.cpp re-typeset-1.2.0.patched/re-typeset-src/mainwindow.cpp
+--- re-typeset-1.2.0/re-typeset-src/mainwindow.cpp 2016-10-13 15:51:19.000000000 -0400
++++ re-typeset-1.2.0.patched/re-typeset-src/mainwindow.cpp 2018-12-25 12:17:28.448448693 -0500
+@@ -22,6 +22,7 @@
+ #include "mainwindow.hpp"
+ #include "license.hpp"
+ #include "ui_mainwindow.h"
++#include <QLibraryInfo>
+ #include <QImage>
+ #include <QDebug>
+ #include <QPainter>
+@@ -43,7 +44,7 @@
+ ui->pageSizeWidth->setSuffix( " px" );
+
+ createLanguageMenu();
+- setWindowIcon( QIcon( QApplication::applicationDirPath() + "res/re-typeset.png" ) );
++ setWindowIcon( QIcon( "/usr/share/pixmaps/re-typeset.png" ) );
+
+ QString locale = QLocale::system().name();
+ locale.truncate(locale.lastIndexOf('_'));
+@@ -332,8 +333,8 @@
+ currLang_ = rLanguage;
+ QLocale locale = QLocale(currLang_);
+ QLocale::setDefault(locale);
+- switchTranslator(translator_, QString("res/re-typeset_%1.qm").arg(rLanguage));
+- switchTranslator(translatorQt_, QString("languages/qt_%1.qm").arg(rLanguage));
++ switchTranslator(translator_, QString("/usr/share/re-typeset/re-typeset_%1.qm").arg(rLanguage));
++ switchTranslator(translatorQt_, QString("%1/qt_%2.qm").arg(QLibraryInfo::location(QLibraryInfo::TranslationsPath)).arg(rLanguage));
+ }
+ }
+
+@@ -343,8 +344,7 @@
+ connect(langGroup, SIGNAL(triggered(QAction *)), this, SLOT(slotLanguageChanged(QAction *)));
+ QString defaultLocale = QLocale::system().name(); // e.g. "de_DE" // format systems language
+ defaultLocale.truncate(defaultLocale.lastIndexOf('_')); // e.g. "de"
+- langPath_ = QApplication::applicationDirPath();
+- langPath_.append("/res");
++ langPath_ = QString("/usr/share/re-typeset");
+ QDir dir(langPath_);
+ QStringList fileNames = dir.entryList(QStringList("re-typeset_*.qm"));
+ if( fileNames.size() == 0 ) {