mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Fix warnings
Semi-fix bug #6 (does not work if the zipfile was loaded from a directory) git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1439 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -156,7 +156,7 @@ void AddPackAction::perform(bool to_undo) {
|
||||
|
||||
ChangePackAction::ChangePackAction(Set& set, size_t pos, const PackTypeP& pack)
|
||||
: PackTypesAction(set)
|
||||
, pos(pos), pack(pack)
|
||||
, pack(pack), pos(pos)
|
||||
{}
|
||||
|
||||
String ChangePackAction::getName(bool to_undo) const {
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// ----------------------------------------------------------------------------- : Export template, basics
|
||||
|
||||
ExportTemplate::ExportTemplate()
|
||||
: create_directory(false)
|
||||
, file_type(_("HTML files (*.html)|*.html"))
|
||||
: file_type(_("HTML files (*.html)|*.html"))
|
||||
, create_directory(false)
|
||||
{}
|
||||
|
||||
String ExportTemplate::typeNameStatic() { return _("export-template"); }
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ bool Font::update(Context& ctx) {
|
||||
| underline .update(ctx)
|
||||
| color .update(ctx)
|
||||
| shadow_color.update(ctx);
|
||||
flags = flags & (~FONT_BOLD & ~FONT_ITALIC)
|
||||
flags = (flags & ~FONT_BOLD & ~FONT_ITALIC)
|
||||
| (weight() == _("bold") ? FONT_BOLD : FONT_NORMAL)
|
||||
| (style() == _("italic") ? FONT_ITALIC : FONT_NORMAL);
|
||||
return changes;
|
||||
|
||||
@@ -641,14 +641,14 @@ ApprenticeExportWindow::ApprenticeExportWindow(Window* parent, const SetP& set)
|
||||
wxSizer* s2 = new wxBoxSizer(wxHORIZONTAL);
|
||||
s2->Add(apprentice, 1, wxEXPAND | wxRIGHT, 4);
|
||||
s2->Add(browse, 0, wxEXPAND);
|
||||
s->Add(s2, 0, wxEXPAND | wxALL & ~wxTOP, 4);
|
||||
s->Add(s2, 0, wxEXPAND | (wxALL & ~wxTOP), 4);
|
||||
s->AddSpacer(8);
|
||||
// Set code
|
||||
s->Add(new wxStaticText(this, -1, _LABEL_("set code")), 0, wxALL, 4);
|
||||
s->Add(set_code, 0, wxEXPAND | wxLEFT | wxRIGHT, 4);
|
||||
s->Add(new wxStaticText(this, -1, _HELP_( "set code")), 0, wxALL, 4);
|
||||
s->AddSpacer(4);
|
||||
s->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | wxALL & ~wxTOP, 8);
|
||||
s->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxEXPAND | (wxALL & ~wxTOP), 8);
|
||||
s->SetSizeHints(this);
|
||||
SetSizer(s);
|
||||
}
|
||||
|
||||
+9
-8
@@ -28,14 +28,14 @@ DECLARE_TYPEOF_NO_REV(IndexMap<FieldP COMMA ValueP>);
|
||||
// ----------------------------------------------------------------------------- : Set
|
||||
|
||||
Set::Set()
|
||||
: script_manager(new SetScriptManager(*this))
|
||||
, vcs (new_intrusive<VCS>())
|
||||
: vcs (new_intrusive<VCS>())
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
{}
|
||||
|
||||
Set::Set(const GameP& game)
|
||||
: game(game)
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
, vcs (new_intrusive<VCS>())
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
{
|
||||
data.init(game->set_fields);
|
||||
}
|
||||
@@ -43,8 +43,8 @@ Set::Set(const GameP& game)
|
||||
Set::Set(const StyleSheetP& stylesheet)
|
||||
: game(stylesheet->game)
|
||||
, stylesheet(stylesheet)
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
, vcs (new_intrusive<VCS>())
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
{
|
||||
data.init(game->set_fields);
|
||||
}
|
||||
@@ -201,8 +201,11 @@ void Set::reflect_cards (Tag& tag) {
|
||||
|
||||
template <>
|
||||
void Set::reflect_cards<Writer> (Writer& tag) {
|
||||
// TODO: disable for zipfiles
|
||||
if (true) {
|
||||
// When writing to a directory, we write each card in a separate file.
|
||||
// We don't do this in zipfiles because it leads to bloat.
|
||||
if (isZipfile()) {
|
||||
REFLECT(cards);
|
||||
} else {
|
||||
set<String> used;
|
||||
FOR_EACH(card, cards) {
|
||||
String filename = normalize_internal_filename(clean_filename(card->identification()));
|
||||
@@ -222,8 +225,6 @@ void Set::reflect_cards<Writer> (Writer& tag) {
|
||||
referenceFile(full_name);
|
||||
REFLECT_N("include file", full_name);
|
||||
}
|
||||
} else {
|
||||
REFLECT(cards);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,9 @@ GameSettings::GameSettings()
|
||||
, images_export_filename(_("{card.name}.jpg"))
|
||||
, images_export_conflicts(CONFLICT_NUMBER_OVERWRITE)
|
||||
, use_auto_replace(true)
|
||||
, initialized(false)
|
||||
, pack_seed_random(true)
|
||||
, pack_seed(123456)
|
||||
, initialized(false)
|
||||
{}
|
||||
|
||||
void GameSettings::initDefaults(const Game& game) {
|
||||
|
||||
Reference in New Issue
Block a user