Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #94

Merged
merged 3 commits into from
Nov 15, 2020
Merged
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
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ cmake_minimum_required(VERSION 3.5.0)
#endif()
set(QT_MIN_VERSION "5.15.0")


find_package(ECM REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/ ${CMAKE_SOURCE_DIR}/cmake/3rdparty/ ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})

Expand Down Expand Up @@ -44,7 +43,7 @@ include(CMakePackageConfigHelpers)
include(ECMOptionalAddSubdirectory)


include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})
include_directories(${Qt${QT_VERSION_MAJOR}Core_PRIVATE_INCLUDE_DIRS})

# forbid some old things
add_definitions(-DQT_NO_FOREACH)
Expand All @@ -59,7 +58,7 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)


set(BREEZEICONS_DIR ${CMAKE_SOURCE_DIR}/3rdparty/breeze-icons/)
#set(BREEZEICONS_DIR ${CMAKE_SOURCE_DIR}/3rdparty/breeze-icons/)

set(CMAKE_CXX_STANDARD 14)
#set(CMAKE_CXX_EXTENSIONS OFF)
Expand Down
47 changes: 32 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ Short term goal is to rejoin its ancestor Plume Creator feature-wise. A few outs
- **spellcheking**
- **color themes**
- **overview of all texts**
- **character/word count**
- advanced search/replace
- display quickly the end of the previous text and the beginning of the next text
- character/word count
- character/word goal
- exporting to .txt/.odt/.PDF
- printing
Expand Down Expand Up @@ -84,28 +84,47 @@ Needed sources and libs :

### Linux

#### Flatpak prerequisites
#### By hand, for development

Needed sources and libs :
- hunspell (devel)
- zlib (devel)
- quazip (devel), version 1.1 minimum needed. Install it by hand.

Minimum Qt : 5.15
If you have not Qt 5.15, use the Qt installer found at [Qt website](https://www.qt.io/download-open-source)
Install 5.15 Desktop or superior and Qt Creator
Open the project using the CMakeLists.txt file
Build and run it


#### Flatpak

##### Flatpak prerequisites

- make sure to have *flatpak* and *flatpak-builder* installed on your system

Prerequisites (>1Go):
```
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.kde.Sdk//5.15
flatpak install flathub org.kde.Platform//5.15
```

#### Flatpak from GitHub master branch :
Older flatpak-builder doesn't support YAML manifest files. Convert it to JSON using one of the online website easily found, then place the new file by eu.skribisto.skribisto.yml. Adapt the flatpak commands to point to this new file instead of the .yml file.

##### Flatpak from GitHub master branch :

- type in a terminal :



Compile :
```
mkdir Devel
mkdir ~/Devel
cd ~/Devel
git clone https://github.com/jacquetc/skribisto.git
flatpak-builder --user --repo=local-repo build-dir skribisto/eu.skribisto.skribisto.yml --force-clean
flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/eu.skribisto.skribisto.yml --force-clean
```

Run only once :
Expand All @@ -117,16 +136,16 @@ flatpak --user remote-add --no-gpg-verify local-repo local-repo
Install :

```
flatpak install eu.skribisto.skribisto -y --reinstall
flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```

Later, when a new version is online, you can update with this single line:
```
cd ~/Devel && flatpak-builder --user --repo=local-repo build-dir skribisto/eu.skribisto.skribisto.yml --force-clean && flatpak install eu.skribisto.skribisto -y --reinstall
cd ~/Devel && flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/eu.skribisto.skribisto.yml --force-clean && flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```


#### Flatpak from local source code:
##### Flatpak from local source code:

You can copy/paste in ~/Devel/ the file *eu.skribisto.skribisto* found in \[skribisto-repo\]/package/flatpak/local/

Expand All @@ -135,10 +154,10 @@ Near the end of the file, in **skribisto** build module, adapt **path:** to your


```
mkdir Devel
mkdir ~/Devel
cd ~/Devel
git clone https://github.com/jacquetc/skribisto.git
flatpak-builder --user --repo=local-repo build-dir eu.skribisto.skribisto.yml --force-clean
flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/local/eu.skribisto.skribisto.yml --force-clean
```

Run only once :
Expand All @@ -147,19 +166,17 @@ flatpak build-update-repo local-repo
flatpak --user remote-add --no-gpg-verify local-repo local-repo
```



Install :
```
flatpak install eu.skribisto.skribisto -y --reinstall
flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```


After you modified the code you want in whichever git branch you want, type this command :

```
flatpak-builder --user --repo=local-repo build-dir eu.skribisto.skribisto.yml --force-clean
flatpak install eu.skribisto.skribisto -y --reinstall
cd ~/Devel && flatpak-builder --user --repo=local-repo build-dir skribisto/package/flatpak/local/eu.skribisto.skribisto.yml --force-clean
flatpak install local-repo eu.skribisto.skribisto -y --reinstall
```

## To contact me :
Expand Down
7 changes: 4 additions & 3 deletions eu.skribisto.skribisto.appdata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
<p xml:lang="en-GB">Touch-friendly and dynamic, the user can create and organize text papers (called "sheets"). Exactly the same is possible with the notes. Sheets can link to a synopsis and multiple notes, or create them on the fly while writing.</p>
</description>
<releases>
<release version="1.8.4" date="2020-10-09"/>
<release version="1.8.1" date="2020-09-25"/>
<release version="1.8.24" date="2020-11-14"/>
</releases>
<screenshots>
<screenshot type="default">
<image type="source">https://raw.githubusercontent.com/jacquetc/skribisto/develop/resources/skribisto_screenshot.png</image>
<image type="source">https://raw.githubusercontent.com/jacquetc/skribisto/master/resources/skribisto_screenshot1.png</image>
<image type="source">https://raw.githubusercontent.com/jacquetc/skribisto/master/resources/skribisto_screenshot2.png</image>
<image type="source">https://raw.githubusercontent.com/jacquetc/skribisto/master/resources/skribisto_screenshot3.png</image>
</screenshot>
</screenshots>
<categories>
Expand Down
85 changes: 85 additions & 0 deletions package/flatpak/eu.skribisto.skribisto.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"app-id": "eu.skribisto.skribisto",
"runtime": "org.kde.Platform",
"runtime-version": "5.15",
"sdk": "org.kde.Sdk",
"command": "skribisto",
"finish-args": [
"--share=ipc",
"--socket=x11",
"--socket=wayland",
"--filesystem=host",
"--device=dri"
],
"separate-locales": false,
"modules": [
{
"name": "openjpeg2",
"buildsystem": "cmake-ninja",
"config-opts": [
"-DCMAKE_INSTALL_LIBDIR=lib"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/uclouvain/openjpeg/archive/v2.3.0.tar.gz",
"sha256": "3dc787c1bb6023ba846c2a0d9b1f6e179f1cd255172bde9eb75b01f1e6c7d71a"
}
]
},
{
"name": "sqlite3",
"cmake": false,
"config-opts": [
"--enable-threadsafe",
"--enable-threads-override-locks"
],
"build-options": {
"cflags": "-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_COLUMN_METADATA=1"
},
"sources": [
{
"type": "archive",
"url": "https://sqlite.org/2020/sqlite-autoconf-3330000.tar.gz",
"sha256": "106a2c48c7f75a298a7557bcc0d5f4f454e5b43811cc738b7ca294d6956bbb15"
}
]
},
{
"name": "quazip",
"buildsystem": "cmake-ninja",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=MinSizeRel"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/stachenov/quazip/archive/v1.1.tar.gz",
"sha256": "54edce9c11371762bd4f0003c2937b5d8806a2752dd9c0fd9085e90792612ad0"
},
{
"type": "shell",
"commands": [
"sed -i 's|${CMAKE_ROOT}/Modules|share/cmake|' CMakeLists.txt"
]
}
]
},
{
"name": "skribisto",
"buildsystem": "cmake",
"builddir": true,
"config-opts": [
"-DCMAKE_BUILD_TYPE=MinSizeRel"
],
"sources": [
{
"type": "git",
"url": "https://github.com/jacquetc/skribisto.git",
"branch": "master"
}
]
}
]
}
File renamed without changes.
Binary file removed resources/skribisto_screenshot.png
Binary file not shown.
Binary file added resources/skribisto_screenshot1.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/skribisto_screenshot2.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/skribisto_screenshot3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions src/app/src/qml/Commons/NotePad.qml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ NotePadForm {

onProjectIdChanged: {
populateNoteListModel()
openSynopsisTimer.start()
}
onSheetIdChanged: {
populateNoteListModel()
}

function openSynopsis(){
openSynopsisTimer.start()
}

Expand Down Expand Up @@ -732,9 +734,6 @@ NotePadForm {
if(!saveCurrentPaperCursorPositionAndYTimer.running){
saveCurrentPaperCursorPositionAndYTimer.start()
}
if(!contentSaveTimer.running){
contentSaveTimer.start()
}

}

Expand All @@ -749,8 +748,8 @@ NotePadForm {
//console.log("newCursorPosition", position)

// set positions :
writingZone.setCursorPosition(position)
writingZone.flickable.contentY = visibleAreaY
noteWritingZone.setCursorPosition(position)
noteWritingZone.flickable.contentY = visibleAreaY

}

Expand All @@ -762,7 +761,7 @@ NotePadForm {
}
//save cursor position of current document :

var previousCursorPosition = noteWritingZone.cursorPosition
var previousCursorPosition = noteWritingZone.textArea.cursorPosition
//console.log("previousCursorPosition", previousCursorPosition)
var previousY = noteWritingZone.flickable.contentY
//console.log("previousContentY", previousY)
Expand Down Expand Up @@ -840,11 +839,14 @@ NotePadForm {
}

openDocument(projectId, synopsisId)
root.focusedIndex = -2
var i;
for(i = 0; i < noteRepeater.count; i++) {
noteRepeater.itemAt(i).isOpened = false
}

noteWritingZone.forceActiveFocus();

}
}
openSynopsisToolButton.action: openSynopsisAction
Expand Down
7 changes: 3 additions & 4 deletions src/app/src/qml/Commons/NotePadForm.ui.qml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,11 @@ Item {

SkrLabel {
id: currentNoteTitleLabel
}

Item {
id: stretcher
elide: Text.ElideRight
verticalAlignment: Qt.AlignVCenter
Layout.fillHeight: true
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter | Qt.AlignLeft
}

SkrToolButton {
Expand Down
3 changes: 0 additions & 3 deletions src/app/src/qml/Note/NotePage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,6 @@ NotePageForm {
}

documentPrivate.contentSaveTimerAllowedToStart = true
if(!contentSaveTimer.running){
contentSaveTimer.start()
}

leftDock.setCurrentPaperId(projectId, paperId)
leftDock.setOpenedPaperId(projectId, paperId)
Expand Down
1 change: 0 additions & 1 deletion src/app/src/qml/RootPageForm.ui.qml
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@ Item {

SkrLabel {
id: statusRightLabel
text: qsTr("Label")
verticalAlignment: Text.AlignVCenter
Layout.fillHeight: true
}
Expand Down
16 changes: 15 additions & 1 deletion src/app/src/qml/Welcome/Exporter.qml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,23 @@ ExporterForm {
signal goBackButtonClicked()
goBackToolButton.onClicked: goBackButtonClicked()















onActiveFocusChanged: {
if (activeFocus) {

tabBar.forceActiveFocus()
}
}

Expand Down
Loading