mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Merge branch maint into unstable
Resolved conflicts:
This commit is contained in:
commit
545b24fe97
@ -122,7 +122,7 @@ IF (GNC_VCS_INFO_RESULT EQUAL 0)
|
||||
# IF building from VCS, we need git
|
||||
find_package(Git)
|
||||
IF (NOT GIT_FOUND)
|
||||
MESSAGE(SEND_ERROR "Looks like we're building from vesion control, but can't find git executable. Please set GIT_EXECUTABLE.")
|
||||
MESSAGE(SEND_ERROR "Looks like we're building from version control, but can't find git executable. Please set GIT_EXECUTABLE.")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
@ -195,6 +195,7 @@
|
||||
(export gnc:date-get-month-day)
|
||||
(export gnc:date-get-month)
|
||||
(export gnc:date-get-week-day)
|
||||
(export gnc:date-get-week)
|
||||
(export gnc:date-get-year-day)
|
||||
(export gnc:timepair-get-year)
|
||||
(export gnc:timepair-get-quarter)
|
||||
|
@ -409,21 +409,10 @@ test_gnc_transaction_set_get_property (Fixture *fixture, gconstpointer pData)
|
||||
QofBook *book = qof_book_new ();
|
||||
auto txn = static_cast<Transaction*>(g_object_new (GNC_TYPE_TRANSACTION, "book", book, NULL));
|
||||
auto num = "42", desc = "The Answer";
|
||||
gchar *t_num = NULL, *t_desc = NULL, *phony = NULL;
|
||||
gchar *t_num = NULL, *t_desc = NULL;
|
||||
gnc_commodity *curr = gnc_commodity_new (book, "Gnu Rand", "CURRENCY",
|
||||
"GNR", "", 240), *t_curr = NULL;
|
||||
Timespec now = timespec_now (), *t_entered = NULL, *t_posted = NULL;
|
||||
time_t secs = (time_t)now.tv_sec;
|
||||
|
||||
char buff[80];
|
||||
strftime (buff, 80, "%a %b %d %H:%M:%S %Y", localtime(&secs));
|
||||
|
||||
auto msg1 = "g_object_set_valist: object class 'Transaction' has no property named 'bogus'";
|
||||
|
||||
auto loglevel1 = static_cast<GLogLevelFlags>(G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL);
|
||||
auto check1 = test_error_struct_new ("GLib-GObject", loglevel1, msg1);
|
||||
fixture->hdlrs = test_log_set_fatal_handler (fixture->hdlrs, check1,
|
||||
(GLogFunc)test_checked_handler);
|
||||
g_assert_cmpstr (txn->num, ==, "");
|
||||
g_assert_cmpstr (txn->description, ==, "");
|
||||
g_assert (txn->common_currency == NULL);
|
||||
@ -439,7 +428,6 @@ test_gnc_transaction_set_get_property (Fixture *fixture, gconstpointer pData)
|
||||
"currency", curr,
|
||||
"post-date", &now,
|
||||
"enter-date", &now,
|
||||
"bogus", phony,
|
||||
NULL);
|
||||
|
||||
g_assert_cmpstr (txn->num, ==, num);
|
||||
@ -447,17 +435,13 @@ test_gnc_transaction_set_get_property (Fixture *fixture, gconstpointer pData)
|
||||
g_assert (txn->common_currency == curr);
|
||||
g_assert (timespec_equal (&(txn->date_entered), &now));
|
||||
g_assert (timespec_equal (&(txn->date_posted), &now));
|
||||
g_assert_cmpint (check1->hits, ==, 1);
|
||||
|
||||
g_free (check1->msg);
|
||||
check1->msg = g_strdup ("g_object_get_valist: object class 'Transaction' has no property named 'bogus'");
|
||||
g_object_get (G_OBJECT (txn),
|
||||
"num", &t_num,
|
||||
"description", &t_desc,
|
||||
"currency", &t_curr,
|
||||
"post-date", &t_posted,
|
||||
"enter-date", &t_entered,
|
||||
"bogus", &phony,
|
||||
NULL);
|
||||
|
||||
g_assert_cmpstr (t_num, ==, num);
|
||||
@ -465,7 +449,6 @@ test_gnc_transaction_set_get_property (Fixture *fixture, gconstpointer pData)
|
||||
g_assert (t_curr == curr);
|
||||
g_assert (timespec_equal (t_entered, &now));
|
||||
g_assert (timespec_equal (t_posted, &now));
|
||||
g_assert_cmpint (check1->hits, ==, 2);
|
||||
xaccTransRollbackEdit (txn);
|
||||
test_destroy (txn);
|
||||
test_destroy (curr);
|
||||
|
@ -161,8 +161,8 @@ IF(BUILDING_FROM_VCS)
|
||||
|
||||
IF (${CMAKE_VERSION} VERSION_GREATER 3.1 AND NOT WIN32)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_COMMAND_TMP} INTLTOOL_EXTRACT=${INTLTOOL_EXTRACT} XGETTEXT=${XGETTEXT} ${INTLTOOL_UPDATE} --gettext-package ${PACKAGE} --pot
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_COMMAND_TMP} INTLTOOL_EXTRACT=${INTLTOOL_EXTRACT} XGETTEXT=${XGETTEXT} srcdir=${CMAKE_CURRENT_SOURCE_DIR} ${INTLTOOL_UPDATE} --gettext-package ${PACKAGE} --pot
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RESULT_VARIABLE GNUCASH_POT_RESULT
|
||||
)
|
||||
IF(NOT ${GNUCASH_POT_RESULT} STREQUAL "0")
|
||||
@ -172,7 +172,7 @@ IF(BUILDING_FROM_VCS)
|
||||
CONFIGURE_FILE(make-gnucash-pot.sh.in make-gnucash-pot.sh)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${SHELL} ${CMAKE_CURRENT_BINARY_DIR}/make-gnucash-pot.sh
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
RESULT_VARIABLE GNUCASH_POT_RESULT_SHELL
|
||||
)
|
||||
IF(NOT ${GNUCASH_POT_RESULT_SHELL} STREQUAL "0")
|
||||
@ -180,20 +180,10 @@ IF(BUILDING_FROM_VCS)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/gnucash.pot)
|
||||
IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/gnucash.pot)
|
||||
MESSAGE(FATAL_ERROR "POT file '${CMAKE_CURRENT_SOURCE_DIR}/gnucash.pot' was not successfully created.")
|
||||
ENDIF()
|
||||
|
||||
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_COMMAND} -E copy gnucash.pot ${CMAKE_CURRENT_BINARY_DIR}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND ${CMAKE_COMMAND} -E remove gnucash.pot
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
ENDIF()
|
||||
|
||||
ADD_CUSTOM_TARGET(check-po
|
||||
|
@ -4,4 +4,4 @@ XGETTEXT=@XGETTEXT@
|
||||
INTLTOOL_UPDATE=@INTLTOOL_UPDATE@
|
||||
SOURCE_DIR=@CMAKE_CURRENT_SOURCE_DIR@
|
||||
PACKAGE=@PACKAGE@
|
||||
cd $SOURCE_DIR && $INTLTOOL_UPDATE --gettext-package $PACKAGE --pot
|
||||
srcdir=$SOURCE_DIR $INTLTOOL_UPDATE --gettext-package $PACKAGE --pot
|
||||
|
Loading…
Reference in New Issue
Block a user