[evolution] Calendar: Add option to use a markdown editor for Description in component editor
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Calendar: Add option to use a markdown editor for Description in component editor
- Date: Tue, 1 Feb 2022 18:06:52 +0000 (UTC)
commit 475defe5abce7923cdc1fb3cb02600bdbad3d373
Author: Milan Crha <mcrha redhat com>
Date: Tue Feb 1 19:04:13 2022 +0100
Calendar: Add option to use a markdown editor for Description in component editor
The option can be found in Edit->Preferences->Calendar and Tasks->General
tab->Miscellaneous section->Use markdown for Description in the component editor.
...hicolor_actions_scalable_markdown-bold-dark.svg | 9 +-
.../hicolor_actions_scalable_markdown-bold.svg | 8 +-
...olor_actions_scalable_markdown-bullets-dark.svg | 18 +-
.../hicolor_actions_scalable_markdown-bullets.svg | 18 +-
...hicolor_actions_scalable_markdown-code-dark.svg | 12 +-
.../hicolor_actions_scalable_markdown-code.svg | 8 +-
...color_actions_scalable_markdown-header-dark.svg | 13 +-
.../hicolor_actions_scalable_markdown-header.svg | 12 +-
...hicolor_actions_scalable_markdown-help-dark.svg | 49 ++---
.../hicolor_actions_scalable_markdown-help.svg | 8 +-
...color_actions_scalable_markdown-italic-dark.svg | 8 +-
.../hicolor_actions_scalable_markdown-italic.svg | 8 +-
...hicolor_actions_scalable_markdown-link-dark.svg | 15 +-
.../hicolor_actions_scalable_markdown-link.svg | 8 +-
...olor_actions_scalable_markdown-numbers-dark.svg | 58 +++--
.../hicolor_actions_scalable_markdown-numbers.svg | 58 +++--
...icolor_actions_scalable_markdown-quote-dark.svg | 34 +--
.../hicolor_actions_scalable_markdown-quote.svg | 34 +--
data/org.gnome.evolution.calendar.gschema.xml.in | 4 +
src/calendar/gui/e-comp-editor-property-part.c | 3 +-
src/calendar/gui/e-comp-editor-property-parts.c | 103 ++++++++-
src/e-util/e-markdown-editor.c | 241 ++++++++++++++++++---
src/e-util/e-markdown-editor.h | 2 +
src/modules/calendar/e-calendar-preferences.c | 6 +
src/modules/calendar/e-calendar-preferences.ui | 18 +-
25 files changed, 514 insertions(+), 241 deletions(-)
---
diff --git a/data/icons/hicolor_actions_scalable_markdown-bold-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-bold-dark.svg
index e56fb34935..b058bf1429 100644
--- a/data/icons/hicolor_actions_scalable_markdown-bold-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-bold-dark.svg
@@ -5,15 +5,14 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs33410" /><g
id="g33418"
- transform="matrix(1.3333333,0,0,1.3333333,-0.4184891,-0.76629467)"
- style="fill:#e6e6e6;stroke:#e6e6e6"><path
+ transform="matrix(1.2494324,0,0,1.3359991,-1.137815,-2.7917981)"><path
d="m 3.7098313,15.21086 h 5.5434688 c 3.0378319,0 4.8709559,-1.203315 4.8709559,-3.185358 0,-1.364885
-0.924079,-2.4066304 -2.615885,-2.8913388 1.456277,-0.3522586 2.207967,-1.1591661 2.207967,-2.3925413
0,-1.8345634 -1.690803,-2.8030402 -4.8539172,-2.8030402 H 3.771971 L 3.709831,4.5989496 C 4.258064,4.7605188
4.5868035,4.9361785 4.8062972,5.1268679 V 14.007545 C 4.4775581,14.315654 4.2269945,14.433074
3.7719711,14.520434 Z M 7.452249,8.7377548 V 5.0395077 c 0.3608114,-0.059179 0.7045847,-0.07327
1.174642,-0.07327 1.456276,0 2.286141,0.645338 2.286141,1.804504 0,1.3066452 -0.829865,1.9670129
-2.4585287,1.9670129 z m 1.2377841,5.4304202 c -0.3918814,0 -0.7677269,-0.02912 -1.2377841,-0.05824 V
9.794534 h 0.9711844 c 1.8631896,0 2.8193406,0.763697 2.8193406,2.260092 0,1.453185 -0.798796,2.113552
-2.5527409,2.113552 z"
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:#e6e6e6;stroke-width:0.727722;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path33420" /></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-bold.svg
b/data/icons/hicolor_actions_scalable_markdown-bold.svg
index 39a46d8331..5b0c8e8041 100644
--- a/data/icons/hicolor_actions_scalable_markdown-bold.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-bold.svg
@@ -5,14 +5,14 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs33410" /><g
id="g33418"
- transform="matrix(1.3333333,0,0,1.3333333,-0.4184891,-0.76629467)"><path
+ transform="matrix(1.2494324,0,0,1.3359991,-1.137815,-2.7917981)"><path
d="m 3.7098313,15.21086 h 5.5434688 c 3.0378319,0 4.8709559,-1.203315 4.8709559,-3.185358 0,-1.364885
-0.924079,-2.4066304 -2.615885,-2.8913388 1.456277,-0.3522586 2.207967,-1.1591661 2.207967,-2.3925413
0,-1.8345634 -1.690803,-2.8030402 -4.8539172,-2.8030402 H 3.771971 L 3.709831,4.5989496 C 4.258064,4.7605188
4.5868035,4.9361785 4.8062972,5.1268679 V 14.007545 C 4.4775581,14.315654 4.2269945,14.433074
3.7719711,14.520434 Z M 7.452249,8.7377548 V 5.0395077 c 0.3608114,-0.059179 0.7045847,-0.07327
1.174642,-0.07327 1.456276,0 2.286141,0.645338 2.286141,1.804504 0,1.3066452 -0.829865,1.9670129
-2.4585287,1.9670129 z m 1.2377841,5.4304202 c -0.3918814,0 -0.7677269,-0.02912 -1.2377841,-0.05824 V
9.794534 h 0.9711844 c 1.8631896,0 2.8193406,0.763697 2.8193406,2.260092 0,1.453185 -0.798796,2.113552
-2.5527409,2.113552 z"
style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:#1a1a1a;stroke-width:0.727722;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path33420" /></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-bullets-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-bullets-dark.svg
index fa2bf472e6..b92d278cea 100644
--- a/data/icons/hicolor_actions_scalable_markdown-bullets-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-bullets-dark.svg
@@ -5,27 +5,27 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs33410" /><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7,6 H 21"
+ d="M 5,4 H 19"
id="path33702" /><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3,6 H 5"
+ d="M 1,4 H 3"
id="path33702-9" /><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3,12 H 5"
+ d="M 1,10 H 3"
id="path33702-9-1" /><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3,18 H 5"
+ d="M 1,16 H 3"
id="path33702-9-7" /><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7,12 H 20.99999"
+ d="M 5,10 H 18.99999"
id="path33704" /><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7,18 H 21"
+ d="M 5,16 H 19"
id="path33706" /></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-bullets.svg
b/data/icons/hicolor_actions_scalable_markdown-bullets.svg
index fe13db36e8..067414fbea 100644
--- a/data/icons/hicolor_actions_scalable_markdown-bullets.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-bullets.svg
@@ -5,27 +5,27 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs33410" /><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7,6 H 21"
+ d="M 5,4 H 19"
id="path33702" /><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3,6 H 5"
+ d="M 1,4 H 3"
id="path33702-9" /><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3,12 H 5"
+ d="M 1,10 H 3"
id="path33702-9-1" /><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 3,18 H 5"
+ d="M 1,16 H 3"
id="path33702-9-7" /><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7,12 H 20.99999"
+ d="M 5,10 H 18.99999"
id="path33704" /><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7,18 H 21"
+ d="M 5,16 H 19"
id="path33706" /></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-code-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-code-dark.svg
index 23b6dcf3ff..7702653f8d 100644
--- a/data/icons/hicolor_actions_scalable_markdown-code-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-code-dark.svg
@@ -5,18 +5,16 @@
version="1.1"
id="svg51326"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs51330" /><g
id="g51332"
- transform="scale(1.3333333)"
- style="fill:#e6e6e6"><g
+ transform="matrix(1.2534819,0,0,1.3658537,-1.3891366,-2.2080001)"><g
id="g51334"
- transform="translate(-0.12899983,0.66800028)"
- style="fill:#e6e6e6"><path
+ transform="translate(-0.12899983,0.66800028)"><path
d="M 6.879,5.004 2.035,7.879 v 0.812 l 4.844,2.985 V 10.582 L 3.035,8.285 6.879,6.004 Z"
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path51336" /><path
diff --git a/data/icons/hicolor_actions_scalable_markdown-code.svg
b/data/icons/hicolor_actions_scalable_markdown-code.svg
index ad3aa41fd4..b4c8d44046 100644
--- a/data/icons/hicolor_actions_scalable_markdown-code.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-code.svg
@@ -5,14 +5,14 @@
version="1.1"
id="svg51326"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs51330" /><g
id="g51332"
- transform="scale(1.3333333)"><g
+ transform="matrix(1.2534819,0,0,1.3658537,-1.3891366,-2.2080001)"><g
id="g51334"
transform="translate(-0.12899983,0.66800028)"><path
d="M 6.879,5.004 2.035,7.879 v 0.812 l 4.844,2.985 V 10.582 L 3.035,8.285 6.879,6.004 Z"
diff --git a/data/icons/hicolor_actions_scalable_markdown-header-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-header-dark.svg
index d5dcf32db1..8aa48c9920 100644
--- a/data/icons/hicolor_actions_scalable_markdown-header-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-header-dark.svg
@@ -5,19 +5,18 @@
version="1.1"
id="svg4631"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs4635" /><g
id="g4637"
- transform="scale(1.3333333)"
- style="stroke:none"><g
+ transform="matrix(1.198466,0,0,1.2800585,-0.87488033,-1.5352473)"><g
id="g4639"
- style="stroke:none"><g
+ style="fill:#e6e6e6;stroke:none"><g
id="g4641"
- style="stroke:none"><path
+ style="fill:#e6e6e6;stroke:none"><path
d="m 4.902,3.543 h 1.485 v 4.484 h 5.375 V 3.543 h 1.484 V 14.48 H 11.762 V 9.277 H 6.387 V 14.48
H 4.902 Z"
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4643" /></g></g></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-header.svg
b/data/icons/hicolor_actions_scalable_markdown-header.svg
index e509013d69..35879ea8f4 100644
--- a/data/icons/hicolor_actions_scalable_markdown-header.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-header.svg
@@ -5,18 +5,18 @@
version="1.1"
id="svg4631"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs4635" /><g
id="g4637"
- transform="scale(1.3333333)"><g
+ transform="matrix(1.198466,0,0,1.2800585,-0.87488033,-1.5352473)"><g
id="g4639"
- style="stroke:none;fill:#1a1a1a"><g
+ style="fill:#1a1a1a;stroke:none"><g
id="g4641"
- style="stroke:none;fill:#1a1a1a"><path
+ style="fill:#1a1a1a;stroke:none"><path
d="m 4.902,3.543 h 1.485 v 4.484 h 5.375 V 3.543 h 1.484 V 14.48 H 11.762 V 9.277 H 6.387 V 14.48
H 4.902 Z"
style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path4643" /></g></g></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-help-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-help-dark.svg
index fcd2864596..c0e13a842c 100644
--- a/data/icons/hicolor_actions_scalable_markdown-help-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-help-dark.svg
@@ -5,30 +5,29 @@
version="1.1"
id="svg11209"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
- id="defs11213" /><path
- d="m 7.5679998,11.765333 h 3.1453332 v -0.478667 c 0,-1 2.313333,-1.5839996 2.313333,-4.1253328
0,-2.0826667 -1.542666,-3.2493333 -4.2719996,-3.2493333 -1.3333333,0 -2.6866666,0.2906667 -3.8333332,0.812 l
0.7093333,2.3546666 c 0.7493333,-0.3333333 1.5413333,-0.48 2.3333333,-0.48 1.1866666,0 1.8333333,0.3546667
1.8333333,1 0,1.2079999 -2.2293333,1.9999999 -2.2293333,3.6879995 z m 1.5413333,5 c 1.1039999,0
1.8959999,-0.792 1.8959999,-1.916 0,-1.166667 -0.770667,-1.98 -1.8959999,-1.98 -1.1453333,0
-1.9159999,0.813333 -1.9159999,1.98 0,1.124 0.7906666,1.916 1.9159999,1.916 z"
- style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path11219" /><g
- id="g11221"
- transform="matrix(1.3333333,1.23672,-1.23672,1.3333333,0,0)"
- style="stroke:#e6e6e6"><path
- d="M 12.671,-3.092 12.67,0.205"
-
style="fill:none;stroke:#e6e6e6;stroke-width:0.549878;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path11223" /></g><g
- id="g11225"
- transform="matrix(1.3333333,1.23672,-1.23672,1.3333333,0,0)"
- style="stroke:#e6e6e6"><path
- d="m 11.571,-1.444 1.1,-2.2 1.099,2.2"
-
style="fill:none;stroke:#e6e6e6;stroke-width:0.549878;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path11227" /></g><g
- id="g11229"
- transform="scale(1.3333333)"
- style="stroke:#e6e6e6"><path
- d="m 12.75,10.5 h -3 v 3 h 4.5 v -2.25"
-
style="fill:none;stroke:#e6e6e6;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path11231" /></g></svg>
+ id="defs11213" /><g
+ id="g11215"
+ transform="matrix(1.3903546,0,0,1.4647658,-4.131799,-2.2976229)"><g
+ id="g11217"><path
+ d="M 5.676,8.824 H 8.035 V 8.465 c 0,-0.75 1.735,-1.188 1.735,-3.094 0,-1.562 -1.157,-2.437
-3.204,-2.437 -1,0 -2.015,0.218 -2.875,0.609 l 0.532,1.766 c 0.562,-0.25 1.156,-0.36 1.75,-0.36 0.89,0
1.375,0.266 1.375,0.75 0,0.906 -1.672,1.5 -1.672,2.766 z m 1.156,3.75 c 0.828,0 1.422,-0.594 1.422,-1.437
0,-0.875 -0.578,-1.485 -1.422,-1.485 -0.859,0 -1.437,0.61 -1.437,1.485 0,0.843 0.593,1.437 1.437,1.437 z"
+ style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none"
+ id="path11219" /><g
+ id="g11221"
+ transform="matrix(1,0.92754,-0.92754,1,0,0)"><path
+ d="M 12.671,-3.092 12.67,0.205"
+
style="fill:none;stroke:#e6e6e6;stroke-width:0.549878;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path11223" /></g><g
+ id="g11225"
+ transform="matrix(1,0.92754,-0.92754,1,0,0)"><path
+ d="m 11.571,-1.444 1.1,-2.2 1.099,2.2"
+
style="fill:none;stroke:#e6e6e6;stroke-width:0.549878;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path11227" /></g><g
+ id="g11229"><path
+ d="m 12.75,10.5 h -3 v 3 h 4.5 v -2.25"
+
style="fill:none;stroke:#e6e6e6;stroke-width:0.75;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path11231" /></g></g></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-help.svg
b/data/icons/hicolor_actions_scalable_markdown-help.svg
index 6be86d3402..2b80ab7e7e 100644
--- a/data/icons/hicolor_actions_scalable_markdown-help.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-help.svg
@@ -5,14 +5,14 @@
version="1.1"
id="svg11209"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs11213" /><g
id="g11215"
- transform="scale(1.3333333)"><g
+ transform="matrix(1.3903546,0,0,1.4647658,-4.131799,-2.2976229)"><g
id="g11217"><path
d="M 5.676,8.824 H 8.035 V 8.465 c 0,-0.75 1.735,-1.188 1.735,-3.094 0,-1.562 -1.157,-2.437
-3.204,-2.437 -1,0 -2.015,0.218 -2.875,0.609 l 0.532,1.766 c 0.562,-0.25 1.156,-0.36 1.75,-0.36 0.89,0
1.375,0.266 1.375,0.75 0,0.906 -1.672,1.5 -1.672,2.766 z m 1.156,3.75 c 0.828,0 1.422,-0.594 1.422,-1.437
0,-0.875 -0.578,-1.485 -1.422,-1.485 -0.859,0 -1.437,0.61 -1.437,1.485 0,0.843 0.593,1.437 1.437,1.437 z"
style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none"
diff --git a/data/icons/hicolor_actions_scalable_markdown-italic-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-italic-dark.svg
index 87e0445fae..a5f4d4b9cf 100644
--- a/data/icons/hicolor_actions_scalable_markdown-italic-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-italic-dark.svg
@@ -5,12 +5,12 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs33410" /><path
- d="m 8.0000001,20 h 5.9658889 l 0.09764,-0.894667 C 13.340012,19.021333 12.655299,18.876
12.049447,18.48 L 13.98592,5.5 C 14.611801,5.1253333 15.178848,4.98 15.902365,4.876 L 16.000005,4 h -5.828201
l -0.117665,0.876 c 0.743546,0.104 1.388202,0.2706667 1.936473,0.624 l -1.936473,12.98 c -0.6258802,0.416
-1.2129558,0.541333 -1.9364732,0.625333 z"
+ d="m 6,18 h 5.965889 l 0.09764,-0.894667 C 11.340012,17.021333 10.655299,16.876 10.049447,16.48 L
11.98592,3.5 C 12.611801,3.1253333 13.178848,2.98 13.902365,2.876 L 14.000005,2 H 8.1718039 l -0.117665,0.876
c 0.743546,0.104 1.388202,0.2706667 1.936473,0.624 l -1.936473,12.98 c -0.6258802,0.416 -1.2129558,0.541333
-1.9364732,0.625333 z"
style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2919"
id="path33416" /></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-italic.svg
b/data/icons/hicolor_actions_scalable_markdown-italic.svg
index 3b64797ad3..c9474a9cc1 100644
--- a/data/icons/hicolor_actions_scalable_markdown-italic.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-italic.svg
@@ -5,12 +5,12 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs33410" /><path
- d="m 8.0000001,20 h 5.9658889 l 0.09764,-0.894667 C 13.340012,19.021333 12.655299,18.876
12.049447,18.48 L 13.98592,5.5 C 14.611801,5.1253333 15.178848,4.98 15.902365,4.876 L 16.000005,4 h -5.828201
l -0.117665,0.876 c 0.743546,0.104 1.388202,0.2706667 1.936473,0.624 l -1.936473,12.98 c -0.6258802,0.416
-1.2129558,0.541333 -1.9364732,0.625333 z"
+ d="m 6,18 h 5.965889 l 0.09764,-0.894667 C 11.340012,17.021333 10.655299,16.876 10.049447,16.48 L
11.98592,3.5 C 12.611801,3.1253333 13.178848,2.98 13.902365,2.876 L 14.000005,2 H 8.1718039 l -0.117665,0.876
c 0.743546,0.104 1.388202,0.2706667 1.936473,0.624 l -1.936473,12.98 c -0.6258802,0.416 -1.2129558,0.541333
-1.9364732,0.625333 z"
style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.2919"
id="path33416" /></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-link-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-link-dark.svg
index 5cafddcdf8..6c73830fd8 100644
--- a/data/icons/hicolor_actions_scalable_markdown-link-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-link-dark.svg
@@ -5,23 +5,20 @@
version="1.1"
id="svg51326"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs51330" /><g
id="g51332"
- transform="matrix(1.2391158,0.4923106,-0.4923106,1.2391158,5.1915138,-3.3935698)"
- style="stroke:#e6e6e6"><g
+ transform="matrix(1.204387,0.5328918,-0.47851255,1.3412562,3.876939,-6.445074)"><g
id="g54244"
- transform="rotate(38.936484,7.400522,4.6312859)"
- style="stroke:#e6e6e6"><path
+ transform="rotate(38.936484,7.400522,4.6312859)"><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 8.226042,6.6881392 c -0.250375,-1 -0.250375,-2.5 -3.7e-4,-3.5003801 0.2500051,-1.00038
0.749995,-1.50037 1.2503751,-1.75037 0.50038,-0.25 1.0003699,-0.25 1.5003749,3.8e-4 0.500005,0.25038
0.999995,0.75037 1.24962,1.7503851 0.249625,1.000015 0.249625,2.499985 -3.8e-4,3.4996149 -0.250005,0.99963
-0.749995,1.4996199 -1.237528,1.7496199 -0.487533,0.25 -1.0117169,0.25 -1.5117219,3.7e-4 C 8.976407,8.1881291
8.476417,7.6881391 8.226042,6.6881392 Z"
id="path53269" /><g
- id="g53872"
- style="stroke:#e6e6e6"><path
+ id="g53872"><path
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 9.5279035,9.4814178 c 0.031913,0.432314 0.063768,0.8638272 0.1454647,1.2909192
0.081697,0.427092 0.2183089,0.866695 0.4123258,1.219544 0.194017,0.35285 0.455937,0.636559 0.735758,0.83268
0.279821,0.19612 0.581495,0.309578 0.900979,0.327199 0.319483,0.01762 0.645557,-0.05746 0.932875,-0.233203
0.287317,-0.175739 0.530677,-0.450964 0.727124,-0.786131 0.196448,-0.335166 0.346086,-0.730613
0.436312,-1.189182 0.09023,-0.458568 0.120921,-0.980524 0.125016,-1.4233537 0.0041,-0.4428297
-0.0185,-0.806597 -0.05852,-1.1349214 -0.04003,-0.3283244 -0.09759,-0.6212587 -0.21279,-0.914902 C
13.55725,7.1764236 13.384075,6.8820681 13.210376,6.586821"
id="path53746" /><path
diff --git a/data/icons/hicolor_actions_scalable_markdown-link.svg
b/data/icons/hicolor_actions_scalable_markdown-link.svg
index e7bfbbbb9f..d16250dc0b 100644
--- a/data/icons/hicolor_actions_scalable_markdown-link.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-link.svg
@@ -5,14 +5,14 @@
version="1.1"
id="svg51326"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs51330" /><g
id="g51332"
- transform="matrix(1.2391158,0.4923106,-0.4923106,1.2391158,5.1915138,-3.3935698)"><g
+ transform="matrix(1.204387,0.5328918,-0.47851255,1.3412562,3.876939,-6.445074)"><g
id="g54244"
transform="rotate(38.936484,7.400522,4.6312859)"><path
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:0.75px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
diff --git a/data/icons/hicolor_actions_scalable_markdown-numbers-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-numbers-dark.svg
index f79f5f551d..e15dca4890 100644
--- a/data/icons/hicolor_actions_scalable_markdown-numbers-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-numbers-dark.svg
@@ -5,36 +5,34 @@
version="1.1"
id="svg824"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs828" /><g
- id="g834"
- transform="matrix(1.3333333,0,0,1.3333333,-0.56799981,-0.08799955)"
- style="stroke:#e6e6e6;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
- d="m 5.676,4.566 h 10.5"
-
style="fill:none;stroke:#e6e6e6;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path836" /></g><g
- id="g838"
- transform="matrix(1.3333333,0,0,1.3333333,-0.56799981,-0.08799955)"
- style="stroke:#e6e6e6;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
- d="m 5.676,9.066 h 10.5"
-
style="fill:none;stroke:#e6e6e6;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path840" /></g><g
- id="g842"
- transform="matrix(1.3333333,0,0,1.3333333,-0.56799981,-0.08799955)"
- style="stroke:#e6e6e6;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
- d="m 5.676,13.566 h 10.5"
-
style="fill:none;stroke:#e6e6e6;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path844" /></g><path
- d="M 4.4932328,7.9143159 H 5.1385661 V 4.4356494 H 4.7438995 l -1.3133333,0.6866666 0.2506666,0.4386667
0.812,-0.3546667 z"
- style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path846" /><path
- d="m 3.5726414,13.833474 h 2.3333333 v -0.562666 h -1.396 c 0.896,-0.792 1.2706666,-1.354666
1.2706666,-1.937333 0,-0.625333 -0.4586666,-1.021333 -1.1666666,-1.021333 -0.4373333,0 -0.8333333,0.146666
-1.1453333,0.396 l 0.1866666,0.48 c 0.272,-0.209334 0.5626667,-0.313334 0.8333334,-0.313334 0.3959999,0
0.6253333,0.229334 0.6253333,0.562667 0,0.478667 -0.4786667,1 -1.5413333,1.958666 z"
- style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path848" /><path
- d="m 4.7419027,20.015858 c 0.8533333,0 1.4159999,-0.396 1.4159999,-1 0,-0.437333 -0.2919999,-0.770666
-0.7706666,-0.854666 0.3546667,-0.104 0.5826667,-0.396 0.5826667,-0.790667 0,-0.562667 -0.4573334,-0.917333
-1.1453334,-0.917333 -0.3959999,0 -0.8119999,0.104 -1.1453333,0.292 l 0.1453334,0.478666 c 0.312,-0.125333
0.604,-0.208 0.8546666,-0.208 0.396,0 0.6453333,0.166667 0.6453333,0.437334 0,0.312 -0.312,0.521333
-0.7506666,0.521333 H 4.3245694 v 0.5 h 0.292 c 0.5413333,0 0.8746666,0.208 0.8746666,0.541333 0,0.292
-0.2706667,0.458667 -0.7293333,0.458667 -0.292,0 -0.6666667,-0.084 -0.9786667,-0.209333 l -0.1466666,0.5 c
0.3546666,0.166666 0.7293333,0.250666 1.1053333,0.250666 z"
- style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path850" /></svg>
+ id="g5385"><g
+ id="g834"
+ transform="matrix(1.1428571,0,0,1.3692585,0.51314285,-2.6450904)"
+
style="fill:#e6e6e6;fill-opacity:1;stroke:#e6e6e6;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
+ d="m 5.676,4.566 h 10.5"
+
style="fill:#e6e6e6;fill-opacity:1;stroke:#e6e6e6;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path836" /></g><g
+ id="g838"
+ transform="matrix(1.2609312,0,0,1.3692585,-0.15704562,-2.2610196)"
+ style="stroke:#e6e6e6;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
+ d="m 5.676,9.066 h 9.516776"
+
style="fill:none;stroke:#e6e6e6;stroke-width:1.42804;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path840" /></g><g
+ id="g842"
+ transform="matrix(1.1428571,0,0,1.3692585,0.51314285,-2.2604169)"
+ style="stroke:#e6e6e6;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
+ d="m 5.676,13.566 h 10.5"
+
style="fill:none;stroke:#e6e6e6;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path844" /></g><path
+ d="M 3.540192,8.5547776 H 4.8624884 V 1.4099871 H 4.0538112 L 1.362774,2.8203232 1.8763932,3.7212954
3.540192,2.9928498 Z"
+ style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.73526"
+ id="path846" /><path
+ d="M 1.2790067,17.682061 H 6.0600376 V 16.526407 H 3.1996149 c 1.8359161,-1.626678
2.6036128,-2.782332 2.6036128,-3.979064 0,-1.284364 -0.939814,-2.097704 -2.3905154,-2.097704 -0.8961016,0
-1.7075108,0.301236 -2.3468029,0.81334 l 0.3824823,0.985866 c 0.5573316,-0.429948 1.1529115,-0.643553
1.7075111,-0.643553 0.8114092,0 1.2813162,0.471027 1.2813162,1.155655 0,0.983128 -0.9807944,2.053888
-3.1582123,4.02288 z"
+ style="fill:#e6e6e6;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.73526"
+ id="path848" /></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-numbers.svg
b/data/icons/hicolor_actions_scalable_markdown-numbers.svg
index 7ca25fb951..c1fb4f65ca 100644
--- a/data/icons/hicolor_actions_scalable_markdown-numbers.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-numbers.svg
@@ -5,36 +5,34 @@
version="1.1"
id="svg824"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs828" /><g
- id="g834"
- transform="matrix(1.3333333,0,0,1.3333333,-0.56799981,-0.08799955)"
- style="stroke:#1a1a1a;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
- d="m 5.676,4.566 h 10.5"
-
style="fill:none;stroke:#1a1a1a;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path836" /></g><g
- id="g838"
- transform="matrix(1.3333333,0,0,1.3333333,-0.56799981,-0.08799955)"
- style="stroke:#1a1a1a;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
- d="m 5.676,9.066 h 10.5"
-
style="fill:none;stroke:#1a1a1a;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path840" /></g><g
- id="g842"
- transform="matrix(1.3333333,0,0,1.3333333,-0.56799981,-0.08799955)"
- style="stroke:#1a1a1a;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
- d="m 5.676,13.566 h 10.5"
-
style="fill:none;stroke:#1a1a1a;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- id="path844" /></g><path
- d="M 4.4932328,7.9143159 H 5.1385661 V 4.4356494 H 4.7438995 l -1.3133333,0.6866666 0.2506666,0.4386667
0.812,-0.3546667 z"
- style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path846" /><path
- d="m 3.5726414,13.833474 h 2.3333333 v -0.562666 h -1.396 c 0.896,-0.792 1.2706666,-1.354666
1.2706666,-1.937333 0,-0.625333 -0.4586666,-1.021333 -1.1666666,-1.021333 -0.4373333,0 -0.8333333,0.146666
-1.1453333,0.396 l 0.1866666,0.48 c 0.272,-0.209334 0.5626667,-0.313334 0.8333334,-0.313334 0.3959999,0
0.6253333,0.229334 0.6253333,0.562667 0,0.478667 -0.4786667,1 -1.5413333,1.958666 z"
- style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path848" /><path
- d="m 4.7419027,20.015858 c 0.8533333,0 1.4159999,-0.396 1.4159999,-1 0,-0.437333 -0.2919999,-0.770666
-0.7706666,-0.854666 0.3546667,-0.104 0.5826667,-0.396 0.5826667,-0.790667 0,-0.562667 -0.4573334,-0.917333
-1.1453334,-0.917333 -0.3959999,0 -0.8119999,0.104 -1.1453333,0.292 l 0.1453334,0.478666 c 0.312,-0.125333
0.604,-0.208 0.8546666,-0.208 0.396,0 0.6453333,0.166667 0.6453333,0.437334 0,0.312 -0.312,0.521333
-0.7506666,0.521333 H 4.3245694 v 0.5 h 0.292 c 0.5413333,0 0.8746666,0.208 0.8746666,0.541333 0,0.292
-0.2706667,0.458667 -0.7293333,0.458667 -0.292,0 -0.6666667,-0.084 -0.9786667,-0.209333 l -0.1466666,0.5 c
0.3546666,0.166666 0.7293333,0.250666 1.1053333,0.250666 z"
- style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.33333"
- id="path850" /></svg>
+ id="g5385"><g
+ id="g834"
+ transform="matrix(1.1428571,0,0,1.3692585,0.51314285,-2.6450904)"
+
style="fill:#1a1a1a;fill-opacity:1;stroke:#1a1a1a;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
+ d="m 5.676,4.566 h 10.5"
+
style="fill:#1a1a1a;fill-opacity:1;stroke:#1a1a1a;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path836" /></g><g
+ id="g838"
+ transform="matrix(1.2609312,0,0,1.3692585,-0.15704562,-2.2610196)"
+ style="stroke:#1a1a1a;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
+ d="m 5.676,9.066 h 9.516776"
+
style="fill:none;stroke:#1a1a1a;stroke-width:1.42804;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path840" /></g><g
+ id="g842"
+ transform="matrix(1.1428571,0,0,1.3692585,0.51314285,-2.2604169)"
+ style="stroke:#1a1a1a;stroke-width:1.5;stroke-miterlimit:4;stroke-dasharray:none"><path
+ d="m 5.676,13.566 h 10.5"
+
style="fill:none;stroke:#1a1a1a;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path844" /></g><path
+ d="M 3.540192,8.5547776 H 4.8624884 V 1.4099871 H 4.0538112 L 1.362774,2.8203232 1.8763932,3.7212954
3.540192,2.9928498 Z"
+ style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.73526"
+ id="path846" /><path
+ d="M 1.2790067,17.682061 H 6.0600376 V 16.526407 H 3.1996149 c 1.8359161,-1.626678
2.6036128,-2.782332 2.6036128,-3.979064 0,-1.284364 -0.939814,-2.097704 -2.3905154,-2.097704 -0.8961016,0
-1.7075108,0.301236 -2.3468029,0.81334 l 0.3824823,0.985866 c 0.5573316,-0.429948 1.1529115,-0.643553
1.7075111,-0.643553 0.8114092,0 1.2813162,0.471027 1.2813162,1.155655 0,0.983128 -0.9807944,2.053888
-3.1582123,4.02288 z"
+ style="fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.73526"
+ id="path848" /></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-quote-dark.svg
b/data/icons/hicolor_actions_scalable_markdown-quote-dark.svg
index 2b57fc1e60..0f174db4fa 100644
--- a/data/icons/hicolor_actions_scalable_markdown-quote-dark.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-quote-dark.svg
@@ -5,21 +5,23 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
- id="defs33410" /><path
-
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 4,3.0000001 V 20.999999"
- id="path33601" /><path
-
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7.0000095,6.0000002 15,6"
- id="path33702-3" /><path
-
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7.0000095,12 H 20.999999"
- id="path33704-6" /><path
-
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7.0000095,18 H 15"
- id="path33706-7" /></svg>
+ id="defs33410" /><g
+ id="g2109"
+ transform="translate(-2,-2.0000001)"><path
+
style="fill:#e6e6e6;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 4,3.0000001 V 20.999999"
+ id="path33601" /><path
+
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 7.0000095,6.0000002 15,6"
+ id="path33702-3" /><path
+
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 7.0000095,12 H 20.999999"
+ id="path33704-6" /><path
+
style="fill:none;fill-rule:evenodd;stroke:#e6e6e6;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 7.0000095,18 H 15"
+ id="path33706-7" /></g></svg>
diff --git a/data/icons/hicolor_actions_scalable_markdown-quote.svg
b/data/icons/hicolor_actions_scalable_markdown-quote.svg
index 3b301881d3..161e13ff64 100644
--- a/data/icons/hicolor_actions_scalable_markdown-quote.svg
+++ b/data/icons/hicolor_actions_scalable_markdown-quote.svg
@@ -5,21 +5,23 @@
version="1.1"
id="svg33406"
xml:space="preserve"
- width="24"
- height="24"
- viewBox="0 0 24 24"
+ width="20"
+ height="20"
+ viewBox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
- id="defs33410" /><path
-
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 4,3.0000001 V 20.999999"
- id="path33601" /><path
-
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7.0000095,6.0000002 15,6"
- id="path33702-3" /><path
-
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7.0000095,12 H 20.999999"
- id="path33704-6" /><path
-
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
- d="M 7.0000095,18 H 15"
- id="path33706-7" /></svg>
+ id="defs33410" /><g
+ id="g2109"
+ transform="translate(-2,-2.0000001)"><path
+
style="fill:#1a1a1a;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 4,3.0000001 V 20.999999"
+ id="path33601" /><path
+
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 7.0000095,6.0000002 15,6"
+ id="path33702-3" /><path
+
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 7.0000095,12 H 20.999999"
+ id="path33704-6" /><path
+
style="fill:none;fill-rule:evenodd;stroke:#1a1a1a;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 7.0000095,18 H 15"
+ id="path33706-7" /></g></svg>
diff --git a/data/org.gnome.evolution.calendar.gschema.xml.in
b/data/org.gnome.evolution.calendar.gschema.xml.in
index a8a2787ac3..0703e95aac 100644
--- a/data/org.gnome.evolution.calendar.gschema.xml.in
+++ b/data/org.gnome.evolution.calendar.gschema.xml.in
@@ -471,6 +471,10 @@
<default>[]</default>
<_summary>User-defined reminder times, in minutes</_summary>
</key>
+ <key name="use-markdown-editor" type="b">
+ <default>false</default>
+ <_summary>Whether to use markdown editor for the description in the component editor.</_summary>
+ </key>
<!-- The following keys are deprecated. -->
diff --git a/src/calendar/gui/e-comp-editor-property-part.c b/src/calendar/gui/e-comp-editor-property-part.c
index 14bb9b408d..6bed833b12 100644
--- a/src/calendar/gui/e-comp-editor-property-part.c
+++ b/src/calendar/gui/e-comp-editor-property-part.c
@@ -378,8 +378,7 @@ ecepp_string_create_widgets (ECompEditorPropertyPart *property_part,
klass = E_COMP_EDITOR_PROPERTY_PART_STRING_GET_CLASS (property_part);
g_return_if_fail (klass != NULL);
- g_return_if_fail (g_type_is_a (klass->entry_type, GTK_TYPE_ENTRY) ||
- g_type_is_a (klass->entry_type, GTK_TYPE_TEXT_VIEW));
+ g_return_if_fail (klass->entry_type > 0);
/* The descendant sets the 'out_label_widget' parameter */
*out_edit_widget = g_object_new (klass->entry_type, NULL);
diff --git a/src/calendar/gui/e-comp-editor-property-parts.c b/src/calendar/gui/e-comp-editor-property-parts.c
index 99e993dbb9..b14c2c7fd6 100644
--- a/src/calendar/gui/e-comp-editor-property-parts.c
+++ b/src/calendar/gui/e-comp-editor-property-parts.c
@@ -608,9 +608,19 @@ G_DEFINE_TYPE (ECompEditorPropertyPartDescription, e_comp_editor_property_part_d
static GtkWidget *
ecepp_description_get_real_edit_widget (ECompEditorPropertyPartString *part_string)
{
+ ECompEditorPropertyPartDescription *description_part;
+
g_return_val_if_fail (E_IS_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (part_string), NULL);
- return E_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (part_string)->real_edit_widget;
+ description_part = E_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (part_string);
+
+ if (!description_part->real_edit_widget)
+ return NULL;
+
+ if (E_IS_MARKDOWN_EDITOR (description_part->real_edit_widget))
+ return GTK_WIDGET (e_markdown_editor_get_text_view (E_MARKDOWN_EDITOR
(description_part->real_edit_widget)));
+
+ return description_part->real_edit_widget;
}
static void
@@ -681,6 +691,25 @@ ecepp_description_flip_view_as_cb (GtkLabel *label,
return TRUE;
}
+static void
+ecepp_description_changed_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ ECompEditorPropertyPartDescription *description_part = user_data;
+
+ g_return_if_fail (E_IS_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (description_part));
+
+ if (description_part->has_html) {
+ description_part->has_html = FALSE;
+ description_part->mode_html = TRUE;
+ g_clear_pointer (&description_part->alt_desc, g_free);
+
+ ecepp_description_update_view_mode (description_part);
+ }
+
+ e_comp_editor_property_part_emit_changed (E_COMP_EDITOR_PROPERTY_PART (description_part));
+}
+
static void
ecepp_description_create_widgets (ECompEditorPropertyPart *property_part,
GtkWidget **out_label_widget,
@@ -688,7 +717,7 @@ ecepp_description_create_widgets (ECompEditorPropertyPart *property_part,
{
ECompEditorPropertyPartClass *part_class;
ECompEditorPropertyPartDescription *description_part;
- GtkTextView *text_view;
+ GSettings *settings;
GtkWidget *box, *label;
g_return_if_fail (E_IS_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (property_part));
@@ -703,9 +732,38 @@ ecepp_description_create_widgets (ECompEditorPropertyPart *property_part,
*out_label_widget = NULL;
- part_class->create_widgets (property_part, out_label_widget, out_edit_widget);
- g_return_if_fail (*out_label_widget == NULL);
- g_return_if_fail (*out_edit_widget != NULL);
+ settings = e_util_ref_settings ("org.gnome.evolution.calendar");
+
+ if (g_settings_get_boolean (settings, "use-markdown-editor")) {
+ *out_edit_widget = e_markdown_editor_new ();
+
+ g_object_set (G_OBJECT (*out_edit_widget),
+ "hexpand", FALSE,
+ "halign", GTK_ALIGN_FILL,
+ "vexpand", FALSE,
+ "valign", GTK_ALIGN_START,
+ "visible", TRUE,
+ NULL);
+
+ g_signal_connect_object (*out_edit_widget, "changed", G_CALLBACK
(ecepp_description_changed_cb), description_part, 0);
+ } else {
+ GtkTextView *text_view;
+
+ part_class->create_widgets (property_part, out_label_widget, out_edit_widget);
+ g_return_if_fail (*out_label_widget == NULL);
+ g_return_if_fail (*out_edit_widget != NULL);
+
+ text_view = GTK_TEXT_VIEW (gtk_bin_get_child (GTK_BIN (*out_edit_widget)));
+ gtk_text_view_set_wrap_mode (text_view, GTK_WRAP_WORD);
+ gtk_text_view_set_monospace (text_view, TRUE);
+ e_buffer_tagger_connect (text_view);
+ e_spell_text_view_attach (text_view);
+
+ g_signal_connect_object (gtk_text_view_get_buffer (text_view), "changed",
+ G_CALLBACK (ecepp_description_changed_cb), description_part, 0);
+ }
+
+ g_clear_object (&settings);
description_part->real_edit_widget = *out_edit_widget;
@@ -714,12 +772,6 @@ ecepp_description_create_widgets (ECompEditorPropertyPart *property_part,
description_part->description_label = label;
- text_view = GTK_TEXT_VIEW (gtk_bin_get_child (GTK_BIN (*out_edit_widget)));
- gtk_text_view_set_wrap_mode (text_view, GTK_WRAP_WORD);
- gtk_text_view_set_monospace (text_view, TRUE);
- e_buffer_tagger_connect (text_view);
- e_spell_text_view_attach (text_view);
-
g_object_set (G_OBJECT (label),
"hexpand", FALSE,
"halign", GTK_ALIGN_END,
@@ -850,7 +902,8 @@ ecepp_description_fill_widget (ECompEditorPropertyPart *property_part,
edit_widget = e_comp_editor_property_part_string_get_real_edit_widget
(E_COMP_EDITOR_PROPERTY_PART_STRING (property_part));
g_return_if_fail (GTK_IS_TEXT_VIEW (edit_widget));
- e_buffer_tagger_update_tags (GTK_TEXT_VIEW (edit_widget));
+ if (!E_IS_MARKDOWN_EDITOR (description_part->real_edit_widget))
+ e_buffer_tagger_update_tags (GTK_TEXT_VIEW (edit_widget));
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (edit_widget));
gtk_text_buffer_get_start_iter (buffer, &text_iter_start);
@@ -910,6 +963,11 @@ ecepp_description_fill_component (ECompEditorPropertyPart *property_part,
ICalComponent *component)
{
ECompEditorPropertyPartClass *part_class;
+ ECompEditorPropertyPartDescription *description_part;
+
+ g_return_if_fail (E_IS_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (property_part));
+
+ description_part = E_COMP_EDITOR_PROPERTY_PART_DESCRIPTION (property_part);
part_class = E_COMP_EDITOR_PROPERTY_PART_CLASS (e_comp_editor_property_part_description_parent_class);
g_return_if_fail (part_class != NULL);
@@ -920,6 +978,27 @@ ecepp_description_fill_component (ECompEditorPropertyPart *property_part,
while (e_cal_util_component_remove_x_property (component, "X-ALT-DESC")) {
/* Remove all of them, not only text/html, they are obsolete now */
}
+
+ if (E_IS_MARKDOWN_EDITOR (description_part->real_edit_widget)) {
+ gchar *html;
+
+ html = e_markdown_editor_dup_html (E_MARKDOWN_EDITOR (description_part->real_edit_widget));
+
+ if (html && *html) {
+ ICalProperty *prop;
+ ICalParameter *param;
+
+ prop = i_cal_property_new_x (html);
+ i_cal_property_set_x_name (prop, "X-ALT-DESC");
+
+ param = i_cal_parameter_new_fmttype ("text/html");
+ i_cal_property_take_parameter (prop, param);
+
+ i_cal_component_take_property (component, prop);
+ }
+
+ g_free (html);
+ }
}
static void
diff --git a/src/e-util/e-markdown-editor.c b/src/e-util/e-markdown-editor.c
index dfefde101a..08d4db5bee 100644
--- a/src/e-util/e-markdown-editor.c
+++ b/src/e-util/e-markdown-editor.c
@@ -25,10 +25,18 @@ struct _EMarkdownEditorPrivate {
GtkTextView *text_view;
EWebView *web_view;
GtkToolbar *action_toolbar;
+ gboolean is_dark_theme;
};
G_DEFINE_TYPE_WITH_PRIVATE (EMarkdownEditor, e_markdown_editor, GTK_TYPE_BOX)
+enum {
+ CHANGED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
static void
e_markdown_editor_get_selection (EMarkdownEditor *self,
GtkTextIter *out_start,
@@ -126,7 +134,7 @@ e_markdown_editor_add_italic_text_cb (GtkToolButton *button,
g_return_if_fail (E_IS_MARKDOWN_EDITOR (self));
- e_markdown_editor_surround_selection (self, FALSE, "*", "*");
+ e_markdown_editor_surround_selection (self, FALSE, "_", "_");
}
static void
@@ -302,10 +310,23 @@ e_markdown_editor_switch_page_cb (GtkNotebook *notebook,
EMarkdownEditor *self = user_data;
gchar *converted;
gchar *html;
+ gint n_items, ii;
g_return_if_fail (E_IS_MARKDOWN_EDITOR (self));
- gtk_widget_set_visible (GTK_WIDGET (self->priv->action_toolbar), page_num != 1);
+ n_items = gtk_toolbar_get_n_items (self->priv->action_toolbar);
+
+ for (ii = 0; ii < n_items; ii++) {
+ GtkToolItem *item = gtk_toolbar_get_nth_item (self->priv->action_toolbar, ii);
+
+ if (item) {
+ GtkWidget *widget = GTK_WIDGET (item);
+
+ /* Keep only the help button and hide any other */
+ if (g_strcmp0 (gtk_widget_get_name (widget), "markdown-help") != 0)
+ gtk_widget_set_visible (widget, page_num != 1);
+ }
+ }
/* Not the Preview page */
if (page_num != 1)
@@ -328,10 +349,14 @@ e_markdown_editor_switch_page_cb (GtkNotebook *notebook,
static gboolean
e_markdown_editor_is_dark_theme (EMarkdownEditor *self)
{
+ GtkStyleContext *style_context;
GdkRGBA rgba;
gdouble brightness;
- e_utils_get_theme_color (GTK_WIDGET (self), "theme_text_color,theme_fg_color",
E_UTILS_DEFAULT_THEME_TEXT_COLOR, &rgba);
+ g_return_val_if_fail (self->priv->action_toolbar != NULL, FALSE);
+
+ style_context = gtk_widget_get_style_context (GTK_WIDGET (self->priv->action_toolbar));
+ gtk_style_context_get_color (style_context, gtk_style_context_get_state (style_context), &rgba);
brightness =
(0.2109 * 255.0 * rgba.red) +
@@ -341,33 +366,128 @@ e_markdown_editor_is_dark_theme (EMarkdownEditor *self)
return brightness > 140;
}
+struct _toolbar_items {
+ const gchar *label;
+ const gchar *icon_name;
+ const gchar *icon_name_dark;
+ GCallback callback;
+};
+
+static struct _toolbar_items toolbar_items[] = {
+ #define ITEM(lbl, icn, cbk) { lbl, icn, icn "-dark", G_CALLBACK (cbk) }
+ ITEM (N_("Add bold text"), "markdown-bold", e_markdown_editor_add_bold_text_cb),
+ ITEM (N_("Add italic text"), "markdown-italic", e_markdown_editor_add_italic_text_cb),
+ ITEM (N_("Insert a quote"), "markdown-quote", e_markdown_editor_insert_quote_cb),
+ ITEM (N_("Insert code"), "markdown-code", e_markdown_editor_insert_code_cb),
+ ITEM (N_("Add a link"), "markdown-link", e_markdown_editor_add_link_cb),
+ ITEM (N_("Add a bullet list"), "markdown-bullets", e_markdown_editor_add_bullet_list_cb),
+ ITEM (N_("Add a numbered list"), "markdown-numbers", e_markdown_editor_add_numbered_list_cb),
+ ITEM (N_("Add a header"), "markdown-header", e_markdown_editor_add_header_cb),
+ ITEM (NULL, "", NULL),
+ ITEM (N_("Open online common mark documentation"), "markdown-help", G_CALLBACK
(e_markdown_editor_markdown_syntax_cb))
+ #undef ITEM
+};
+
+static void
+e_markdown_editor_style_updated_cb (GtkWidget *widget,
+ gpointer user_data)
+{
+ EMarkdownEditor *self;
+ gboolean is_dark_theme;
+
+ g_return_if_fail (E_IS_MARKDOWN_EDITOR (widget));
+
+ self = E_MARKDOWN_EDITOR (widget);
+ is_dark_theme = e_markdown_editor_is_dark_theme (self);
+
+ if (self->priv->is_dark_theme != is_dark_theme) {
+ gint n_items, ii, jj, idx = 0;
+
+ self->priv->is_dark_theme = is_dark_theme;
+
+ n_items = gtk_toolbar_get_n_items (self->priv->action_toolbar);
+
+ for (ii = 0; ii < n_items; ii++) {
+ GtkToolItem *item = gtk_toolbar_get_nth_item (self->priv->action_toolbar, ii);
+ const gchar *name;
+
+ if (!item || !GTK_IS_TOOL_BUTTON (item))
+ continue;
+
+ name = gtk_widget_get_name (GTK_WIDGET (item));
+
+ if (!name || !*name)
+ continue;
+
+ for (jj = 0; jj < G_N_ELEMENTS (toolbar_items); jj++) {
+ gint index = (jj + idx) % G_N_ELEMENTS (toolbar_items);
+
+ if (g_strcmp0 (name, toolbar_items[index].icon_name) == 0) {
+ const gchar *icon_name = is_dark_theme ?
toolbar_items[index].icon_name_dark : toolbar_items[index].icon_name;
+
+ if (icon_name) {
+ GtkWidget *icon_widget = gtk_tool_button_get_icon_widget
(GTK_TOOL_BUTTON (item));
+
+ if (icon_widget)
+ gtk_image_set_from_icon_name (GTK_IMAGE
(icon_widget), icon_name, GTK_ICON_SIZE_SMALL_TOOLBAR);
+ else
+ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON
(item), icon_name);
+ }
+
+ idx = jj + 1;
+ break;
+ }
+ }
+ }
+ }
+}
+
+static void
+e_markdown_editor_notify_editable_cb (GObject *object,
+ GParamSpec *param,
+ gpointer user_data)
+{
+ EMarkdownEditor *self = user_data;
+ gboolean sensitive = FALSE;
+ gint n_items, ii;
+
+ g_return_if_fail (E_IS_MARKDOWN_EDITOR (self));
+
+ g_object_get (object, "editable", &sensitive, NULL);
+
+ n_items = gtk_toolbar_get_n_items (self->priv->action_toolbar);
+
+ for (ii = 0; ii < n_items; ii++) {
+ GtkToolItem *item = gtk_toolbar_get_nth_item (self->priv->action_toolbar, ii);
+
+ if (item) {
+ GtkWidget *widget = GTK_WIDGET (item);
+
+ /* Keep only the help button and hide any other */
+ if (g_strcmp0 (gtk_widget_get_name (widget), "markdown-help") != 0)
+ gtk_widget_set_sensitive (widget, sensitive);
+ }
+ }
+}
+
+static void
+e_markdown_editor_text_view_changed_cb (GtkTextView *text_view,
+ gpointer user_data)
+{
+ EMarkdownEditor *self = user_data;
+
+ g_return_if_fail (E_IS_MARKDOWN_EDITOR (self));
+
+ g_signal_emit (self, signals[CHANGED], 0, NULL);
+}
+
static void
e_markdown_editor_constructed (GObject *object)
{
- struct _items {
- const gchar *label;
- const gchar *icon_name;
- const gchar *icon_name_dark;
- GCallback callback;
- } items[] = {
- #define ITEM(lbl, icn, cbk) { lbl, icn, icn "-dark", G_CALLBACK (cbk) }
- ITEM (N_("Add bold text"), "markdown-bold", e_markdown_editor_add_bold_text_cb),
- ITEM (N_("Add italic text"), "markdown-italic", e_markdown_editor_add_italic_text_cb),
- ITEM (N_("Insert a quote"), "markdown-quote", e_markdown_editor_insert_quote_cb),
- ITEM (N_("Insert code"), "markdown-code", e_markdown_editor_insert_code_cb),
- ITEM (N_("Add a link"), "markdown-link", e_markdown_editor_add_link_cb),
- ITEM (N_("Add a bullet list"), "markdown-bullets", e_markdown_editor_add_bullet_list_cb),
- ITEM (N_("Add a numbered list"), "markdown-numbers", e_markdown_editor_add_numbered_list_cb),
- ITEM (N_("Add a header"), "markdown-header", e_markdown_editor_add_header_cb),
- ITEM (NULL, "", NULL),
- ITEM (N_("Open online common mark documentation"), "markdown-help", G_CALLBACK
(e_markdown_editor_markdown_syntax_cb))
- #undef ITEM
- };
EMarkdownEditor *self = E_MARKDOWN_EDITOR (object);
GtkWidget *widget;
GtkNotebook *notebook;
GtkScrolledWindow *scrolled_window;
- gboolean is_dark_theme;
guint ii;
/* Chain up to parent's method. */
@@ -380,7 +500,7 @@ e_markdown_editor_constructed (GObject *object)
"valign", GTK_ALIGN_FILL,
"vexpand", TRUE,
"visible", TRUE,
- "show-border", FALSE,
+ "show-border", TRUE,
"show-tabs", TRUE,
NULL);
gtk_box_pack_start (GTK_BOX (self), widget, TRUE, TRUE, 0);
@@ -453,26 +573,27 @@ e_markdown_editor_constructed (GObject *object)
#endif /* HAVE_MARKDOWN */
widget = gtk_toolbar_new ();
+ gtk_toolbar_set_icon_size (GTK_TOOLBAR (widget), GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_widget_show (widget);
gtk_notebook_set_action_widget (notebook, widget, GTK_PACK_END);
self->priv->action_toolbar = GTK_TOOLBAR (widget);
+ self->priv->is_dark_theme = e_markdown_editor_is_dark_theme (self);
- is_dark_theme = e_markdown_editor_is_dark_theme (self);
-
- for (ii = 0; ii < G_N_ELEMENTS (items); ii++) {
+ for (ii = 0; ii < G_N_ELEMENTS (toolbar_items); ii++) {
GtkToolItem *item;
- if (items[ii].callback) {
+ if (toolbar_items[ii].callback) {
GtkWidget *icon;
const gchar *icon_name;
- icon_name = is_dark_theme ? items[ii].icon_name_dark : items[ii].icon_name;
- icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ icon_name = self->priv->is_dark_theme ? toolbar_items[ii].icon_name_dark :
toolbar_items[ii].icon_name;
+ icon = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_SMALL_TOOLBAR);
gtk_widget_show (GTK_WIDGET (icon));
- item = gtk_tool_button_new (icon, _(items[ii].label));
- gtk_tool_item_set_tooltip_text (item, _(items[ii].label));
- g_signal_connect_object (item, "clicked", items[ii].callback, self, 0);
+ item = gtk_tool_button_new (icon, _(toolbar_items[ii].label));
+ gtk_widget_set_name (GTK_WIDGET (item), toolbar_items[ii].icon_name);
+ gtk_tool_item_set_tooltip_text (item, _(toolbar_items[ii].label));
+ g_signal_connect_object (item, "clicked", toolbar_items[ii].callback, self, 0);
} else {
item = gtk_separator_tool_item_new ();
}
@@ -484,6 +605,10 @@ e_markdown_editor_constructed (GObject *object)
#ifdef HAVE_MARKDOWN
g_signal_connect_object (notebook, "switch-page", G_CALLBACK (e_markdown_editor_switch_page_cb),
self, 0);
#endif
+
+ g_signal_connect (self, "style-updated", G_CALLBACK (e_markdown_editor_style_updated_cb), NULL);
+ g_signal_connect_object (gtk_text_view_get_buffer (self->priv->text_view), "changed", G_CALLBACK
(e_markdown_editor_text_view_changed_cb), self, 0);
+ e_signal_connect_notify_object (self->priv->text_view, "notify::editable", G_CALLBACK
(e_markdown_editor_notify_editable_cb), self, 0);
}
static void
@@ -493,6 +618,23 @@ e_markdown_editor_class_init (EMarkdownEditorClass *klass)
object_class = G_OBJECT_CLASS (klass);
object_class->constructed = e_markdown_editor_constructed;
+
+ /**
+ * EMarkdownEditor::changed:
+ * @self: an #EMarkdownEditor, which sent the signal
+ *
+ * This signal is emitted the content of the @self changes.
+ *
+ * Since: 3.44
+ **/
+ signals[CHANGED] = g_signal_new (
+ "changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_FIRST,
+ 0,
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 0,
+ G_TYPE_NONE);
}
static void
@@ -516,6 +658,39 @@ e_markdown_editor_new (void)
return g_object_new (E_TYPE_MARKDOWN_EDITOR, NULL);
}
+/**
+ * e_markdown_editor_get_text_view:
+ * @self: an #EMarkdownEditor
+ *
+ * Returns: (transfer none): a #GtkTextView of the @self
+ *
+ * Since: 3.44
+ **/
+GtkTextView *
+e_markdown_editor_get_text_view (EMarkdownEditor *self)
+{
+ g_return_val_if_fail (E_IS_MARKDOWN_EDITOR (self), NULL);
+
+ return self->priv->text_view;
+}
+
+/**
+ * e_markdown_editor_get_action_toolbar:
+ * @self: an #EMarkdownEditor
+ *
+ * Returns: (transfer none): a #GtkToolbar of the @self, where the caller
+ * can add its own action buttons.
+ *
+ * Since: 3.44
+ **/
+GtkToolbar *
+e_markdown_editor_get_action_toolbar (EMarkdownEditor *self)
+{
+ g_return_val_if_fail (E_IS_MARKDOWN_EDITOR (self), NULL);
+
+ return self->priv->action_toolbar;
+}
+
/**
* e_markdown_editor_dup_text:
* @self: an #EMarkdownEditor
diff --git a/src/e-util/e-markdown-editor.h b/src/e-util/e-markdown-editor.h
index 4369e7c25e..0cacea1493 100644
--- a/src/e-util/e-markdown-editor.h
+++ b/src/e-util/e-markdown-editor.h
@@ -49,6 +49,8 @@ struct _EMarkdownEditorClass {
GType e_markdown_editor_get_type (void) G_GNUC_CONST;
GtkWidget * e_markdown_editor_new (void);
+GtkTextView * e_markdown_editor_get_text_view (EMarkdownEditor *self);
+GtkToolbar * e_markdown_editor_get_action_toolbar (EMarkdownEditor *self);
gchar * e_markdown_editor_dup_text (EMarkdownEditor *self);
gchar * e_markdown_editor_dup_html (EMarkdownEditor *self);
diff --git a/src/modules/calendar/e-calendar-preferences.c b/src/modules/calendar/e-calendar-preferences.c
index 905c0e2e12..7440f09d6e 100644
--- a/src/modules/calendar/e-calendar-preferences.c
+++ b/src/modules/calendar/e-calendar-preferences.c
@@ -898,6 +898,12 @@ calendar_preferences_construct (ECalendarPreferences *prefs,
widget, "active",
G_SETTINGS_BIND_DEFAULT);
+ widget = e_builder_get_widget (prefs->priv->builder, "use-markdown-editor");
+ g_settings_bind (
+ settings, "use-markdown-editor",
+ widget, "active",
+ G_SETTINGS_BIND_DEFAULT);
+
/* These settings control the "Birthdays & Anniversaries" backend. */
eds_settings =
diff --git a/src/modules/calendar/e-calendar-preferences.ui b/src/modules/calendar/e-calendar-preferences.ui
index 2d10e26b32..10806c032b 100644
--- a/src/modules/calendar/e-calendar-preferences.ui
+++ b/src/modules/calendar/e-calendar-preferences.ui
@@ -790,6 +790,22 @@
<property name="position">7</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="use-markdown-editor">
+ <property name="label" translatable="yes">Use ma_rkdown for Description in the component
editor</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="margin_left">12</property>
+ <property name="use_underline">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">8</property>
+ </packing>
+ </child>
<child>
<object class="GtkLabel" id="general-space-label">
<property name="visible">True</property>
@@ -798,7 +814,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
- <property name="position">8</property>
+ <property name="position">9</property>
</packing>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]