mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
SLADE: update to 3.2.4.
This commit is contained in:
parent
0252f2b859
commit
0f473d8043
3 changed files with 212 additions and 51 deletions
|
@ -0,0 +1,209 @@
|
||||||
|
From 99d044ef0e7ea0887470a7aa0667f026eb727d18 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Simon Judd <sirjuddington@gmail.com>
|
||||||
|
Date: Sat, 2 Dec 2023 14:56:28 +1030
|
||||||
|
Subject: [PATCH] Really fix clang compilation issue
|
||||||
|
|
||||||
|
Not sure why it couldn't disambiguate the functions since wxArrayString can't be constructed using an initializer list, either way I just removed it in favour of vector<wxString>
|
||||||
|
---
|
||||||
|
.../UI/EntryPanel/DataEntryPanel.cpp | 8 ++-----
|
||||||
|
.../UI/EntryPanel/PaletteEntryPanel.cpp | 13 ++++++-----
|
||||||
|
.../UI/EntryPanel/TextEntryPanel.cpp | 2 +-
|
||||||
|
src/MapEditor/MapEditContext.cpp | 17 +++++---------
|
||||||
|
src/MapEditor/UI/ScriptEditorPanel.cpp | 9 ++------
|
||||||
|
src/UI/SToolBar/SToolBar.cpp | 22 +------------------
|
||||||
|
src/UI/SToolBar/SToolBar.h | 3 +--
|
||||||
|
src/UI/STopWindow.cpp | 2 +-
|
||||||
|
src/UI/STopWindow.h | 2 +-
|
||||||
|
9 files changed, 22 insertions(+), 56 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/MainEditor/UI/EntryPanel/DataEntryPanel.cpp b/src/MainEditor/UI/EntryPanel/DataEntryPanel.cpp
|
||||||
|
index d15349ce2..95a03181c 100644
|
||||||
|
--- a/src/MainEditor/UI/EntryPanel/DataEntryPanel.cpp
|
||||||
|
+++ b/src/MainEditor/UI/EntryPanel/DataEntryPanel.cpp
|
||||||
|
@@ -922,12 +922,8 @@ DataEntryPanel::DataEntryPanel(wxWindow* parent) : EntryPanel(parent, "data"), t
|
||||||
|
|
||||||
|
// Add actions to toolbar
|
||||||
|
wxArrayString actions;
|
||||||
|
- actions.Add("data_add_row");
|
||||||
|
- actions.Add("data_delete_row");
|
||||||
|
- actions.Add("data_cut_row");
|
||||||
|
- actions.Add("data_copy_row");
|
||||||
|
- actions.Add("data_paste_row");
|
||||||
|
- toolbar_->addActionGroup("Data", actions);
|
||||||
|
+ toolbar_->addActionGroup(
|
||||||
|
+ "Data", { "data_add_row", "data_delete_row", "data_cut_row", "data_copy_row", "data_paste_row" });
|
||||||
|
|
||||||
|
// Bind events
|
||||||
|
Bind(wxEVT_KEY_DOWN, &DataEntryPanel::onKeyDown, this);
|
||||||
|
diff --git a/src/MainEditor/UI/EntryPanel/PaletteEntryPanel.cpp b/src/MainEditor/UI/EntryPanel/PaletteEntryPanel.cpp
|
||||||
|
index 76d3d734f..6143878f1 100644
|
||||||
|
--- a/src/MainEditor/UI/EntryPanel/PaletteEntryPanel.cpp
|
||||||
|
+++ b/src/MainEditor/UI/EntryPanel/PaletteEntryPanel.cpp
|
||||||
|
@@ -621,18 +621,19 @@ PaletteEntryPanel::PaletteEntryPanel(wxWindow* parent) : EntryPanel(parent, "pal
|
||||||
|
toolbar_->addGroup(group_palette);
|
||||||
|
|
||||||
|
// Current Palette
|
||||||
|
- wxString actions = "ppal_moveup;ppal_movedown;ppal_duplicate;ppal_remove;ppal_removeothers";
|
||||||
|
- toolbar_->addActionGroup("Palette Organisation", wxSplit(actions, ';'));
|
||||||
|
+ toolbar_->addActionGroup(
|
||||||
|
+ "Palette Organisation",
|
||||||
|
+ { "ppal_moveup", "ppal_movedown", "ppal_duplicate", "ppal_remove", "ppal_removeothers" });
|
||||||
|
|
||||||
|
// Palette Entry Operations
|
||||||
|
- actions = "ppal_addcustom;ppal_exportas;ppal_importfrom;ppal_test;ppal_generate";
|
||||||
|
- toolbar_->addActionGroup("Palette Operations", wxSplit(actions, ';'));
|
||||||
|
+ toolbar_->addActionGroup(
|
||||||
|
+ "Palette Operations", { "ppal_addcustom", "ppal_exportas", "ppal_importfrom", "ppal_test", "ppal_generate" });
|
||||||
|
|
||||||
|
// --- Left toolbar ---
|
||||||
|
|
||||||
|
// Colour Operations
|
||||||
|
- actions = "ppal_colourise;ppal_tint;ppal_invert;ppal_tweak;ppal_gradient";
|
||||||
|
- toolbar_left_->addActionGroup("Colours", wxSplit(actions, ';'));
|
||||||
|
+ toolbar_left_->addActionGroup(
|
||||||
|
+ "Colours", { "ppal_colourise", "ppal_tint", "ppal_invert", "ppal_tweak", "ppal_gradient" });
|
||||||
|
|
||||||
|
// --- Palette canvas ---
|
||||||
|
pal_canvas_ = new PaletteCanvas(this, -1);
|
||||||
|
diff --git a/src/MapEditor/MapEditContext.cpp b/src/MapEditor/MapEditContext.cpp
|
||||||
|
index 73c64eabd..5327b8478 100644
|
||||||
|
--- a/src/MapEditor/MapEditContext.cpp
|
||||||
|
+++ b/src/MapEditor/MapEditContext.cpp
|
||||||
|
@@ -212,11 +212,8 @@ void MapEditContext::setEditMode(Mode mode)
|
||||||
|
// Sector mode toolbar
|
||||||
|
if (edit_mode_prev_ != Mode::Sectors)
|
||||||
|
{
|
||||||
|
- wxArrayString actions;
|
||||||
|
- actions.Add("mapw_sectormode_normal");
|
||||||
|
- actions.Add("mapw_sectormode_floor");
|
||||||
|
- actions.Add("mapw_sectormode_ceiling");
|
||||||
|
- mapeditor::window()->addCustomToolBar("Sector Mode", actions);
|
||||||
|
+ mapeditor::window()->addCustomToolBar(
|
||||||
|
+ "Sector Mode", { "mapw_sectormode_normal", "mapw_sectormode_floor", "mapw_sectormode_ceiling" });
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggle current sector mode
|
||||||
|
@@ -231,9 +228,7 @@ void MapEditContext::setEditMode(Mode mode)
|
||||||
|
{
|
||||||
|
SAction::fromId("mapw_mode_things")->setChecked();
|
||||||
|
|
||||||
|
- wxArrayString actions;
|
||||||
|
- actions.Add("mapw_thing_light_previews");
|
||||||
|
- mapeditor::window()->addCustomToolBar("Things Mode", actions);
|
||||||
|
+ mapeditor::window()->addCustomToolBar("Things Mode", { "mapw_thing_light_previews" });
|
||||||
|
|
||||||
|
SAction::fromId("mapw_thing_light_previews")->setChecked(thing_preview_lights);
|
||||||
|
}
|
||||||
|
@@ -670,9 +665,9 @@ void MapEditContext::updateTagged()
|
||||||
|
case TagType::Sector1Thing2:
|
||||||
|
{
|
||||||
|
int thingtag = (needs_tag == TagType::Sector1Thing2) ? arg2 : tag;
|
||||||
|
- int sectag = (needs_tag == TagType::Sector1Thing2) ?
|
||||||
|
- tag :
|
||||||
|
- (needs_tag == TagType::Thing1Sector2) ? arg2 : arg3;
|
||||||
|
+ int sectag = (needs_tag == TagType::Sector1Thing2) ? tag :
|
||||||
|
+ (needs_tag == TagType::Thing1Sector2) ? arg2 :
|
||||||
|
+ arg3;
|
||||||
|
if ((thingtag | sectag) == 0)
|
||||||
|
break;
|
||||||
|
else if (thingtag == 0)
|
||||||
|
diff --git a/src/MapEditor/UI/ScriptEditorPanel.cpp b/src/MapEditor/UI/ScriptEditorPanel.cpp
|
||||||
|
index e24440545..3fc42dbbb 100644
|
||||||
|
--- a/src/MapEditor/UI/ScriptEditorPanel.cpp
|
||||||
|
+++ b/src/MapEditor/UI/ScriptEditorPanel.cpp
|
||||||
|
@@ -72,9 +72,7 @@ EXTERN_CVAR(Bool, txed_trim_whitespace)
|
||||||
|
// ScriptEditorPanel class constructor
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
ScriptEditorPanel::ScriptEditorPanel(wxWindow* parent) :
|
||||||
|
- wxPanel(parent, -1),
|
||||||
|
- entry_script_{ new ArchiveEntry() },
|
||||||
|
- entry_compiled_{ new ArchiveEntry() }
|
||||||
|
+ wxPanel(parent, -1), entry_script_{ new ArchiveEntry() }, entry_compiled_{ new ArchiveEntry() }
|
||||||
|
{
|
||||||
|
// Setup sizer
|
||||||
|
auto sizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
@@ -85,10 +83,7 @@ ScriptEditorPanel::ScriptEditorPanel(wxWindow* parent) :
|
||||||
|
sizer->Add(toolbar, 0, wxEXPAND);
|
||||||
|
|
||||||
|
wxArrayString actions;
|
||||||
|
- actions.Add("mapw_script_save");
|
||||||
|
- actions.Add("mapw_script_compile");
|
||||||
|
- actions.Add("mapw_script_togglelanguage");
|
||||||
|
- toolbar->addActionGroup("Scripts", actions);
|
||||||
|
+ toolbar->addActionGroup("Scripts", { "mapw_script_save", "mapw_script_compile", "mapw_script_togglelanguage" });
|
||||||
|
|
||||||
|
// Jump To toolbar group
|
||||||
|
auto group_jump_to = new SToolBarGroup(toolbar, "Jump To", true);
|
||||||
|
diff --git a/src/UI/SToolBar/SToolBar.cpp b/src/UI/SToolBar/SToolBar.cpp
|
||||||
|
index 051167e79..1b074543f 100644
|
||||||
|
--- a/src/UI/SToolBar/SToolBar.cpp
|
||||||
|
+++ b/src/UI/SToolBar/SToolBar.cpp
|
||||||
|
@@ -536,27 +536,7 @@ void SToolBar::deleteCustomGroups()
|
||||||
|
// Adds a new group [name] to the toolbar, containing toolbar buttons for each
|
||||||
|
// action in [actions]
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
-void SToolBar::addActionGroup(const wxString& name, const wxArrayString& actions, bool at_end)
|
||||||
|
-{
|
||||||
|
- // Do nothing if no actions were given
|
||||||
|
- if (actions.empty())
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- // Create new toolbar group
|
||||||
|
- auto* group = new SToolBarGroup(this, name);
|
||||||
|
- if (at_end)
|
||||||
|
- groups_end_.push_back(group);
|
||||||
|
- else
|
||||||
|
- groups_.push_back(group);
|
||||||
|
-
|
||||||
|
- // Add actions to the group
|
||||||
|
- for (const auto& action : actions)
|
||||||
|
- group->addActionButton(action);
|
||||||
|
-
|
||||||
|
- // Update layout
|
||||||
|
- updateLayout(true);
|
||||||
|
-}
|
||||||
|
-void SToolBar::addActionGroup(const wxString& name, const vector<string>& actions, bool at_end)
|
||||||
|
+void SToolBar::addActionGroup(const wxString& name, const vector<wxString>& actions, bool at_end)
|
||||||
|
{
|
||||||
|
// Do nothing if no actions were given
|
||||||
|
if (actions.empty())
|
||||||
|
diff --git a/src/UI/SToolBar/SToolBar.h b/src/UI/SToolBar/SToolBar.h
|
||||||
|
index 82155843a..54243defc 100644
|
||||||
|
--- a/src/UI/SToolBar/SToolBar.h
|
||||||
|
+++ b/src/UI/SToolBar/SToolBar.h
|
||||||
|
@@ -73,8 +73,7 @@ class SToolBar : public wxPanel
|
||||||
|
void addGroup(SToolBarGroup* group, bool at_end = false);
|
||||||
|
void deleteGroup(const wxString& name);
|
||||||
|
void deleteCustomGroups();
|
||||||
|
- void addActionGroup(const wxString& name, const wxArrayString& actions, bool at_end = false);
|
||||||
|
- void addActionGroup(const wxString& name, const vector<string>& actions, bool at_end = false);
|
||||||
|
+ void addActionGroup(const wxString& name, const vector<wxString>& actions, bool at_end = false);
|
||||||
|
void enableGroup(const wxString& name, bool enable = true);
|
||||||
|
void populateGroupsMenu(wxMenu* menu, int start_id = 0) const;
|
||||||
|
void enableContextMenu(bool enable = true) { enable_context_menu_ = enable; }
|
||||||
|
diff --git a/src/UI/STopWindow.cpp b/src/UI/STopWindow.cpp
|
||||||
|
index c8f97d63f..e7bb28510 100644
|
||||||
|
--- a/src/UI/STopWindow.cpp
|
||||||
|
+++ b/src/UI/STopWindow.cpp
|
||||||
|
@@ -152,7 +152,7 @@ void STopWindow::enableToolBar(const wxString& name, bool enable) const
|
||||||
|
// Adds a custom toolbar group to the toolbar, with buttons for each action in
|
||||||
|
// [actions]
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
-void STopWindow::addCustomToolBar(const wxString& name, const wxArrayString& actions) const
|
||||||
|
+void STopWindow::addCustomToolBar(const wxString& name, const vector<wxString>& actions) const
|
||||||
|
{
|
||||||
|
toolbar_->addActionGroup(name, actions);
|
||||||
|
populateToolbarsMenu();
|
||||||
|
diff --git a/src/UI/STopWindow.h b/src/UI/STopWindow.h
|
||||||
|
index 51e2400dc..7133f4680 100644
|
||||||
|
--- a/src/UI/STopWindow.h
|
||||||
|
+++ b/src/UI/STopWindow.h
|
||||||
|
@@ -24,7 +24,7 @@ class STopWindow : public wxFrame
|
||||||
|
|
||||||
|
// Toolbars
|
||||||
|
void enableToolBar(const wxString& name, bool enable = true) const;
|
||||||
|
- void addCustomToolBar(const wxString& name, const wxArrayString& actions) const;
|
||||||
|
+ void addCustomToolBar(const wxString& name, const vector<wxString>& actions) const;
|
||||||
|
void removeCustomToolBar(const wxString& name) const;
|
||||||
|
void removeAllCustomToolBars() const;
|
||||||
|
void populateToolbarsMenu() const;
|
|
@ -1,48 +0,0 @@
|
||||||
--- a/src/Audio/ModMusic.cpp 2022-05-13 15:08:51.000000000 +0200
|
|
||||||
+++ - 2023-01-02 14:13:21.643696778 +0100
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
// -----------------------------------------------------------------------------
|
|
||||||
#include "Main.h"
|
|
||||||
#include "ModMusic.h"
|
|
||||||
-#include "thirdparty/dumb/dumb.h"
|
|
||||||
+#include <dumb.h>
|
|
||||||
|
|
||||||
using namespace slade;
|
|
||||||
using namespace audio;
|
|
||||||
--- a/src/Application/App.cpp 2022-05-13 15:08:51.000000000 +0200
|
|
||||||
+++ - 2023-01-02 14:13:44.631508582 +0100
|
|
||||||
@@ -60,7 +60,7 @@
|
|
||||||
#include "UI/WxUtils.h"
|
|
||||||
#include "Utility/StringUtils.h"
|
|
||||||
#include "Utility/Tokenizer.h"
|
|
||||||
-#include "thirdparty/dumb/dumb.h"
|
|
||||||
+#include <dumb.h>
|
|
||||||
#include <filesystem>
|
|
||||||
|
|
||||||
using namespace slade;
|
|
||||||
--- a/thirdparty/CMakeLists.txt 2022-05-13 15:08:51.000000000 +0200
|
|
||||||
+++ - 2023-01-02 14:14:00.580831197 +0100
|
|
||||||
@@ -10,7 +10,6 @@
|
|
||||||
set(EXTERNAL_SOURCES
|
|
||||||
)
|
|
||||||
file(GLOB_RECURSE EXTERNAL_SOURCES
|
|
||||||
- dumb/*.c
|
|
||||||
lzma/C/LzmaDec.c
|
|
||||||
mus2mid/mus2mid.cpp
|
|
||||||
zreaders/*.cpp
|
|
||||||
@@ -30,4 +29,4 @@
|
|
||||||
|
|
||||||
add_library(external STATIC ${EXTERNAL_SOURCES})
|
|
||||||
target_link_libraries(external ${ZLIB_LIBRARY} lunasvg fmt ${CMAKE_DL_LIBS})
|
|
||||||
-set(EXTERNAL_LIBRARIES external PARENT_SCOPE)
|
|
||||||
+set(EXTERNAL_LIBRARIES external dumb PARENT_SCOPE)
|
|
||||||
--- a/src/CMakeLists.txt 2022-05-13 15:08:51.000000000 +0200
|
|
||||||
+++ - 2023-01-02 14:17:00.363717559 +0100
|
|
||||||
@@ -116,7 +116,6 @@
|
|
||||||
${MPG123_INCLUDE_DIR}
|
|
||||||
.
|
|
||||||
..
|
|
||||||
- ../thirdparty/dumb
|
|
||||||
../thirdparty/glad/include
|
|
||||||
./Application
|
|
||||||
)
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'SLADE'
|
# Template file for 'SLADE'
|
||||||
pkgname=SLADE
|
pkgname=SLADE
|
||||||
version=3.2.1
|
version=3.2.4
|
||||||
revision=2
|
revision=1
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
build_helper=cmake-wxWidgets-gtk3
|
build_helper=cmake-wxWidgets-gtk3
|
||||||
hostmakedepends="pkg-config p7zip which"
|
hostmakedepends="pkg-config p7zip which"
|
||||||
|
@ -14,7 +14,7 @@ license="GPL-2.0-or-later"
|
||||||
homepage="https://github.com/sirjuddington/SLADE"
|
homepage="https://github.com/sirjuddington/SLADE"
|
||||||
changelog="https://github.com/sirjuddington/SLADE/releases/tag/${version}"
|
changelog="https://github.com/sirjuddington/SLADE/releases/tag/${version}"
|
||||||
distfiles="https://github.com/sirjuddington/SLADE/archive/${version}.tar.gz"
|
distfiles="https://github.com/sirjuddington/SLADE/archive/${version}.tar.gz"
|
||||||
checksum=c327fa62ba491ac481d769700261d810128910007297fd9d9dbe26ac0e78bb2c
|
checksum=bded8e2218bc37c98c7f27894889433abf543d36038cde9e25d0162de7ac8f6e
|
||||||
|
|
||||||
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
CXXFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue