1
0
mirror of synced 2025-02-20 04:01:01 +01:00

impr: Removed a bunch of trailing white spaces

This commit is contained in:
WerWolv 2023-01-30 11:11:30 +01:00
parent 55d7d7c026
commit c76b4bc9e9
4 changed files with 29 additions and 49 deletions

View File

@ -99,7 +99,7 @@ jobs:
name: Windows Portable x86_64
path: |
build/install/*
- name: ⬇️ Download Mesa3D for NoGPU version
shell: bash
run: |
@ -126,7 +126,7 @@ jobs:
custom_glfw: true
- suffix: ""
custom_glfw: false
name: 🍎 macOS 11.0${{matrix.suffix}}
steps:
@ -138,14 +138,14 @@ jobs:
- name: 📜 Set version variable
run: |
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
- name: 📜 Setup ccache
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ matrix.suffix }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
with:
@ -236,14 +236,14 @@ jobs:
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
with:
path: |
build/CMakeCache.txt
key: ${{ runner.os }}-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
- name: ⬇️ Install dependencies
run: |
sudo apt update
@ -297,19 +297,19 @@ jobs:
key: ${{ runner.os }}-appimage-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: ${{ runner.os }}-appimage-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
with:
path: |
build-appimage/CMakeCache.txt
key: ${{ runner.os }}-appimage-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
- name: ⬇️ Install dependencies
run: |
sudo apt update
sudo bash dist/get_deps_debian.sh
sudo apt install -y python3-pip python3-setuptools desktop-file-utils libgdk-pixbuf2.0-dev fuse
sudo wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
@ -347,7 +347,7 @@ jobs:
with:
name: Linux AppImage x86_64
path: 'build-appimage/*.AppImage'
- name: ⬆️ Upload AppImage zsync
uses: actions/upload-artifact@v3
with:
@ -358,7 +358,7 @@ jobs:
archlinux-build:
name: 🐧 ArchLinux
runs-on: ubuntu-latest
container:
image: archlinux:base-devel
@ -370,7 +370,7 @@ jobs:
- name: ⬇️ Install setup dependencies
run: |
pacman -Syu git ccache --noconfirm
- name: 🧰 Checkout
uses: actions/checkout@v3
with:
@ -386,14 +386,14 @@ jobs:
key: archlinux-${{ secrets.CACHE_VERSION }}-build-${{ github.run_id }}
restore-keys: archlinux-${{ secrets.CACHE_VERSION }}-build
max-size: 50M
- name: 📜 Restore CMakeCache
uses: actions/cache@v3
with:
path: |
build/CMakeCache.txt
key: archlinux-${{ secrets.CACHE_VERSION }}-build-${{ hashFiles('**/CMakeLists.txt') }}
# ArchLinux cmake build
- name: 🛠️ Build
run: |
@ -417,7 +417,7 @@ jobs:
- name: 📜 Set version variable
run: |
echo "IMHEX_VERSION=`cat VERSION`" >> $GITHUB_ENV
- name: ✒️ Prepare PKGBUILD
run: |
cp dist/Arch/PKGBUILD build
@ -427,19 +427,19 @@ jobs:
- name: 📦 Package ArchLinux .pkg.tar.zst
run: |
cd build
# the name is a small trick to make makepkg recognize it as the source
# else, it would try to download the file from the release
tar -cvf imhex-${{env.IMHEX_VERSION}}-ArchLinux-x86_64.pkg.tar.zst -C installDir .
chmod -R 777 .
sudo -u nobody makepkg
# Replace the old file
rm imhex-${{env.IMHEX_VERSION}}-ArchLinux-x86_64.pkg.tar.zst
mv *.pkg.tar.zst imhex-${{env.IMHEX_VERSION}}-ArchLinux-x86_64.pkg.tar.zst
- name: ⬆️ Upload imhex-archlinux.pkg.tar.zst
uses: actions/upload-artifact@v3
with:
@ -467,7 +467,7 @@ jobs:
name: 🐧 ${{ matrix.name }} ${{ matrix.release_num }}
runs-on: ubuntu-latest
container:
image: "fedora:latest"
options: --privileged
@ -475,13 +475,13 @@ jobs:
steps:
- name: ⬇️ Install git-core
run: dnf install --disablerepo="*" --enablerepo="fedora" git-core -y
- name: 🧰 Checkout
uses: actions/checkout@v3
with:
path: ImHex
submodules: recursive
- name: 📜 Setup DNF Cache
uses: actions/cache@v3
with:
@ -489,7 +489,7 @@ jobs:
key: ${{ matrix.mock_release }}-${{secrets.CACHE_VERSION }}-dnf-${{ github.run_id }}
restore-keys: |
${{ matrix.mock_release }}-${{secrets.CACHE_VERSION }}-dnf-
- name: ⬇️ Update all packages and install dependencies
run: |
dnf upgrade --disablerepo="*" --enablerepo="fedora,updates" -y
@ -507,10 +507,10 @@ jobs:
- name: 📜 Set version variable
run: |
echo "IMHEX_VERSION=`cat ImHex/VERSION`" >> $GITHUB_ENV
- name: 🗜️ Create tarball from sources with dependencies
run: tar --exclude-vcs -czf $GITHUB_WORKSPACE/imhex-$IMHEX_VERSION.tar.gz ImHex
- name: "✒️ Modify spec file: set version, use latest pattern language, enable online build"
run: |
sed -i \
@ -520,11 +520,11 @@ jobs:
-e '/BuildRequires: cmake/a BuildRequires: git-core' \
-e '/%files/a %{_datadir}/%{name}/' \
$GITHUB_WORKSPACE/ImHex/dist/rpm/imhex.spec
- name: 📜 Fix ccache on EL9
if: matrix.mock_release == 'epel9'
run: sed -i '/\. \/opt\/rh\/gcc-toolset-12\/enable/a PATH=/usr/lib64/ccache:$PATH' $GITHUB_WORKSPACE/ImHex/dist/rpm/imhex.spec
- name: 🟩 Copy spec file to build root
run: mv $GITHUB_WORKSPACE/ImHex/dist/rpm/imhex.spec $GITHUB_WORKSPACE/imhex.spec
@ -551,7 +551,7 @@ jobs:
run: |
fedpkg --path $GITHUB_WORKSPACE --release ${{ matrix.mock_release }} mockbuild --enable-network -N --root $GITHUB_WORKSPACE/mock.cfg extra_args -- -v
# set fortify_source back to 2 - level 3 in rawhide breaks through GH actions for some reason
- name: 🟩 Move and rename finished RPM
run: |
mv $GITHUB_WORKSPACE/results_imhex/${{env.IMHEX_VERSION}}/*/imhex-${{env.IMHEX_VERSION}}-0.*.x86_64.rpm \

View File

@ -435,7 +435,6 @@ namespace hex::plugin::builtin {
mathHistory.push_back(result.value());
lastMathError.clear();
}
} catch (std::invalid_argument &e) {
lastMathError = e.what();
}
@ -907,12 +906,12 @@ namespace hex::plugin::builtin {
ImGui::TextSpinner("hex.builtin.tools.file_tools.splitter.picker.splitting"_lang);
else {
if (ImGui::Button("hex.builtin.tools.file_tools.splitter.picker.split"_lang)) {
splitterTask = TaskManager::createTask("hex.builtin.tools.file_tools.splitter.picker.splitting", 0, [](auto &task) {
ON_SCOPE_EXIT {
selectedFile.clear();
baseOutputPath.clear();
};
fs::File file(selectedFile, fs::File::Mode::Read);
if (!file.isValid()) {
@ -971,7 +970,6 @@ namespace hex::plugin::builtin {
ImGui::TableNextColumn();
if (ImGui::BeginListBox("##files", { -FLT_MIN, 10 * ImGui::GetTextLineHeightWithSpacing() })) {
u32 index = 0;
for (auto &file : files) {
if (ImGui::Selectable(hex::toUTF8String(file).c_str(), index == selectedIndex))
@ -1047,9 +1045,7 @@ namespace hex::plugin::builtin {
ImGui::TextSpinner("hex.builtin.tools.file_tools.combiner.combining"_lang);
else {
if (ImGui::Button("hex.builtin.tools.file_tools.combiner.combine"_lang)) {
combinerTask = TaskManager::createTask("hex.builtin.tools.file_tools.combiner.combining", 0, [](auto &task) {
fs::File output(outputPath, fs::File::Mode::Create);
if (!output.isValid()) {
@ -1091,9 +1087,7 @@ namespace hex::plugin::builtin {
}
void drawFileTools() {
if (ImGui::BeginTabBar("file_tools_tabs")) {
if (ImGui::BeginTabItem("hex.builtin.tools.file_tools.shredder"_lang)) {
drawFileToolShredder();
ImGui::EndTabItem();
@ -1366,13 +1360,9 @@ namespace hex::plugin::builtin {
ImGui::PopStyleColor();
ImGui::PopStyleVar();
}
ImGui::EndChild();
}
}
void registerToolEntries() {

View File

@ -23,7 +23,6 @@ namespace hex::plugin::builtin {
static bool s_selectableFileMultiple;
static void drawGlobalPopups() {
// "Are you sure you want to exit?" Popup
if (ImGui::BeginPopupModal("hex.builtin.popup.exit_application.title"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) {
ImGui::NewLine();
@ -145,9 +144,7 @@ namespace hex::plugin::builtin {
bool opened = true;
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5F, 0.5F));
if (ImGui::BeginPopupModal("hex.builtin.common.choose_file"_lang, &opened, ImGuiWindowFlags_AlwaysAutoResize)) {
if (ImGui::BeginListBox("##files", scaled(ImVec2(500, 400)))) {
u32 index = 0;
for (auto &path : s_selectableFiles) {
ImGui::PushID(index);
@ -164,11 +161,9 @@ namespace hex::plugin::builtin {
s_selectableFileIndices.insert(index);
}
}
}
ImGui::PopID();
index++;
}
@ -245,7 +240,6 @@ namespace hex::plugin::builtin {
}
void addFooterItems() {
if (hex::isProcessElevated()) {
ContentRegistry::Interface::addFooterItem([] {
ImGui::TextUnformatted(ICON_VS_SHIELD);
@ -436,7 +430,6 @@ namespace hex::plugin::builtin {
}
ImGui::EndDisabled();
});
}
void handleBorderlessWindowMode() {

View File

@ -491,7 +491,6 @@ namespace hex::plugin::builtin {
}
if (ImGui::BeginListBox("##patterns_accept", ImVec2(-FLT_MIN, 0))) {
u32 index = 0;
for (auto &path : this->m_possiblePatternFiles) {
if (ImGui::Selectable(hex::toUTF8String(path.filename()).c_str(), index == this->m_selectedPatternFile))
@ -572,7 +571,6 @@ namespace hex::plugin::builtin {
if (ImGui::GetIO().KeyShift) {
ImGui::Indent();
if (ImGui::BeginTable("##extra_info", 2, ImGuiTableFlags_RowBg | ImGuiTableFlags_BordersInnerV | ImGuiTableFlags_NoClip)) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
@ -853,7 +851,6 @@ namespace hex::plugin::builtin {
auto provider = ImHexApi::Provider::get();
if (ImGui::MenuItem("hex.builtin.view.pattern_editor.menu.file.load_pattern"_lang, nullptr, false, providerValid)) {
std::vector<std::fs::path> paths;
for (const auto &imhexPath : fs::getDefaultPaths(fs::ImHexPath::Patterns)) {