Skip to content

Commit

Permalink
Adjustments (see description) 💞
Browse files Browse the repository at this point in the history
- Updated Readme
- Adjustments to make the same code compile on Windows and Linux - @philipplenk
- Changed the Fernanda's name to standard capitalization (for title bar, .exe info, shortcuts, etc. - not the .exe)
- **Existing information about Fernanda may need to be manually removed from the Windows Registry in order to see changes**
- Added new lines to the ends of all source files
- Added NSI script (and dependency) to build a Modern UI Windows installer/uninstaller and for registering/unregistering the .story file extension
- Removed unused registry functions from Ud
- Added option to Help and Dev menus to open installation folder
- Readded the asterisk visual indicator to Delegate's painting of edited files
  • Loading branch information
fairybow committed Dec 30, 2022
1 parent 81fed0a commit 2254bd1
Show file tree
Hide file tree
Showing 35 changed files with 439 additions and 114 deletions.
File renamed without changes.
23 changes: 12 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="fernanda/res/icons/fernanda.ico" alt="Colorful conch shell icon." width="26px"/> fernanda
# <img src="fernanda/res/icons/fernanda.ico" alt="Colorful conch shell icon." width="26px"/> Fernanda

<p align="center">
<kbd>
Expand All @@ -7,14 +7,15 @@
</kbd>
</p>
<p align="center">
<a href="LICENSE"><img src="https://img.shields.io/github/license/fairybow/fernanda" alt="license: GPL-3.0"/></a>
<a href="https://www.qt.io/"><img src="https://img.shields.io/badge/Qt-6.4.1-green?logo=qt" alt="Qt: 6.4.1"/></a>
<a href="https://github.com/fairybow/fernanda/releases/"><img src="https://img.shields.io/github/v/release/fairybow/fernanda?include_prereleases&color=f34b7d" alt="releases"/></a>
<a href="LICENSE"><img src="https://img.shields.io/github/license/fairybow/fernanda?color=orange" alt="license: GPL-3.0"/></a>
<br>
<a href="https://www.qt.io/"><img src="https://img.shields.io/badge/Qt-6.4.1-00ff00?logo=qt" alt="Qt: 6.4.1"/></a>
<a href="https://github.com/rikyoz/bit7z"><img src="https://img.shields.io/badge/Bit7z-4.0.0_beta-blue" alt="Bit7z: 4.0.0-beta"/></a>
<a href="https://www.7-zip.org/"><img src="https://img.shields.io/badge/7zip-22.01-blueviolet" alt="7zip: 22.01"/></a>
<a href="https://shields.io/"><img src="https://img.shields.io/badge/omg-these_are_so_cute-ff69b4" alt="Shields.io"/></a>
<a href="https://www.7-zip.org/"><img src="https://img.shields.io/badge/7zip-22.01-ffbf00" alt="7zip: 22.01"/></a>
</p>

## :tea: **hi**
## :tea: **Hello**

Fernanda is a plain text editor for drafting long-form fiction. (At least, that's the plan.)

Expand All @@ -24,7 +25,7 @@ Fernanda's look was inspired by the good, quiet feeling of using [WordStar](http

Fernanda got its name because I just really like the name a lot. But, as it turns out, Fernanda means an ["adventurous, bold journey"](https://en.wikipedia.org/wiki/Fernanda) (the kind one might be *called* to, say), and I think that's neat. <img src="fernanda/res/icons/fernanda.ico" alt="Colorful conch shell icon." width="16px"/>

## :compass: **roadmap**
## :compass: **Roadmap**

- [Releases (Windows x64)](https://github.com/fairybow/fernanda/releases)

Expand All @@ -46,7 +47,7 @@ If I think of something big, I'll try to add it right here. Otherwise, these thi

More to come.

## :honeybee: **build**
## :honeybee: **Build**

Fernanda is built with:
- C++
Expand All @@ -71,19 +72,19 @@ Among the fonts used are:

Solarized themes by [@altercation](https://github.com/altercation/solarized)

## :star: **features**
## :star: **Features**

Fernanda's `.story` files are 7-zip (`.7z`, non-compressed) archives. They can be associated with Fernanda and then opened in the usual ways. However, they can also be opened with [7-zip](https://www.7-zip.org/), and the contents copied elsewhere. If you want to rename, move, or delete items within a `.story` project file, be sure to delete `story.xml` so that it can be recreated with the new paths. You will, however, lose any parentings/reorderings that are at the same directory level (like a file parented by another file).

Fernanda also incorporates whatever `.ttf` and `.otf` fonts that you put in the user folder, along with custom themes (example themes can be created via the `Help` menu).

## :smiley_cat: **thanks**
## :smiley_cat: **Thanks**

A major thanks to [@philipplenk](https://codemetas.de/) for their teaching and interest and support in helping me work toward a small dream like this (and for helping me make Fernanda available for [Arch Linux](https://aur.archlinux.org/packages/fernanda)).

A major thanks, too, to [@rikyoz](https://github.com/rikyoz/) for their tireless work on the very amazing [bit7z library](https://github.com/rikyoz/bit7z).

## :heartpulse: **bye**
## :heartpulse: **Bye**

Older screens:

Expand Down
1 change: 1 addition & 0 deletions fernanda/docs/todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [ ] Add border variables to stylesheets--for the most part, these can just be `transparent`, but allows for user to decide in customs
- [ ] Hold current story file from being edited while Fernanda is open? (Not sure this is possible. Plus, will need a way to temporarily request access for `Archiver` for editing)
- [ ] Export selected / all
- [ ] Export to PDF using Markdown or Fountain
- [ ] Total word count (export-marked or all)
- [x] ~~Make Pallete.txt an .md~~
- [ ] Is there a way to link swatches?
Expand Down
1 change: 1 addition & 0 deletions fernanda/fernanda.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
<None Include="res\themes\window\Solarized Light.fernanda_wintheme" />
<None Include="res\themes\window\Solarized Dark.fernanda_wintheme" />
<None Include="res\themes\window_base.qss" />
<None Include="util\nsis\win_installer.nsi" />
<None Include="util\win_pack.bat" />
</ItemGroup>
<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions fernanda/fernanda.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
<None Include="res\themes\editor\Solarized Dark.fernanda_theme">
<Filter>Resource Files\Stylesheets\Editor Themes</Filter>
</None>
<None Include="util\nsis\win_installer.nsi" />
</ItemGroup>
<ItemGroup>
<None Include="cpp.hint" />
Expand Down
4 changes: 2 additions & 2 deletions fernanda/src/archiver.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// archiver.cpp, fernanda
// archiver.cpp, Fernanda

#include "archiver.h"

Expand Down Expand Up @@ -174,4 +174,4 @@ void Archiver::blanks(FsPath arcPath, std::map<std::string, Path::Type> addition
compressor.compressDirectory(Path::toB7z(temp_dir_path / Io::storyRoot), Path::toB7z(arcPath));
}

// archiver.cpp, fernanda
// archiver.cpp, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/archiver.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// archiver.h, fernanda
// archiver.h, Fernanda

#pragma once

Expand Down Expand Up @@ -42,4 +42,4 @@ class Archiver
void blanks(FsPath arcPath, std::map<std::string, Path::Type> additions);
};

// archiver.h, fernanda
// archiver.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/colorbar.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// colorbar.cpp, fernanda
// colorbar.cpp, Fernanda

#include "colorbar.h"

Expand Down Expand Up @@ -82,4 +82,4 @@ void ColorBar::style(Color theme)
bar->setStyleSheet(style_sheet);
}

// colorbar.cpp, fernanda
// colorbar.cpp, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/colorbar.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// colorbar.h, fernanda
// colorbar.h, Fernanda

#pragma once

Expand Down Expand Up @@ -45,4 +45,4 @@ public slots:
void style(Color theme);
};

// colorbar.h, fernanda
// colorbar.h, Fernanda
6 changes: 3 additions & 3 deletions fernanda/src/delegate.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// delegate.h, fernanda
// delegate.h, Fernanda

#pragma once

Expand Down Expand Up @@ -90,10 +90,10 @@ class PaneDelegate : public QStyledItemDelegate
if (dirty)
{
painter->setFont(italics);
//name = name + "*";
name = "*" + name;
}
painter->drawText(geo.text, name);
}
};

// delegate.h, fernanda
// delegate.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/dom.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dom.cpp, fernanda
// dom.cpp, Fernanda

#include "dom.h"

Expand Down Expand Up @@ -339,4 +339,4 @@ Dom::FsPath Dom::filterPath(QDomElement elem, Filter filter)
return result;
}

// dom.cpp, fernanda
// dom.cpp, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/dom.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// dom.h, fernanda
// dom.h, Fernanda

#pragma once

Expand Down Expand Up @@ -187,4 +187,4 @@ class Dom
}
};

// dom.h, fernanda
// dom.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/editor.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// editor.cpp, fernanda
// editor.cpp, Fernanda

#include "editor.h"

Expand Down Expand Up @@ -478,4 +478,4 @@ void TextEditor::updateLineNumberArea(const QRect& rect, int dy)
updateLineNumberAreaWidth(0);
}

// editor.cpp, fernanda
// editor.cpp, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/editor.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// editor.h, fernanda
// editor.h, Fernanda

#pragma once

Expand Down Expand Up @@ -144,4 +144,4 @@ class LineNumberArea : public QWidget
TextEditor* textEditor;
};

// editor.h, fernanda
// editor.h, Fernanda
21 changes: 16 additions & 5 deletions fernanda/src/fernanda.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
// fernanda.cpp, fernanda
// fernanda.cpp, Fernanda

#include "fernanda.h"

Fernanda::Fernanda(bool dev, FsPath story, QWidget* parent)
: QMainWindow(parent)
{
Ud::setName(ferName(dev));
//Ud::windowsReg();
addWidgets();
connections();
Ud::userData();
Expand Down Expand Up @@ -98,8 +97,8 @@ const QString Fernanda::ferName(bool dev)
if (dev)
isDev = dev;
(isDev)
? result = "fernanda (dev)"
: result = "fernanda";
? result = "Fernanda (dev)"
: result = "Fernanda";
return result;
}

Expand Down Expand Up @@ -518,12 +517,17 @@ void Fernanda::makeHelpMenu()
auto* about = new QAction(tr("&About..."), this);
auto* shortcuts = new QAction(tr("&Shortcuts..."), this);
auto* open_docs = new QAction(tr("&Open documents..."), this);
auto* open_install = new QAction(tr("&Open installation folder..."), this);
auto* open_ud = new QAction(tr("&Open user data..."), this);
auto* sample_project = new QAction(tr("&Create sample project"), this);
auto* sample_themes = new QAction(tr("&Create sample themes..."), this);
connect(about, &QAction::triggered, this, &Fernanda::helpAbout);
connect(shortcuts, &QAction::triggered, this, &Fernanda::helpShortcuts);
connect(open_docs, &QAction::triggered, this, [&]() { openUd(Ud::userData(Ud::Op::GetDocs)); });
connect(open_install, &QAction::triggered, this, [&]()
{
openUd(Path::toFs(QCoreApplication::applicationDirPath()).parent_path());
});
connect(open_ud, &QAction::triggered, this, [&]() { openUd(Ud::userData(Ud::Op::GetUserData)); });
connect(sample_project, &QAction::triggered, this, &Fernanda::helpMakeSampleProject);
connect(sample_themes, &QAction::triggered, this, &Fernanda::helpMakeSampleRes);
Expand All @@ -532,6 +536,7 @@ void Fernanda::makeHelpMenu()
help->addAction(shortcuts);
help->addSeparator();
help->addAction(open_docs);
help->addAction(open_install);
help->addAction(open_ud);
help->addSeparator();
help->addAction(sample_project);
Expand All @@ -548,6 +553,7 @@ void Fernanda::makeDevMenu()
auto* print_edited_story = new QAction(tr("&Print edited keys (Story)"), this);
auto* print_renames = new QAction(tr("&Print renames"), this);
auto* open_docs = new QAction(tr("&Open documents..."), this);
auto* open_install = new QAction(tr("&Open installation folder..."), this);
auto* open_temps = new QAction(tr("&Open temps..."), this);
auto* open_ud = new QAction(tr("&Open user data..."), this);
connect(print_cursors, &QAction::triggered, this, [&]()
Expand Down Expand Up @@ -585,6 +591,10 @@ void Fernanda::makeDevMenu()
devWrite("__Renames.txt", renames.join("\n\n"));
});
connect(open_docs, &QAction::triggered, this, [&]() { openUd(Ud::userData(Ud::Op::GetDocs)); });
connect(open_install, &QAction::triggered, this, [&]()
{
openUd(Path::toFs(QCoreApplication::applicationDirPath()).parent_path());
});
connect(open_temps, &QAction::triggered, this, [&]()
{
if (!activeStory.has_value()) return;
Expand All @@ -601,6 +611,7 @@ void Fernanda::makeDevMenu()
dev->addAction(print_renames);
dev->addSeparator();
dev->addAction(open_docs);
dev->addAction(open_install);
dev->addAction(open_temps);
dev->addAction(open_ud);
}
Expand Down Expand Up @@ -1064,4 +1075,4 @@ void Fernanda::triggerOverlay(TextEditor::Overlay state)
}
}

// fernanda.cpp, fernanda
// fernanda.cpp, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/fernanda.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// fernanda.h, fernanda
// fernanda.h, Fernanda

#pragma once

Expand Down Expand Up @@ -158,4 +158,4 @@ private slots:
void askEditorClose(bool isFinal = false);
};

// fernanda.h, fernanda
// fernanda.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/index.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// index.h, fernanda
// index.h, Fernanda

#pragma once

Expand Down Expand Up @@ -43,4 +43,4 @@ namespace Index
inline bool isFile(QModelIndex index) { return isThis(index, "file"); }
}

// index.h, fernanda
// index.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/indicator.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// indicator.h, fernanda
// indicator.h, Fernanda

#pragma once

Expand Down Expand Up @@ -114,4 +114,4 @@ public slots:
void toggled();
};

// indicator.h, fernanda
// indicator.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/io.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// io.h, fernanda
// io.h, Fernanda

#pragma once

Expand Down Expand Up @@ -67,4 +67,4 @@ namespace Io
}
}

// io.h, fernanda
// io.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/keyfilter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// keyfilter.h, fernanda
// keyfilter.h, Fernanda

#pragma once

Expand Down Expand Up @@ -145,4 +145,4 @@ class Keyfilter
}
};

// keyfilter.h, fernanda
// keyfilter.h, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// main.cpp, fernanda
// main.cpp, Fernanda

#include "fernanda.h"

Expand All @@ -21,4 +21,4 @@ int main(int argc, char *argv[])
return app.exec();
}

// main.cpp, fernanda
// main.cpp, Fernanda
4 changes: 2 additions & 2 deletions fernanda/src/pane.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// pane.cpp, fernanda
// pane.cpp, Fernanda

#include "pane.h"

Expand Down Expand Up @@ -249,4 +249,4 @@ const QString Pane::rename()
return nullptr;
}

// pane.cpp, fernanda
// pane.cpp, Fernanda
Loading

0 comments on commit 2254bd1

Please sign in to comment.