Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
rspiegel-nc committed Apr 15, 2023
2 parents 77403ad + 89b3a14 commit 94b1c62
Show file tree
Hide file tree
Showing 30 changed files with 393 additions and 131 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ More info in: [DOCKER README](docs/DOCKER-README.md)

### Linux - manual build
* Install development dependencies - look in content of [this docker file](development/docker/Dockerfile.ubuntu_xenial)
of [debian/control](https://github.com/robert7/nixnote2/blob/master/debian/control)
or [.travis.yml](https://github.com/robert7/nixnote2/blob/master/.travis.yml)
or [debian/control](https://github.com/robert7/nixnote2/blob/master/debian/control)
to see example, what is needed for Ubuntu. If you use another distribution/version,
you may need adjust packages.
* Qt: you can either get Qt packages for your distribution or as alternative you can download Qt 5 directly
Expand All @@ -125,7 +126,7 @@ the could command could be `./development/build-with-qmake.sh debug noclean /usr

If all got OK, you should have "qmake-build-debug/nixnote2" binary available now
(and also a deployment copy in appdir).
I suggest running from "appdir" (e.g. `./appdir/usr/appdir/nixnote2`).
I suggest running from "appdir" (e.g. `./appdir/usr/bin/nixnote2`).


```bash
Expand Down Expand Up @@ -248,7 +249,11 @@ And also copy the dll files libtidy.dll, libpoppler.dll, libpoppler-qt5.dll, lib

#### Build the application:

(This part can be going under any bash environment, not definitely MSYS or Cygwin.)

```bash
git clone nixnote2
cd nixnote2
qmake.exe -set HUNSPELL_VERSION 1.7-0(you can change the version as needed)
qmake.exe CONFIG+=debug[/release] nixnote2.pro
qmake.exe -unset HUNSPELL_VERSION
Expand All @@ -264,7 +269,7 @@ First, copy the nixnote2.exe to the deployment_folder, then execute the followin

```bash
windeployqt.exe --compiler-runtime --libdir [deployment_folder] [deployment_folder]
bash /development/deploy-on-windows.sh [deployment_folder]
bash development/deploy-on-windows.sh [deployment_folder]
```

If you need spell check, you have to download the dictionary files and copy the .aff and .dic file to the deployment folder. You may want to download them [here](https://github.com/wooorm/dictionaries).
Expand Down
14 changes: 13 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
NixNote (2.1.8) stable; urgency=low
* Made the font size in the setting dialog consistent with the one in the editor button bar.
* Made the Windows editon's results of find more recognizable.
* Limited the max length of the recently updated menu of the tray.
* Fixed memory leaks caused by Qt Webview.
* Fixed: To-do Formatting is not in parity with Official Client - issue #131
* Fixed: In-App Note links don't work when there is an apostrophe in the title - issue #168
* Fixed: Nixnote2 exits when network gets disconnected - issue #189
* Fixed: Import all notes, tag issue - issue #153
* Fixed: Local images cannot be pasted, web image's html element cannot be saved
-- Robert Spiegel <nightingale7@gmail.com> Sat, 10 Sep 2022 10:00:00 +0200

NixNote (2.1.7) stable; urgency=low
* Fixed: Search by date attributes not working with PPA builds - issue #149
* Fixed: Editor fonts and sorting notes - issue #156
* Fixed: Nixnote often crashes
* Fixed: Can't search / replace with as replacement. - issue #180
* Enabled the spell check code for Windows edition
* Fixed Windows build (thanks to https://github.com/boo-yee)
-- Robert Spiegel <nightingale7@gmail.com> Tue, 17 May 2022 10:00:00 +0200
-- Robert Spiegel <nightingale7@gmail.com> Tue, 12 Jul 2022 10:00:00 +0200

NixNote (2.1.6) stable; urgency=low
* Updated russian translation (thanks to Александр, ra3ggi@gmail.com)
Expand Down
14 changes: 13 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
NixNote (2.1.8) stable; urgency=low
* Made the font size in the setting dialog consistent with the one in the editor button bar.
* Made the Windows editon's results of find more recognizable.
* Limited the max length of the recently updated menu of the tray.
* Fixed memory leaks caused by Qt Webview.
* Fixed: To-do Formatting is not in parity with Official Client - issue #131
* Fixed: In-App Note links don't work when there is an apostrophe in the title - issue #168
* Fixed: Nixnote2 exits when network gets disconnected - issue #189
* Fixed: Import all notes, tag issue - issue #153
* Fixed: Local images cannot be pasted, web image's html element cannot be saved
-- Robert Spiegel <nightingale7@gmail.com> Sat, 10 Sep 2022 10:00:00 +0200

NixNote (2.1.7) stable; urgency=low
* Fixed: Search by date attributes not working with PPA builds - issue #149
* Fixed: Editor fonts and sorting notes - issue #156
* Fixed: Nixnote often crashes
* Fixed: Can't search / replace with as replacement. - issue #180
* Enabled the spell check code for Windows edition
* Fixed Windows build (thanks to https://github.com/boo-yee)
-- Robert Spiegel <nightingale7@gmail.com> Tue, 17 May 2022 10:00:00 +0200
-- Robert Spiegel <nightingale7@gmail.com> Tue, 12 Jul 2022 10:00:00 +0200

NixNote (2.1.6) stable; urgency=low
* Updated russian translation (thanks to Александр, ra3ggi@gmail.com)
Expand Down
4 changes: 2 additions & 2 deletions development/deploy-on-windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ declare -a runtime_libs qt_libs third_party_libs

runtime_libs=(libssp-*.dll libstdc++-*.dll libwinpthread-*.dll libgcc_s_dw*.dll)

qt_libs=(freetype*.dll Qt*Network.dll icudt*.dll Qt*OpenGL.dll icuin*.dll Qt*Positioning.dll icuuc*.dll Qt*PrintSupport.dll libxml*.dll Qt*Qml.dll liblcms*.dll libxslt*.dll Qt*Sensors.dll libpng*.dll openjpeg.dll Qt*Sql.dll Qt*Core.dll Qt*Widgets.dll Qt*Gui.dll Qt*Xml.dll libQt*WebKit.dll Qt*Multimedia.dll zlib1.dll libQt*WebKitWidgets.dll Qt*MultimediaWidgets.dll)
qt_libs=(freetype*.dll Qt*Network.dll icudt*.dll Qt*OpenGL.dll icuin*.dll Qt*Positioning.dll icuuc*.dll Qt*PrintSupport.dll libxml*.dll Qt*Qml.dll liblcms*.dll libxslt*.dll Qt*Sensors.dll libpng*.dll openjpeg.dll Qt*Sql.dll Qt*Core.dll Qt*Widgets.dll Qt*Gui.dll Qt*Xml.dll libQt*WebKit.dll Qt*Multimedia.dll zlib1.dll libQt*WebKitWidgets.dll Qt*MultimediaWidgets.dll libeay32.dll ssleay32.dll)

third_party_libs=(libtidy.dll libpoppler.dll libpoppler-qt5.dll libhunspell*.dll)

Expand All @@ -52,6 +52,6 @@ for lib in ${third_party_libs[@]};do
cp -n '../winlib/'$lib $deploy_folder
done

cp -r -n ../translations ../resources/images ../java ../themes.ini ../colors.txt ../shortcuts.txt $deploy_folder
cp -r -n ../translations ../resources/images ../java ../themes.ini ../colors.txt ../shortcuts.txt ../help $deploy_folder

echo "Deployment finished."
12 changes: 2 additions & 10 deletions docs/DOCKER-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,7 @@ Of course supposed you have [docker installed](https://www.google.com/search?q=d
```bash
cd $PROJECTDIR
# pass branch name as 1st parameter to script (default: master)
./development/build-with-docker-xenial.sh
# for script to run, you need to configure docker to run witout sudo (or adapt the script)
./development/build-with-docker.sh develop
```


## Ubuntu 14.04 (trusty)
WORK IN PROGRESS - !! **doesn't work yet** !!

```bash
cd $PROJECTDIR
# pass branch name as 1st parameter to script (default: master)
#./development/build-with-docker-trusty.sh
```
2 changes: 1 addition & 1 deletion help/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<p><b>__VERSION__</b></p>
<p>
(c) 2008-2018 <a href="https://github.com/baumgarr">Randy Baumgarte</a><br/>
(c) 2018-2020 <a href="https://github.com/robert7">Robert Spiegel</a>
(c) 2018-2022 <a href="https://github.com/robert7">Robert Spiegel</a>
& <a href="https://raw.githubusercontent.com/robert7/nixnote2/master/debian/copyright">contributors</a>.<br/>
License: <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GNU GPLv3</a>
</p>
Expand Down
10 changes: 10 additions & 0 deletions resources/images/checkbox.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
img.todo-icon {
vertical-align: baseline !important;
cursor: pointer;
padding-right: 5px;

user-drag: none;
-webkit-user-drag: none;
}


Binary file added resources/images/checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/checkbox_checked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/dialog/aboutdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ AboutDialog::AboutDialog(QDialog *parent) :
}

data.replace("__VERSION__", versionStr);
#ifndef _WIN32
data = data.replace("__LOGO__", "file://" + global.fileManager.getImageDirPath("") + "splash_logo.png");
#else
data = data.replace("__LOGO__", "file:///" + global.fileManager.getImageDirPath("") + "splash_logo.png");
#endif

page->setHtml(data);

Expand Down
4 changes: 3 additions & 1 deletion src/dialog/preferences/appearancepreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ void AppearancePreferences::saveValues() {
// QWebkit DPI is hard coded to 96. Hence, we calculate the correct
// font size based on desktop logical DPI.
if (global.defaultFontSize > 0) {
settings->setFontSize(QWebSettings::DefaultFontSize, global.defaultFontSize * (QApplication::desktop()->logicalDpiX() / 96.0));
settings->setFontSize(QWebSettings::DefaultFontSize,
(4.0/3.0) * global.defaultFontSize *
(QApplication::desktop()->logicalDpiX() / 96.0));
}
}

Expand Down
29 changes: 28 additions & 1 deletion src/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ void Global::setup(StartupConfig startupConfig, bool guiAvailable) {
// QWebkit DPI is hard coded to 96. Hence, we calculate the correct
// font size based on desktop logical DPI.
settings->setFontSize(QWebSettings::DefaultFontSize,
defaultFontSize * (QApplication::desktop()->logicalDpiX() / 96.0)
(4.0/3.0) * defaultFontSize *
(QApplication::desktop()->logicalDpiX() / 96.0)
);
}
if (defaultFont != "" && defaultFontSize <= 0 && this->guiAvailable) {
Expand Down Expand Up @@ -1535,3 +1536,29 @@ void Global::setSortOrder(const QString &sortOrder) {
Global::sortOrder = sortOrder;
saveSettingSortOrder(sortOrder);
}

QString Global::getCheckboxImageUrl(bool checked) const {
QString fileName = checked ? "checkbox_checked.png": "checkbox.png";
QString filePath = global.fileManager.getImageDirPath("").append(fileName);

QString prefix = QString("file://");
#ifdef WIN32
prefix.append("/");
#endif
return prefix + filePath;
}

QString Global::getCheckboxElement(bool checked, bool escapeTwice) const {
QString defaultUrl = getCheckboxImageUrl(false);
QString checkedUrl = getCheckboxImageUrl(true);
QString url = !checked ? defaultUrl : checkedUrl;
return QString("<img class=\"todo-icon\" src=\"") + url +
QString("\" type=\"image/png\" en-tag=\"icon\" ") +
QString("onclick=\"editorWindow.editAlert(); ") +
QString("this.src = this.src.indexOf(") +
(escapeTwice ? QString("\\\'") : QString("\'")) + defaultUrl +
(escapeTwice ? QString("\\\'") : QString("\'")) + QString(") == -1 ?") +
(escapeTwice ? QString("\\\'") : QString("\'")) + defaultUrl +
(escapeTwice ? QString("\\\':\\\'") : QString("\':\'")) + checkedUrl +
(escapeTwice ? QString("\\\';\">") : QString("\';\">"));
}
4 changes: 4 additions & 0 deletions src/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ class Global : public QObject {

QString sortOrder;

QString getCheckboxImageUrl(bool checked) const;

public:
const QString &getDateFormat() const;
const QString &getTimeFormat() const;
Expand Down Expand Up @@ -476,6 +478,8 @@ class Global : public QObject {
const QString getSortOrder() const;
void setSortOrder(const QString &sortOrder);

QString getCheckboxElement(bool checked, bool escapeTwice) const;

signals:
// global can send signal about updating status bar
void setMessageSignal(QString msg, int timeout);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/browserWidgets/editorbuttonbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ void EditorButtonBar::loadFontNames() {
void EditorButtonBar::loadFontSizeComboBox(QString name) {
QFontDatabase fdb;
fontSizes->clear();
QList<int> sizes = fdb.smoothSizes(name, "Normal");
QList<int> sizes = fdb.pointSizes(name);
for (int i = 0; i < sizes.size(); i++) {
fontSizes->addItem(QString::number(sizes[i]), sizes[i]);
}
Expand Down
Loading

0 comments on commit 94b1c62

Please sign in to comment.