Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
10b1e5b
Update runtime & deps
May 3, 2025
38d07d7
Fix resource registering with modern API
May 3, 2025
6d9d047
Add python async loop
May 3, 2025
2efe905
Migrate to Blueprint
May 3, 2025
12f96da
Compile and run under GTK4
May 3, 2025
15bf16d
Run as Adw.Window instead of Gtk.Window
May 3, 2025
0d3d6fa
Extract WelcomePage to file
May 4, 2025
2c2756c
Fix remove_css_class function call
May 4, 2025
1ad4a10
Add missed items reload on documents grid
May 4, 2025
951e1b1
Fix AboutDialog
May 4, 2025
bec8505
Tag new version
May 4, 2025
a9b4c9a
Fix window size saving
May 4, 2025
b1ca264
Add NavigationSplitView
May 4, 2025
28b01db
Add notes column widget
May 4, 2025
c98a716
Add notes tree widget
May 4, 2025
bbe2b05
Add note activation when select from sidebar
May 5, 2025
cd27029
Add Editor component
May 5, 2025
d0a1cc2
Fix HeaderBar padding when a TabBar placed inside
May 5, 2025
b68a804
Remove iAWriter font
May 5, 2025
cf86f38
Show welcome page if storage is empty
May 5, 2025
ded8474
Add AppState and selection of active document
May 5, 2025
ed9ab5a
Pass profile option and add dev mode
May 5, 2025
b2afc76
Remove missed font from build
May 5, 2025
95ea20a
Replace old html2docx with html-for-docx
May 5, 2025
f08eed7
Replace setup.py
May 5, 2025
b63d200
Add blueprints stubs for Preferences pages
May 5, 2025
60ef76f
Add theme mode preferences
May 5, 2025
9632191
Add color scheme preferences
May 5, 2025
bb0083a
Add Spellchecker
May 5, 2025
f8f09fb
Add logging with loguru
May 5, 2025
0789e11
Fix Storage tests
May 5, 2025
17eec90
Remove unused language selector from preferences
May 5, 2025
efadbd1
Register custom datetime converter for sqlite3
May 5, 2025
09e104d
Fix close document action
May 5, 2025
010d6eb
Remove editor.save() from app close request
May 5, 2025
cb9ab4f
Migrate DB to v3: from numeric to datetime
May 5, 2025
9c242ec
Fix Markdown auto-lists
May 5, 2025
1312ae9
Fix save document on close
May 5, 2025
bd5fdec
Fix children loading in notes tree
May 5, 2025
dfb7087
Update treenode margins
May 6, 2025
6a74379
Add new Otter icon
amka Jun 4, 2025
3dbdf91
Add new Otter icon
amka Jun 4, 2025
666b23f
Show welcome page if no tabs opened
amka Jun 4, 2025
4d6adf3
Remove CreateFolder button from sidebar
amka Jun 4, 2025
6215ca6
Set default text color in sourceview
amka Jun 4, 2025
8d1b57f
Update app icon
amka Jun 4, 2025
b115f20
Replace import dialog with Gtk.FileDialog
amka Jun 23, 2025
1e4915d
Fix document.save action
amka Jun 23, 2025
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
14 changes: 1 addition & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,7 @@ Text editor built for GNOME on top of [PyGObject](https://pygobject.readthedocs.
Build time requirements:

- meson (>= 0.49)
- python3 (>= 3.6)
- intltool
- libgranite-dev
- libgtk-3-dev (>= 3.10)
- libgspell-1-dev
- libgtksourceview-4.0-dev (>= 3.24.3)
- libwebkit2gtk-4.0
- python3-gi
- python3-gi-cairo
- gir1.2-gspell-1
- gir1.2-gtksource-3.0
- gir1.2-granite-1.0
- gir1.2-webkit2-4.0
- python3 (>= 3.12)


Run meson build to configure the build environment. Change to the build directory and run `ninja` to build:
Expand Down
2 changes: 1 addition & 1 deletion bin/meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
configure_file(
input: meson.project_name() + '.in',
input: meson.project_name() + '.py',
output: meson.project_name(),
configuration: conf,
install: true,
Expand Down
27 changes: 13 additions & 14 deletions bin/norka.in → bin/norka.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3

# norka.in
# norka.py
#
# Copyright 2020-2021 Andrey Maksimov
#
Expand Down Expand Up @@ -34,28 +34,27 @@
import gettext
import locale


VERSION = '@VERSION@'
pkgdatadir = '@PKGDATA_DIR@'
localedir = '@LOCALE_DIR@'
project_name = '@PROJECT_NAME@'
appid = '@appid@'
PKGDATADIR = '@PKGDATA_DIR@'
LOCALEDIR = '@LOCALE_DIR@'
PROJECT_NAME = '@PROJECT_NAME@'
PROFILE = '@PROFILE@'
APP_ID = '@APP_ID@'

sys.path.insert(1, '@PYTHON_DIR@')
signal.signal(signal.SIGINT, signal.SIG_DFL)

locale.textdomain(project_name)
locale.bindtextdomain(project_name, localedir)
gettext.textdomain(project_name)
gettext.bindtextdomain(project_name, localedir)
locale.textdomain(PROJECT_NAME)
locale.bindtextdomain(PROJECT_NAME, LOCALEDIR)
gettext.textdomain(PROJECT_NAME)
gettext.bindtextdomain(PROJECT_NAME, LOCALEDIR)


if __name__ == '__main__':
import gi

from gi.repository import Gio
resource = Gio.Resource.load(os.path.join(pkgdatadir, appid + '.gresource'))
Gio.Resource._register(resource)
resource = Gio.Resource.load(os.path.join(PKGDATADIR, APP_ID + '.gresource'))
Gio.resources_register(resource)

from norka import main
sys.exit(main.main(VERSION))
sys.exit(main.main(VERSION, PROFILE))
55 changes: 55 additions & 0 deletions data/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/* @define-color suggested_bg_color #3584e4; */

/* @binding-set editor-bindings { */
/* bind "<ctl>i" { "insert-italic" () }; */
/* bind "<ctl>b" { "insert-bold" () }; */
/* bind "<ctl><shift>c" { "insert-code" () }; */
/* bind "<ctl><alt>c" { "insert-code-block" () }; */
/* bind "<ctl>1" { "insert-h1" () }; */
/* bind "<ctl>2" { "insert-h2" () }; */
/* bind "<ctl>3" { "insert-h3" () }; */
/* bind "<ctl>l" { "insert-list" () }; */
/* bind "<ctl><shift>l" { "insert-ordered-list" () }; */
/* bind "<ctl>t" { "insert-quote" () }; */
/* bind "<ctl>k" { "insert-link" () }; */
/* bind "<ctl><shift>k" { "insert-image" () }; */
/* } */

/* Fix AdwHeaderBar padding when AdwTabBar placed inside */
#editor-tabs-view-header box {
padding-top: 0;
padding-bottom: 0;
}

#editor-container {
background-color: var(--window-bg-color);
padding-left: var(--window-radius);
padding-right: var(--window-radius);
padding-bottom: var(--window-radius);
}

#scrolled {
border-radius: calc(var(--window-radius) - (var(--window-radius) / 2));
background-color: var(--view-bg-color);
}

#sourceview text {
background-color: var(--view-bg-color);
}

#sourceview {
color: var(--view-fg-color);
background-color: var(--view-bg-color);
padding: calc(var(--window-radius) * 2);
border-radius: var(--window-radius);
font-family: 'IBM Plex Sans', monospace;
}

treeexpander {
transition: margin 200ms ease-out;
}

/* Style scheme previews in Preferences */
GtkSourceStyleSchemePreview {
border-radius: calc(var(--window-radius) * 0.5);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<li>Don't like the default theme - choose differently.</li>
</ul>
</description>
<update_contact>andrey_AT_tenderowl.com</update_contact>
<update_contact>andrey@tenderowl.com</update_contact>

<launchable type="desktop-id">com.github.tenderowl.norka.desktop</launchable>
<translation type="gettext">com.github.tenderowl.norka</translation>
Expand All @@ -47,6 +47,13 @@
</screenshots>

<releases>
<release date="2025-06-01" version="2.0.0">
<description translate="no">
<p>Norka 2.0 🎉️!
</p>
<p>Download the new version right now and try it yourself!</p>
</description>
</release>
<release date="2023-06-06" version="1.1.0">
<description translate="no">
<p>Hooray 🎉️! A new version of the Norka text editor has been released, in which you will find many
Expand Down
54 changes: 34 additions & 20 deletions data/com.github.tenderowl.norka.gresource.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/github/tenderowl/norka/">
<file compressed="true">css/application.css</file>
<file preprocess="xml-stripblanks">ui/app_menu.xml</file>
<file preprocess="xml-stripblanks">ui/shortcuts.ui</file>
<file preprocess="xml-stripblanks">ui/documents_grid_context_menu.ui</file>
<file preprocess="xml-stripblanks">ui/main_window.ui</file>
<file preprocess="xml-stripblanks">ui/preview_window.ui</file>
<file preprocess="xml-stripblanks">ui/headerbar.ui</file>
<file preprocess="xml-stripblanks">ui/stats.ui</file>
<file preprocess="xml-stripblanks">ui/format_shortcuts_window.ui</file>
<file preprocess="xml-stripblanks">ui/preferences_window.ui</file>
<file>icons/com.github.tenderowl.norka.svg</file>
<file>icons/folder.svg</file>
<file>icons/folder-open.svg</file>
<file>icons/text.svg</file>
<file>icons/text-html.svg</file>
<file>icons/text-markdown.svg</file>
<file>icons/application-msword.svg</file>
<file>icons/application-pdf.svg</file>
</gresource>
<gresource prefix="/com/github/tenderowl/norka/">
<file compressed="true">application.css</file>
<file preprocess="xml-stripblanks">ui/app_menu.xml</file>
<file preprocess="xml-stripblanks">ui/shortcuts.ui</file>
<file preprocess="xml-stripblanks">ui/documents_grid_context_menu.ui</file>
<file preprocess="xml-stripblanks">ui/main_window.ui</file>
<file preprocess="xml-stripblanks">ui/welcome_page.ui</file>
<file preprocess="xml-stripblanks">ui/content_page.ui</file>
<file preprocess="xml-stripblanks">ui/editor_tabs_view.ui</file>
<file preprocess="xml-stripblanks">ui/editor.ui</file>
<file preprocess="xml-stripblanks">ui/notes_sidebar.ui</file>
<file preprocess="xml-stripblanks">ui/notes_column.ui</file>
<file preprocess="xml-stripblanks">ui/notes_tree.ui</file>
<file preprocess="xml-stripblanks">ui/preview_window.ui</file>
<file preprocess="xml-stripblanks">ui/headerbar.ui</file>
<file preprocess="xml-stripblanks">ui/stats.ui</file>
<file preprocess="xml-stripblanks">ui/format_shortcuts_window.ui</file>
<file preprocess="xml-stripblanks">ui/preferences_window.ui</file>
<file preprocess="xml-stripblanks">ui/preferences_general_page.ui</file>
<file preprocess="xml-stripblanks">ui/preferences_interface_page.ui</file>
<file preprocess="xml-stripblanks">ui/preferences_export_page.ui</file>
<file>icons/com.github.tenderowl.norka.svg</file>
<file>icons/folder.svg</file>
<file>icons/folder-open.svg</file>
<file>icons/text.svg</file>
<file>icons/text-html.svg</file>
<file>icons/text-markdown.svg</file>
<file>icons/application-msword.svg</file>
<file>icons/application-pdf.svg</file>
<file>icons/otter.png</file>
</gresource>
<gresource prefix="/com/github/tenderowl/norka/appdata/">
<file preprocess="xml-stripblanks">com.github.tenderowl.norka.appdata.xml</file>
</gresource>
</gresources>
5 changes: 5 additions & 0 deletions data/com.github.tenderowl.norka.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<summary>Prefer dark theme</summary>
<description>Whether the application prefers to use a dark theme</description>
</key>
<key name="theme-mode" type="s">
<default>"system"</default>
<summary>Theme Mode</summary>
<description>Whether the application prefers to use a dark, light or system theme</description>
</key>
<key name="stylescheme" type="s">
<default>"norka"</default>
<summary>Editor style scheme</summary>
Expand Down
70 changes: 0 additions & 70 deletions data/css/application.css

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions data/icons/meson.build
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
dir_48 = join_paths('hicolor', '48x48', 'apps')
install_data(
'@0@.svg'.format(appid),
install_dir: datadir / 'icons' / 'hicolor' / 'scalable' / 'apps'
join_paths(dir_48, ('@0@.png').format(appid)),
install_dir: join_paths(get_option('datadir'), 'icons', dir_48)
)

dir_256 = join_paths('hicolor', '256x256', 'apps')
install_data(
join_paths(dir_256, ('@0@.png').format(appid)),
install_dir: join_paths(get_option('datadir'), 'icons', dir_256)
)
Binary file added data/icons/otter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 30 additions & 5 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,33 @@
message('Compiling resources')

blueprints = custom_target('blueprints',
input: files(
'ui/documents_grid_context_menu.blp',
'ui/shortcuts.blp',
'ui/format_shortcuts_window.blp',
'ui/headerbar.blp',
'ui/main_window.blp',
'ui/welcome_page.blp',
'ui/content_page.blp',
'ui/editor_tabs_view.blp',
'ui/editor.blp',
'ui/notes_sidebar.blp',
'ui/notes_column.blp',
'ui/notes_tree.blp',
'ui/preferences_window.blp',
'ui/preferences_general_page.blp',
'ui/preferences_interface_page.blp',
'ui/preferences_export_page.blp',
'ui/preview_window.blp',
'ui/stats.blp',
),
output: '.',
command: [find_program('blueprint-compiler'), 'batch-compile', '@OUTPUT@', '@CURRENT_SOURCE_DIR@', '@INPUT@'],
)

gnome.compile_resources(appid,
appid + '.gresource.xml',
dependencies: blueprints,
gresource_bundle: true,
install: true,
install_dir: pkgdatadir,
Expand Down Expand Up @@ -32,7 +58,7 @@ if desktop_utils.found()
endif

appstream_file = i18n.merge_file(
input: appid + '.appdata.xml.in',
input: appid + '.appdata.xml',
output: appid + '.appdata.xml',
po_dir: '../po',
install: true,
Expand Down Expand Up @@ -66,7 +92,7 @@ color_schemes = ['norka-dark', 'norka-sepia', 'norka']
foreach i : color_schemes
install_data(
join_paths('schemes', i + '.xml'),
install_dir: join_paths(get_option('datadir'), 'gtksourceview-4', 'styles')
install_dir: join_paths(get_option('datadir'), 'gtksourceview-5', 'styles')
)
endforeach

Expand All @@ -76,8 +102,7 @@ install_subdir(
join_paths('fonts', 'IBMPlexMono'),
install_dir :join_paths('share','fonts')
)

install_subdir(
join_paths('fonts', 'iA Writer Duospace'),
install_dir : join_paths('share','fonts')
join_paths('fonts', 'IBMPlexSans'),
install_dir :join_paths('share','fonts')
)
20 changes: 20 additions & 0 deletions data/ui/content_page.blp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Gtk 4.0;
using Adw 1;

template $ContentPage: Adw.NavigationPage {
Adw.ViewStack screens {
Adw.ViewStackPage {
name: "welcome-page";
title: _("Norka");

child: $WelcomePage welcome_page {};
}

Adw.ViewStackPage {
name: "content-page";
title: _("Content");

child: $EditorTabsView editor_tabs_view {};
}
}
}
Loading