Skip to content

Commit 6279e37

Browse files
committed
Release 4.2
1 parent 14d9cb9 commit 6279e37

24 files changed

+339
-503
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<h3 align="center">Never worry about forgetting things again</h3>
55
</div>
66

7-
![Planify Screenshot](https://raw.githubusercontent.com/alainm23/planner/master/data/resources/screenshot/screenshot-01.png)
7+
![Planify Screenshot](https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-01.png)
88

99
## Planify is here...
1010

src/Enum.vala renamed to core/Enum.vala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public enum ProjectViewStyle {
4343
return "board";
4444

4545
default:
46-
assert_not_reached();
46+
assert_not_reached ();
4747
}
4848
}
4949
}
@@ -61,7 +61,7 @@ public enum ProjectIconStyle {
6161
return "emoji";
6262

6363
default:
64-
assert_not_reached();
64+
assert_not_reached ();
6565
}
6666
}
6767
}
@@ -95,7 +95,7 @@ public enum FilterType {
9595
return "filter";
9696

9797
default:
98-
assert_not_reached();
98+
assert_not_reached ();
9999
}
100100
}
101101

@@ -114,7 +114,7 @@ public enum FilterType {
114114
return _("Pinboard");
115115

116116
default:
117-
assert_not_reached();
117+
assert_not_reached ();
118118
}
119119
}
120120
}
@@ -148,7 +148,7 @@ public enum BackendType {
148148
return "caldav";
149149

150150
default:
151-
assert_not_reached();
151+
assert_not_reached ();
152152
}
153153
}
154154
}
@@ -199,7 +199,7 @@ public enum ObjectType {
199199
return _("Lists");
200200

201201
default:
202-
assert_not_reached();
202+
assert_not_reached ();
203203
}
204204
}
205205
}
@@ -243,7 +243,7 @@ public enum RecurrencyType {
243243
}
244244

245245
default:
246-
assert_not_reached();
246+
assert_not_reached ();
247247
}
248248
}
249249
}
@@ -266,7 +266,7 @@ public enum PickerType {
266266
return "sections";
267267

268268
default:
269-
assert_not_reached();
269+
assert_not_reached ();
270270
}
271271
}
272272
}

src/Services/Settings.vala renamed to core/Services/Settings.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ public class Services.Settings : GLib.Object {
3434
public Settings () {
3535
settings = new GLib.Settings ("io.github.alainm23.planify");
3636
}
37-
}
37+
}

core/Utils.vala

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
/*
2+
* Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 3 of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public
15+
* License along with this program; if not, write to the
16+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17+
* Boston, MA 02110-1301 USA
18+
*
19+
* Authored by: Alain M. <[email protected]>
20+
*/
21+
22+
public class Utils : GLib.Object {
23+
private static Utils? _instance;
24+
public static Utils get_default () {
25+
if (_instance == null) {
26+
_instance = new Utils ();
27+
}
28+
29+
return _instance;
30+
}
31+
32+
public string get_encode_text (string text) {
33+
return GLib.Uri.escape_string (text, null, false);
34+
}
35+
36+
/*
37+
Icons
38+
*/
39+
40+
private Gee.HashMap<string, bool>? _dynamic_icons;
41+
public Gee.HashMap<string, bool> dynamic_icons {
42+
get {
43+
if (_dynamic_icons != null) {
44+
return _dynamic_icons;
45+
}
46+
47+
_dynamic_icons = new Gee.HashMap<string, bool> ();
48+
_dynamic_icons.set ("planner-calendar", true);
49+
_dynamic_icons.set ("planner-search", true);
50+
_dynamic_icons.set ("chevron-right", true);
51+
_dynamic_icons.set ("chevron-down", true);
52+
_dynamic_icons.set ("planner-refresh", true);
53+
_dynamic_icons.set ("planner-edit", true);
54+
_dynamic_icons.set ("planner-trash", true);
55+
_dynamic_icons.set ("planner-star", true);
56+
_dynamic_icons.set ("planner-note", true);
57+
_dynamic_icons.set ("planner-close-circle", true);
58+
_dynamic_icons.set ("planner-check-circle", true);
59+
_dynamic_icons.set ("planner-flag", true);
60+
_dynamic_icons.set ("planner-tag", true);
61+
_dynamic_icons.set ("planner-pinned", true);
62+
_dynamic_icons.set ("planner-settings", true);
63+
_dynamic_icons.set ("planner-bell", true);
64+
_dynamic_icons.set ("sidebar-left", true);
65+
_dynamic_icons.set ("sidebar-right", true);
66+
_dynamic_icons.set ("planner-mail", true);
67+
_dynamic_icons.set ("planner-note", true);
68+
_dynamic_icons.set ("planner-settings-sliders", true);
69+
_dynamic_icons.set ("planner-list", true);
70+
_dynamic_icons.set ("planner-board", true);
71+
_dynamic_icons.set ("color-swatch", true);
72+
_dynamic_icons.set ("emoji-happy", true);
73+
_dynamic_icons.set ("planner-clipboard", true);
74+
_dynamic_icons.set ("planner-copy", true);
75+
_dynamic_icons.set ("planner-rotate", true);
76+
_dynamic_icons.set ("planner-section", true);
77+
_dynamic_icons.set ("unordered-list", true);
78+
_dynamic_icons.set ("ordered-list", true);
79+
_dynamic_icons.set ("menu", true);
80+
_dynamic_icons.set ("share", true);
81+
_dynamic_icons.set ("dropdown", true);
82+
_dynamic_icons.set ("information", true);
83+
_dynamic_icons.set ("dots-vertical", true);
84+
_dynamic_icons.set ("plus", true);
85+
86+
return _dynamic_icons;
87+
}
88+
}
89+
90+
public bool is_dynamic_icon (string icon_name) {
91+
return dynamic_icons.has_key (icon_name);
92+
}
93+
}

core/Widgets/DynamicIcon.vala

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
/*
2+
* Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 3 of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public
15+
* License along with this program; if not, write to the
16+
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17+
* Boston, MA 02110-1301 USA
18+
*
19+
* Authored by: Alain M. <[email protected]>
20+
*/
21+
22+
public class Widgets.DynamicIcon : Adw.Bin {
23+
public string icon_name { get; set; default = null; }
24+
public int size { get; set; default = 16; }
25+
26+
private Gtk.Image icon;
27+
28+
public DynamicIcon () {
29+
Object(
30+
halign: Gtk.Align.CENTER,
31+
valign: Gtk.Align.CENTER
32+
);
33+
}
34+
35+
public DynamicIcon.from_icon_name (string icon_name) {
36+
Object(
37+
halign: Gtk.Align.CENTER,
38+
valign: Gtk.Align.CENTER,
39+
icon_name: icon_name
40+
);
41+
42+
generate_icon ();
43+
}
44+
45+
construct {
46+
icon = new Gtk.Image () {
47+
halign = Gtk.Align.CENTER,
48+
valign = Gtk.Align.CENTER
49+
};
50+
51+
child = icon;
52+
53+
notify["size"].connect (() => {
54+
generate_icon ();
55+
});
56+
57+
58+
59+
Services.Settings.get_default ().settings.changed.connect ((key) => {
60+
if (key == "system-appearance" || key == "appearance" || key == "dark-mode") {
61+
generate_icon ();
62+
}
63+
});
64+
}
65+
66+
public void update_icon_name (string icon_name) {
67+
this.icon_name = icon_name;
68+
generate_icon ();
69+
}
70+
71+
private void generate_icon () {
72+
if (icon_name == null) {
73+
return;
74+
}
75+
76+
bool dark_mode = Services.Settings.get_default ().settings.get_boolean ("dark-mode");
77+
if (Services.Settings.get_default ().settings.get_boolean ("system-appearance")) {
78+
dark_mode = Granite.Settings.get_default ().prefers_color_scheme == Granite.Settings.ColorScheme.DARK;
79+
}
80+
81+
if (Utils.get_default ().is_dynamic_icon (icon_name)) {
82+
icon.gicon = new ThemedIcon ("%s-%s".printf (
83+
icon_name, dark_mode ? "dark" : "light"
84+
));
85+
icon.pixel_size = size;
86+
} else {
87+
icon.gicon = new ThemedIcon (icon_name);
88+
icon.pixel_size = size;
89+
}
90+
}
91+
}
File renamed without changes.

core/meson.build

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
conf_data = configuration_data()
2+
conf_data.set_quoted('APPLICATION_ID', application_id)
3+
conf_data.set_quoted('GETTEXT_PACKAGE', application_id)
4+
conf_data.set_quoted('VERSION', meson.project_version())
5+
conf_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
6+
conf_data.set_quoted('PACKAGE_VERSION', meson.project_version())
7+
conf_data.set_quoted('PREFIX', get_option('prefix'))
8+
conf_data.set_quoted('DATADIR', join_paths (get_option('prefix'), get_option('datadir')))
9+
conf_data.set_quoted('PROFILE', profile)
10+
11+
config_file = configure_file(
12+
configuration : conf_data,
13+
input : 'config.vala.in',
14+
output : 'config.vala'
15+
)
16+
17+
core_files = files(
18+
'Utils.vala',
19+
'Enum.vala',
20+
'Services/Settings.vala',
21+
'Widgets/DynamicIcon.vala'
22+
)
23+
24+
core_deps = [
25+
glib_dep,
26+
gee_dep,
27+
gtk_dep,
28+
sqlite3_dep,
29+
libadwaita_dep,
30+
granite_dep,
31+
json_dep,
32+
]
33+
34+
core_lib = shared_library(
35+
'planify',
36+
core_files,
37+
dependencies: [ core_deps, m_dep ],
38+
install: true,
39+
install_dir: [true, join_paths(get_option('includedir'), 'planify'), true],
40+
soversion: '0',
41+
version: '0.1'
42+
)
43+
44+
core_dep = declare_dependency(
45+
link_with: core_lib,
46+
dependencies: core_deps,
47+
include_directories: include_directories('.')
48+
)
49+
50+
install_data(
51+
'planify.deps',
52+
install_dir: join_paths(get_option('datadir'), 'vala', 'vapi')
53+
)
54+
55+
pkgconfig.generate(
56+
core_lib,
57+
filebase: 'planify',
58+
version: meson.project_version(),
59+
name: 'Planify',
60+
description: 'Extension endpoint to the Planify application',
61+
subdirs: 'planify',
62+
requires: core_deps
63+
)
64+

core/planify.deps

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
glib-2.0
2+
gee-0.8
3+
gtk4
4+
sqlite3
5+
libadwaita-1
6+
webkitgtk-6.0
7+
granite-7
8+
json-glib-1.0
9+
libecal-2.0
10+
libedataserver-1.2
11+
libical-glib

data/io.github.alainm23.planify.appdata.xml.in.in

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232
</description>
3333
<screenshots>
3434
<screenshot type="default">
35-
<image>https://raw.githubusercontent.com/alainm23/planner/master/data/resources/screenshot/screenshot-01.png</image>
35+
<image>https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-01.png</image>
3636
</screenshot>
3737
<screenshot>
38-
<image>https://raw.githubusercontent.com/alainm23/planner/master/data/resources/screenshot/screenshot-02.png</image>
38+
<image>https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-02.png</image>
39+
</screenshot>
40+
<screenshot>
41+
<image>https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-03.png</image>
3942
</screenshot>
4043
</screenshots>
4144
<kudos>
@@ -51,6 +54,21 @@
5154
<url type="help">https://useplanner.com/support/</url>
5255
<launchable type="desktop-id">@[email protected]</launchable>
5356
​<releases>
57+
<release version="4.2" date="2023-12-10">
58+
<description>
59+
<ul>
60+
<li>Icon size update.</li>
61+
<li>Custom decoration layout support.</li>
62+
<li>Improved colors in light theme.</li>
63+
<li>Sort to-dos by project available.</li>
64+
<li>Ability to configure or decrease the size of the sidebar.</li>
65+
<li>Available configuration to change the start day of the week in the calendar.</li>
66+
<li>Added the functionality to select the home page.</li>
67+
<li>Bugs fixed #1053, #1026, #1042, #1041, #1037, #1035, #1015, #1001, #995, #946, #1055.</li>
68+
</ul>
69+
</description>
70+
</release>
71+
5472
<release version="4.1.4" date="2023-12-05">
5573
<description>
5674
<ul>
34.7 KB
Loading

0 commit comments

Comments
 (0)