Commit 58952d3e authored by Alf Gaida's avatar Alf Gaida

Adding upstream version 0.10.96~25-gbc999b9.

parent 44a6c4c2
Copyright:
Copyright (c) 2012-2014 LXQt team
Copyright (c) 2012-2016 LXQt team
This program is based on source code from the ObConf project
<http://openbox.org/wiki/ObConf:About>
......
......@@ -27,6 +27,9 @@ else()
message(STATUS "Building with Qt${Qt5Core_VERSION_STRING}")
endif()
#Note: no run-time dependency on liblxqt, just a build dependency for lxqt_translate_ts/desktop
find_package(lxqt REQUIRED)
find_package(PkgConfig)
pkg_check_modules(GLIB REQUIRED
glib-2.0
......
......@@ -71,13 +71,13 @@ function(lxqt_translate_desktop _RESULT)
set(_pattern "'\\[.*]\\s*='")
if (_translations)
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -h ${_pattern} ${_translations} >> ${_outFile}
COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -h -a ${_pattern} ${_translations} >> ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
else()
add_custom_command(OUTPUT ${_outFile}
COMMAND grep -v "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMAND grep -v -a "'#TRANSLATIONS_DIR='" ${_inFile} > ${_outFile}
COMMENT "Generating ${_fileName}${_fileExt}"
)
endif()
......
......@@ -57,45 +57,26 @@ add_custom_command(
# add translation for obconf-qt
option (UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)
set(TRANSLATION_TEMPLATE "translations/obconf-qt.ts")
file(GLOB TS_FILES translations/obconf-qt_*.ts)
if(USE_QT4)
if (UPDATE_TRANSLATIONS)
qt4_create_translation(QMS_FILES
${obconf-qt_SRCS}
${obconf-qt_UI_H}
${TRANSLATION_TEMPLATE}
OPTIONS -locations absolute)
qt4_create_translation(QMS_FILES
${obconf-qt_SRCS}
${obconf-qt_UI_H}
${TS_FILES}
OPTIONS -locations absolute)
else (UPDATE_TRANSLATIONS)
qt4_add_translation(QM_FILES ${TS_FILES})
endif (UPDATE_TRANSLATIONS)
else(USE_QT4) # use qt4
if (UPDATE_TRANSLATIONS)
qt5_create_translation(QMS_FILES
${obconf-qt_SRCS}
${obconf-qt_UI_H}
${TRANSLATION_TEMPLATE}
OPTIONS -locations absolute)
qt5_create_translation(QM_FILES
${obconf-qt_SRCS}
${obconf-qt_UI_H}
${TS_FILES}
OPTIONS -locations absolute)
else (UPDATE_TRANSLATIONS)
qt5_add_translation(QM_FILES ${TS_FILES})
endif (UPDATE_TRANSLATIONS)
endif(USE_QT4)
if(UPDATE_TRANSLATIONS)
add_custom_target(update_obconf-qt_translations ALL DEPENDS ${QMS})
endif()
include(LXQtTranslateTs)
lxqt_translate_ts(QM_FILES
USE_QT4
${USE_QT4}
UPDATE_TRANSLATIONS
${UPDATE_TRANSLATIONS}
SOURCES
${obconf-qt_SRCS}
${obconf-qt_UI_H}
INSTALL_DIR
"${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}/translations"
PULL_TRANSLATIONS
${PULL_TRANSLATIONS}
CLEAN_TRANSLATIONS
${CLEAN_TRANSLATIONS}
TRANSLATIONS_REPO
${TRANSLATIONS_REPO}
TRANSLATIONS_REFSPEC
${TRANSLATIONS_REFSPEC}
)
# install a desktop entry file
include(LXQtTranslateDesktop)
......@@ -105,7 +86,6 @@ lxqt_translate_desktop(DESKTOP_FILES
)
install(FILES ${DESKTOP_FILES} DESTINATION share/applications)
install(FILES ${QM_FILES} DESTINATION share/obconf-qt/translations)
# prevent the generated files from being deleted during make clean
set_directory_properties(PROPERTIES CLEAN_NO_CUSTOM true)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -106,7 +106,7 @@ void tree_apply()
if (!obt_xml_save_file(parse_i, p, TRUE)) {
gchar *s;
s = g_strdup_printf("An error occured while saving the "
s = g_strdup_printf("An error occurred while saving the "
"config file '%s'", p);
// obconf_error(s, FALSE);
QMessageBox::critical(NULL, QString(), QString::fromUtf8(s));
......
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