Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Makefile.Release
.settings

cmake-build-debug/
build/
.idea/

#QMake file
Expand Down
34 changes: 34 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# trivial cmake project file to enable debugging in clion
# currently it only does a shortcut to make/Makefile, so its quite suboptimal as Clion doesn't yet
# recognise Qt classes :(
# I try improve later

cmake_minimum_required(VERSION 2.8.4)
project(nixnote2)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

find_package(Qt4 REQUIRED QtGui QtXml QtWebkit QtSql QtNetwork QtXml QtScript)
include_directories(cmdtools)
include_directories(communication)
include_directories(dialog)
include_directories(email)
include_directories(exits)
include_directories(filters)
include_directories(gui)
include_directories(html)
include_directories(logger)
include_directories(models)
include_directories(oauth)
include_directories(plugins)
include_directories(qevercloud)
include_directories(reminders)
include_directories(settings)
include_directories(sql)
include_directories(threads)
include_directories(utilities)
include_directories(watcher)
include_directories(xml)


add_custom_target(nixnote2 COMMAND make debug -C ${PROJECT_SOURCE_DIR})
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,25 @@ An unofficial client of Evernote for Linux.

#### Install from distribution repository

For users of Debian Stretch (Debian 9), Debian unstable and Ubuntu 17.04+, you may install
For users of Debian Stretch (Debian 9) or later, Debian unstable and Ubuntu 17.04+, you may install
from the official repositories. This will become the stable release we will encourage users to install.

```bash
sudo apt update
sudo apt install nixnote2
```

For users of Debian Stretch (Debian 9), you may also install the
**latest upstream stable release** from `stretch-backports` repository:

```bash
# !! NOTE: You need to enable stretch-backports repository first
# See https://backports.debian.org for instructions
# After you enabled backports repository, type the following commands:
sudo apt update
sudo apt install nixnote2 -t stretch-backports
```

You may find the package information on [Debian PTS](https://tracker.debian.org/pkg/nixnote2).

#### Install via daily PPA
Expand Down
25 changes: 25 additions & 0 deletions deploy-step.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

# simple script which can be used as deployment step in qt creator
# $1 is expected to be target directory


echo Deploying `pwd` to $1

# copy folders ...
cp -r \
help \
images \
java \
qss \
translations \
$1

# ... and files required for execution
cp \
changelog.txt \
license.html \
shortcuts.txt \
$1

echo Finished deployment..
2 changes: 1 addition & 1 deletion dialog/preferences/appearancepreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ AppearancePreferences::AppearancePreferences(QWidget *parent) :
alternateNoteListColors = new QCheckBox(tr("Alternate note list colors*"), this);
autosetUserid = new QCheckBox(tr("Set author on new notes."),this);
autosetUserid->setChecked(global.autosetUsername());
fontPreviewInDialog = new QCheckBox(tr("Preview fonts in editor dialag*"));
fontPreviewInDialog = new QCheckBox(tr("Preview fonts in editor dialog*"));
fontPreviewInDialog->setChecked(global.previewFontsInDialog());

traySingleClickAction = new QComboBox();
Expand Down
2 changes: 1 addition & 1 deletion dialog/preferences/debugpreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ DebugPreferences::DebugPreferences(QWidget *parent) :
mainLayout->addWidget(interceptSigHup,row++,1);
#endif

multiThreadSave = new QCheckBox(tr("Use multipe theads to save note contents (experimental)."));
multiThreadSave = new QCheckBox(tr("Use multiple threads to save note contents (experimental)."));
multiThreadSave->setChecked(global.getMultiThreadSave());
mainLayout->addWidget(multiThreadSave,row++,1);

Expand Down
6 changes: 5 additions & 1 deletion dialog/preferences/localepreferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ LocalePreferences::LocalePreferences(QWidget *parent) :
dateFormat->addItem(tr("dd/MM/yyyy - ")+ date.toString("dd/MM/yyyy"), ddMMyyyy);
dateFormat->addItem(tr("d/M/yyyy - ")+ date.toString("d/M/yyyy"), dMyyyy);
dateFormat->addItem(tr("yyyy-MM-dd - ")+ date.toString("yyyy-MM-dd"), yyyyMMdd);
dateFormat->addItem(tr("yy-MM-dd - ")+ date.toString("yy-MM-dd"), yyyyMMdd);
dateFormat->addItem(tr("yy-MM-dd - ")+ date.toString("yy-MM-dd"), yyMMdd);
dateFormat->addItem(tr("yyMMdd - ")+ date.toString("yyMMdd"), yyMMdd2);


timeFormatLabel = new QLabel(tr("Time Format"), this);
Expand Down Expand Up @@ -160,6 +161,9 @@ void LocalePreferences::saveValues() {
case yyMMdd:
datefmt = "yy-MM-dd";
break;
case yyMMdd2:
datefmt = "yyMMdd";
break;
}

timefmt = "HH:mm:ss";
Expand Down
5 changes: 4 additions & 1 deletion dialog/preferences/localepreferences.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class LocalePreferences : public QWidget
int getDateFormat();
int getTimeFormat();
QString getTranslation();

// see also duplicate in Global - global.cpp
enum DateFormat {
MMddyy = 1,
MMddyyyy = 2,
Expand All @@ -51,7 +53,8 @@ class LocalePreferences : public QWidget
ddMMyyyy = 7,
dMyyyy = 8,
yyyyMMdd = 9,
yyMMdd = 10
yyMMdd = 10,
yyMMdd2 = 11
};
enum TimeFormat {
HHmmss = 1,
Expand Down
7 changes: 6 additions & 1 deletion global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,7 @@ void Global::setupDateTimeFormat() {
QString datefmt;
QString timefmt;

// note: see also duplicate in LocalePreferences - dialog/preferences/localepreferences.cpp
enum DateFormat {
MMddyy = 1,
MMddyyyy = 2,
Expand All @@ -681,7 +682,8 @@ void Global::setupDateTimeFormat() {
ddMMyyyy = 7,
dMyyyy = 8,
yyyyMMdd = 9,
yyMMdd = 10
yyMMdd = 10,
yyMMdd2 = 11
};
enum TimeFormat {
HHmmss = 1,
Expand Down Expand Up @@ -733,6 +735,9 @@ void Global::setupDateTimeFormat() {
case yyMMdd:
datefmt = "yy-MM-dd";
break;
case yyMMdd2:
datefmt = "yyMMdd";
break;
}

timefmt = "HH:mm:ss";
Expand Down
11 changes: 11 additions & 0 deletions gui/datedelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,14 @@ QString DateDelegate::displayText(const QVariant &value, const QLocale &locale)
return timestamp.toString(global.dateFormat + QString(" ") +global.timeFormat);
// return timestamp.toString(Qt::SystemLocaleShortDate);
}


void DateDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const
{
QStyleOptionViewItem noption = QStyleOptionViewItem(option);
noption.textElideMode = Qt::ElideNone;

QStyledItemDelegate::paint(painter, noption, index);
}

3 changes: 3 additions & 0 deletions gui/datedelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class DateDelegate : public QStyledItemDelegate
public:
DateDelegate(QObject * parent = 0);
QString displayText(const QVariant &value, const QLocale &locale) const;

void paint(QPainter *painter, const QStyleOptionViewItem &option,
const QModelIndex &index) const;
};

#endif // DATEDELEGATE_H
2 changes: 1 addition & 1 deletion gui/ntableview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ NTableView::NTableView(QWidget *parent) :
setModel(proxy);

// Set the date deligates
QLOG_TRACE() << "Setting up table deligates";
QLOG_TRACE() << "Setting up table delegates";
dateDelegate = new DateDelegate();
blankNumber = new NumberDelegate(NumberDelegate::BlankNumber);
kbNumber = new NumberDelegate(NumberDelegate::KBNumber);
Expand Down
2 changes: 1 addition & 1 deletion nixnote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ NixNote::NixNote(QWidget *parent) : QMainWindow(parent)
translation = global.settings->value("translation", QLocale::system().name()).toString();
global.settings->endGroup();
translation = global.fileManager.getTranslateFilePath("nixnote2_" + translation + ".qm");
QLOG_DEBUG() << "Looking for transaltions: " << translation;
QLOG_DEBUG() << "Looking for translations: " << translation;
bool translationResult = nixnoteTranslator->load(translation);
QLOG_DEBUG() << "Translation loaded:" << translationResult;
QApplication::instance()->installTranslator(nixnoteTranslator);
Expand Down
7 changes: 6 additions & 1 deletion sql/tagtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,8 +391,13 @@ bool TagTable::get(Tag &tag, qint32 lid) {
case (TAG_NAME):
tag.name = query.value(1).toString();
break;
case (TAG_ISDIRTY):
// currently just ignore the dirty flag
// fixes https://github.com/baumgarr/nixnote2/issues/363
break;

default: {
QLOG_ERROR() << "Unknown Tag record key: " << key;
QLOG_ERROR() << "Unknown Tag record key: " << key << " lid: " << lid;
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -876,7 +876,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_cs_CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ posílejte prosím na &lt;i&gt;Milos.Kozina@email.cz&lt;/i&gt;.&lt;/p&gt;&lt;/sp
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -898,7 +898,7 @@ posílejte prosím na &lt;i&gt;Milos.Kozina@email.cz&lt;/i&gt;.&lt;/p&gt;&lt;/sp
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -876,7 +876,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation>Vorschau der Schriftarten im Editor*</translation>
</message>
<message>
Expand Down Expand Up @@ -888,7 +888,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -876,7 +876,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -876,7 +876,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -881,7 +881,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
4 changes: 2 additions & 2 deletions translations/nixnote2_pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
</message>
<message>
<location filename="../dialog/preferences/appearancepreferences.cpp" line="57"/>
<source>Preview fonts in editor dialag*</source>
<source>Preview fonts in editor dialog*</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down Expand Up @@ -876,7 +876,7 @@
</message>
<message>
<location filename="../dialog/preferences/debugpreferences.cpp" line="64"/>
<source>Use multipe theads to save note contents (experimental).</source>
<source>Use multiple threads to save note contents (experimental).</source>
<translation type="unfinished"></translation>
</message>
<message>
Expand Down
Loading