Update CMakeLists.txt to allow for static compilation | Update Readme.md | Update package.ps1 (#74)

* Fix CMakeLists, Update Readme and package.ps1

Fixed CMakeLists to allow for static complilation/workaround for broken Hunspell Upped version number to 2.5.0

Updated Readme to include corrected compilation instructions for Visual Studio and Workarounds.

Updated package.ps1 to include the cli executable in the dist zips and upped the version number to 2.5.0

* Update README.md

* Update package.ps1

* Update package.ps1

* Update CHANGES.md

* Update preferences_window.cpp

* Update README.md
This commit is contained in:
BaconCatBug
2024-04-29 18:47:19 +01:00
committed by GitHub
parent ad6d40df4c
commit 862907cf5b
5 changed files with 99 additions and 70 deletions
+52 -52
View File
@@ -65,22 +65,22 @@ private:
void updateZoom();
void onExportZoomChange(wxCommandEvent&);
void updateExportZoom();
};
};
class InternalPreferencesPage : public PreferencesPage {
public:
InternalPreferencesPage(Window* parent);
void store() override;
private:
DECLARE_EVENT_TABLE();
wxCheckBox* internal_image_extension;
wxComboBox* internal_scale;
int internal_scale_int;
void onInternalScaleChange(wxCommandEvent&);
public:
InternalPreferencesPage(Window* parent);
void store() override;
private:
DECLARE_EVENT_TABLE();
wxCheckBox* internal_image_extension;
wxComboBox* internal_scale;
int internal_scale_int;
void onInternalScaleChange(wxCommandEvent&);
void updateInternalScale();
};
@@ -124,7 +124,7 @@ PreferencesWindow::PreferencesWindow(Window* parent)
// init notebook
wxNotebook* nb = new wxNotebook(this, ID_NOTEBOOK);
nb->AddPage(new GlobalPreferencesPage (nb), _TITLE_("global"));
nb->AddPage(new DisplayPreferencesPage(nb), _TITLE_("display"));
nb->AddPage(new DisplayPreferencesPage(nb), _TITLE_("display"));
nb->AddPage(new InternalPreferencesPage(nb), _TITLE_("internal"));
nb->AddPage(new DirsPreferencesPage (nb), _TITLE_("directories"));
nb->AddPage(new UpdatePreferencesPage (nb), _TITLE_("updates"));
@@ -202,7 +202,7 @@ void GlobalPreferencesPage::store() {
// set the_locale?
// open_sets_in_new_window
settings.open_sets_in_new_window = open_sets_in_new_window->GetValue();
}
}
// ----------------------------------------------------------------------------- : Preferences page : display
@@ -213,17 +213,17 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
high_quality = new wxCheckBox(this, wxID_ANY, _BUTTON_("high quality"));
borders = new wxCheckBox(this, wxID_ANY, _BUTTON_("show lines"));
draw_editing = new wxCheckBox(this, wxID_ANY, _BUTTON_("show editing hints"));
spellcheck_enabled = new wxCheckBox(this, wxID_ANY, _BUTTON_("spellcheck enabled"));
spellcheck_enabled = new wxCheckBox(this, wxID_ANY, _BUTTON_("spellcheck enabled"));
non_normal_export = new wxCheckBox(this, wxID_ANY, _BUTTON_("zoom export"));
zoom = new wxComboBox(this, ID_ZOOM);
export_zoom = new wxComboBox(this, ID_EXPORT_ZOOM);
export_zoom = new wxComboBox(this, ID_EXPORT_ZOOM);
//wxButton* columns = new wxButton(this, ID_SELECT_COLUMNS, _BUTTON_("select"));
// set values
high_quality-> SetValue( settings.default_stylesheet_settings.card_anti_alias());
borders-> SetValue( settings.default_stylesheet_settings.card_borders());
draw_editing-> SetValue( settings.default_stylesheet_settings.card_draw_editing());
spellcheck_enabled->SetValue( settings.default_stylesheet_settings.card_spellcheck_enabled());
spellcheck_enabled->SetValue( settings.default_stylesheet_settings.card_spellcheck_enabled());
non_normal_export->SetValue(!settings.default_stylesheet_settings.card_normal_export());
zoom_int = static_cast<int>(settings.default_stylesheet_settings.card_zoom() * 100);
zoom->SetValue(String::Format(_("%d%%"),zoom_int));
@@ -258,7 +258,7 @@ DisplayPreferencesPage::DisplayPreferencesPage(Window* parent)
s4->Add(new wxStaticText(this, wxID_ANY, _LABEL_("percent of normal")), 1, wxALL & ~wxRIGHT, 4);
s2->Add(s3, 0, wxEXPAND | wxALL, 4);
s2->Add(s4, 0, wxEXPAND | wxALL, 4);
s2->Add(s4, 0, wxEXPAND | wxALL, 4);
s2->Add(non_normal_export, 0, wxEXPAND | wxALL, 4);
s->Add(s2, 0, wxEXPAND | wxALL, 8);
@@ -271,7 +271,7 @@ void DisplayPreferencesPage::store() {
settings.default_stylesheet_settings.card_anti_alias = high_quality->GetValue();
settings.default_stylesheet_settings.card_borders = borders->GetValue();
settings.default_stylesheet_settings.card_draw_editing = draw_editing->GetValue();
settings.default_stylesheet_settings.card_spellcheck_enabled = spellcheck_enabled->GetValue();
settings.default_stylesheet_settings.card_spellcheck_enabled = spellcheck_enabled->GetValue();
settings.default_stylesheet_settings.card_normal_export = !non_normal_export->GetValue();
updateZoom();
@@ -316,45 +316,45 @@ BEGIN_EVENT_TABLE(DisplayPreferencesPage, wxPanel)
EVT_COMBOBOX(ID_EXPORT_ZOOM, DisplayPreferencesPage::onExportZoomChange)
EVT_TEXT_ENTER(ID_EXPORT_ZOOM, DisplayPreferencesPage::onExportZoomChange)
END_EVENT_TABLE ()
// ----------------------------------------------------------------------------- : Preferences page : internal
InternalPreferencesPage::InternalPreferencesPage(Window* parent) : PreferencesPage(parent) {
internal_image_extension = new wxCheckBox(this, wxID_ANY, _BUTTON_("internal image extension"));
internal_scale = new wxComboBox(this, ID_INTERNAL_SCALE);
internal_image_extension->SetValue(settings.internal_image_extension);
internal_scale_int = static_cast<int>(settings.internal_scale * 100);
internal_scale->SetValue(String::Format(_("%d%%"), internal_scale_int));
int choices[] = { 100,200 };
// ----------------------------------------------------------------------------- : Preferences page : internal
InternalPreferencesPage::InternalPreferencesPage(Window* parent) : PreferencesPage(parent) {
internal_image_extension = new wxCheckBox(this, wxID_ANY, _BUTTON_("internal image extension"));
internal_scale = new wxComboBox(this, ID_INTERNAL_SCALE);
internal_image_extension->SetValue(settings.internal_image_extension);
internal_scale_int = static_cast<int>(settings.internal_scale * 100);
internal_scale->SetValue(String::Format(_("%d%%"), internal_scale_int));
int choices[] = { 100,200,300,400 };
for (unsigned int i = 0; i < sizeof(choices) / sizeof(choices[0]); ++i) {
internal_scale->Append(String::Format(_("%d%%"), choices[i]));
}
wxSizer* s = new wxBoxSizer(wxVERTICAL);
wxSizer* s2 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("storage"));
}
wxSizer* s = new wxBoxSizer(wxVERTICAL);
wxSizer* s2 = new wxStaticBoxSizer(wxVERTICAL, this, _LABEL_("storage"));
wxSizer* s3 = new wxBoxSizer(wxHORIZONTAL);
s3->Add(new wxStaticText(this, wxID_ANY, _LABEL_("scale")), 0, wxALL & ~wxLEFT, 4);
s3->AddSpacer(2);
s3->Add(internal_scale);
s3->Add(new wxStaticText(this, wxID_ANY, _LABEL_("percent of normal")), 1, wxALL & ~wxRIGHT, 4);
s2->Add(s3);
s2->Add(new wxStaticText(this, wxID_ANY, _LABEL_("internal scale desc")), 0, wxALL & ~wxLEFT, 4);
s2->Add(internal_image_extension, 0, wxEXPAND | wxALL, 4);
s3->Add(new wxStaticText(this, wxID_ANY, _LABEL_("percent of normal")), 1, wxALL & ~wxRIGHT, 4);
s2->Add(s3);
s2->Add(new wxStaticText(this, wxID_ANY, _LABEL_("internal scale desc")), 0, wxALL & ~wxLEFT, 4);
s2->Add(internal_image_extension, 0, wxEXPAND | wxALL, 4);
s->Add(s2, 0, wxEXPAND | wxALL, 8);
s->SetSizeHints(this);
SetSizer(s);
}
SetSizer(s);
}
void InternalPreferencesPage::store() {
settings.internal_image_extension = internal_image_extension->GetValue();
settings.internal_image_extension = internal_image_extension->GetValue();
updateInternalScale();
settings.internal_scale = internal_scale_int / 100.0;
}
}
void InternalPreferencesPage::onInternalScaleChange(wxCommandEvent&) {
updateInternalScale();
}
@@ -366,8 +366,8 @@ void InternalPreferencesPage::updateInternalScale() {
internal_scale_int = min(max(i, 1), 1000);
}
internal_scale->SetValue(String::Format(_("%d%%"), (int)internal_scale_int));
}
}
BEGIN_EVENT_TABLE(InternalPreferencesPage, wxPanel)
EVT_COMBOBOX(ID_INTERNAL_SCALE, InternalPreferencesPage::onInternalScaleChange)
END_EVENT_TABLE()