Consistency
This commit is contained in:
+2
-2
@@ -675,7 +675,7 @@ dialog_settings(Kit &kit, SettingsDraft draft,
|
||||
dialog_dismiss_action(dialog, N_("_Cancel")));
|
||||
}
|
||||
|
||||
// --- Hint -------------------------------------------------------------------
|
||||
// --- Hint --------------------------------------------------------------------
|
||||
|
||||
constexpr char kChars[] = "SADFJKLEWCMPGH";
|
||||
constexpr int kNChars = size(kChars) - 1;
|
||||
@@ -989,7 +989,7 @@ Hint::fire(Kit &kit, Target t)
|
||||
browser->activate_file(browser->file_url(file_i));
|
||||
}
|
||||
|
||||
// --- Page -------------------------------------------------------------------
|
||||
// --- Page --------------------------------------------------------------------
|
||||
|
||||
constexpr float kMinWell = 80.f;
|
||||
constexpr float kMinSide = 120.f;
|
||||
|
||||
+4
-4
@@ -863,7 +863,7 @@ Button::activate(Kit &kit)
|
||||
return true;
|
||||
}
|
||||
|
||||
// --- Checkbox ---------------------------------------------------------------
|
||||
// --- Checkbox ----------------------------------------------------------------
|
||||
|
||||
Size
|
||||
Checkbox::measure_content(Kit &kit, int max_w, int)
|
||||
@@ -3691,7 +3691,7 @@ Combo::key(Kit &kit, const Key &ev)
|
||||
}
|
||||
}
|
||||
|
||||
// --- ToolbarSlot ------------------------------------------------------------
|
||||
// --- ToolbarSlot -------------------------------------------------------------
|
||||
|
||||
constexpr float kWinPadX = 4.f;
|
||||
constexpr float kWinPadY = 4.f;
|
||||
@@ -3874,7 +3874,7 @@ ToolbarSlot::arrange_content(Kit &kit, Rect alloc)
|
||||
Row::arrange_content(kit, alloc);
|
||||
}
|
||||
|
||||
// --- Toolbar ---------------------------------------------------------------
|
||||
// --- Toolbar -----------------------------------------------------------------
|
||||
|
||||
Toolbar::Toolbar(unique_ptr<ToolbarSlot> left_row,
|
||||
unique_ptr<ToolbarSlot> mid_row, unique_ptr<ToolbarSlot> right_row)
|
||||
@@ -4045,7 +4045,7 @@ Toolbar::place_slots(Kit &kit)
|
||||
this->right->arrange(kit, {x0 + avail - right_w, y0, right_w, h});
|
||||
}
|
||||
|
||||
// --- Titlebar --------------------------------------------------------------
|
||||
// --- Titlebar ----------------------------------------------------------------
|
||||
|
||||
static unique_ptr<Button>
|
||||
make_title_button(Action action)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// libdn/gettext.hpp: message translation macros
|
||||
// gettext.hpp: message translation macros
|
||||
//
|
||||
// Copyright The Dawn Authors
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
+2
-2
@@ -751,7 +751,7 @@ jpeg_grid(span<const uint8_t> data, JpegGrid *out, Error *error)
|
||||
ok = false;
|
||||
if (error)
|
||||
*error = {
|
||||
Error::Code::Open, _("Unsupported chroma subsampling")};
|
||||
Error::Code::Open, _("unsupported chroma subsampling")};
|
||||
} else if (out) {
|
||||
JpegMetadata meta;
|
||||
parse_jpeg_metadata(data, &meta);
|
||||
@@ -787,7 +787,7 @@ jpeg_transform(span<const uint8_t> data, Orientation op, uint32_t x, uint32_t y,
|
||||
x % grid.mcu_width || y % grid.mcu_height || w > grid.width - x ||
|
||||
h > grid.height - y) {
|
||||
if (error)
|
||||
*error = {Error::Code::Open, _("Invalid lossless JPEG crop")};
|
||||
*error = {Error::Code::Open, _("invalid lossless JPEG crop")};
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -1329,12 +1329,12 @@ msgid "MPF image %d: %s"
|
||||
msgstr "MPF obrázek %d: %s"
|
||||
|
||||
#: libdn/load-jpeg.cpp:754
|
||||
msgid "Unsupported chroma subsampling"
|
||||
msgstr "Nepodporované podvzorkování chrominance"
|
||||
msgid "unsupported chroma subsampling"
|
||||
msgstr "nepodporované podvzorkování chrominance"
|
||||
|
||||
#: libdn/load-jpeg.cpp:790
|
||||
msgid "Invalid lossless JPEG crop"
|
||||
msgstr "Neplatný bezztrátový JPEG ořez"
|
||||
msgid "invalid lossless JPEG crop"
|
||||
msgstr "neplatný bezztrátový JPEG ořez"
|
||||
|
||||
#: libdn/load-jxl.cpp:81
|
||||
msgid "failed to subscribe to libjxl events"
|
||||
|
||||
+12
-12
@@ -13,24 +13,24 @@ if (LIBPNG_FOUND)
|
||||
)
|
||||
endif()
|
||||
|
||||
set(DAWN_TEST_FIXTURES_DIR "${CMAKE_CURRENT_BINARY_DIR}/fixtures")
|
||||
set(DAWN_TEST_FIXTURES_STAMP "${DAWN_TEST_FIXTURES_DIR}/.stamp")
|
||||
set(test_fixtures_dir "${CMAKE_CURRENT_BINARY_DIR}/fixtures")
|
||||
set(test_fixtures_stamp "${test_fixtures_dir}/.stamp")
|
||||
add_custom_command(
|
||||
OUTPUT "${DAWN_TEST_FIXTURES_STAMP}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E rm -rf "${DAWN_TEST_FIXTURES_DIR}"
|
||||
COMMAND gen-fixtures "${DAWN_TEST_FIXTURES_DIR}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E touch "${DAWN_TEST_FIXTURES_STAMP}"
|
||||
OUTPUT "${test_fixtures_stamp}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E rm -rf "${test_fixtures_dir}"
|
||||
COMMAND gen-fixtures "${test_fixtures_dir}"
|
||||
COMMAND "${CMAKE_COMMAND}" -E touch "${test_fixtures_stamp}"
|
||||
DEPENDS gen-fixtures
|
||||
COMMENT "Generating test fixtures in the build tree"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(test-fixtures DEPENDS "${DAWN_TEST_FIXTURES_STAMP}")
|
||||
add_custom_target(test-fixtures DEPENDS "${test_fixtures_stamp}")
|
||||
|
||||
add_executable(test-channels test-channels.cpp)
|
||||
add_dependencies(test-channels test-fixtures)
|
||||
target_link_libraries(test-channels PRIVATE libdn dawn-lcms2)
|
||||
target_compile_definitions(test-channels PRIVATE
|
||||
DAWN_TEST_FIXTURES_DIR="${DAWN_TEST_FIXTURES_DIR}"
|
||||
DAWN_TEST_FIXTURES_DIR="${test_fixtures_dir}"
|
||||
)
|
||||
|
||||
add_test(NAME channels COMMAND test-channels)
|
||||
@@ -46,7 +46,7 @@ if (APPLE AND DAWN_WITH_IMAGEIO)
|
||||
add_dependencies(test-imageio test-fixtures)
|
||||
target_link_libraries(test-imageio PRIVATE libdn)
|
||||
target_compile_definitions(test-imageio PRIVATE
|
||||
DAWN_TEST_FIXTURES_DIR="${DAWN_TEST_FIXTURES_DIR}"
|
||||
DAWN_TEST_FIXTURES_DIR="${test_fixtures_dir}"
|
||||
)
|
||||
add_test(NAME imageio COMMAND test-imageio)
|
||||
endif()
|
||||
@@ -55,14 +55,14 @@ add_executable(test-jpeg-crop test-jpeg-crop.cpp)
|
||||
add_dependencies(test-jpeg-crop test-fixtures)
|
||||
target_link_libraries(test-jpeg-crop PRIVATE libdn)
|
||||
target_compile_definitions(test-jpeg-crop PRIVATE
|
||||
DAWN_TEST_FIXTURES_DIR="${DAWN_TEST_FIXTURES_DIR}")
|
||||
DAWN_TEST_FIXTURES_DIR="${test_fixtures_dir}")
|
||||
add_test(NAME jpeg-crop COMMAND test-jpeg-crop)
|
||||
|
||||
add_executable(test-gain-map test-gain-map.cpp)
|
||||
add_dependencies(test-gain-map test-fixtures)
|
||||
target_link_libraries(test-gain-map PRIVATE libdn)
|
||||
target_compile_definitions(test-gain-map PRIVATE
|
||||
DAWN_TEST_FIXTURES_DIR="${DAWN_TEST_FIXTURES_DIR}")
|
||||
DAWN_TEST_FIXTURES_DIR="${test_fixtures_dir}")
|
||||
add_test(NAME gain-map COMMAND test-gain-map)
|
||||
|
||||
add_executable(test-split-hdr test-split-hdr.cpp)
|
||||
@@ -235,7 +235,7 @@ if (DN_WITH_ACCESSIBILITY AND UNIX AND NOT APPLE)
|
||||
COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/run-accessible.sh"
|
||||
"$<TARGET_FILE:test-accessible>"
|
||||
"$<TARGET_FILE:dn>"
|
||||
"${DAWN_TEST_FIXTURES_DIR}")
|
||||
"${test_fixtures_dir}")
|
||||
# The launcher skips when the session it needs cannot be built; once
|
||||
# dn is up, anything going wrong at all is a failure.
|
||||
set_tests_properties(accessible PROPERTIES SKIP_RETURN_CODE 77)
|
||||
|
||||
@@ -27,10 +27,12 @@ namespace fs = filesystem;
|
||||
|
||||
// --- Utilities ---------------------------------------------------------------
|
||||
|
||||
#define PREFIX "gen-fixtures: "
|
||||
|
||||
static void
|
||||
die(const char *msg)
|
||||
{
|
||||
fprintf(stderr, "gen_fixtures: %s\n", msg);
|
||||
fprintf(stderr, PREFIX "%s\n", msg);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -114,7 +116,7 @@ run_tool(const char *tool, initializer_list<const char *> args)
|
||||
}
|
||||
int rc = system(cmd.c_str());
|
||||
if (rc != 0)
|
||||
fprintf(stderr, "gen_fixtures: warning: %s failed (%d): %s\n", tool, rc,
|
||||
fprintf(stderr, PREFIX "warning: %s failed (%d): %s\n", tool, rc,
|
||||
cmd.c_str());
|
||||
return rc;
|
||||
}
|
||||
@@ -897,7 +899,7 @@ write_gain_map_jxl(const fs::path &out)
|
||||
if (base.size() < 2 || base[0] != 0xFF || base[1] != 0x0A ||
|
||||
map.size() < 2 || map[0] != 0xFF || map[1] != 0x0A) {
|
||||
fprintf(
|
||||
stderr, "gen_fixtures: warning: cjxl made no naked codestreams\n");
|
||||
stderr, PREFIX "warning: cjxl made no naked codestreams\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -20,8 +20,7 @@ namespace test
|
||||
inline int failures;
|
||||
inline const char *current = "setup";
|
||||
|
||||
DAWN_FORMAT(1, 2)
|
||||
inline void
|
||||
DAWN_FORMAT(1, 2) inline void
|
||||
fail(const char *format, ...)
|
||||
{
|
||||
fprintf(stderr, "%s: ", current);
|
||||
|
||||
Reference in New Issue
Block a user