Skip to content

Commit

Permalink
Release 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Dec 10, 2023
1 parent 14d9cb9 commit 6279e37
Show file tree
Hide file tree
Showing 24 changed files with 339 additions and 503 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<h3 align="center">Never worry about forgetting things again</h3>
</div>

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

## Planify is here...

Expand Down
16 changes: 8 additions & 8 deletions src/Enum.vala → core/Enum.vala
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public enum ProjectViewStyle {
return "board";

default:
assert_not_reached();
assert_not_reached ();
}
}
}
Expand All @@ -61,7 +61,7 @@ public enum ProjectIconStyle {
return "emoji";

default:
assert_not_reached();
assert_not_reached ();
}
}
}
Expand Down Expand Up @@ -95,7 +95,7 @@ public enum FilterType {
return "filter";

default:
assert_not_reached();
assert_not_reached ();
}
}

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

default:
assert_not_reached();
assert_not_reached ();
}
}
}
Expand Down Expand Up @@ -148,7 +148,7 @@ public enum BackendType {
return "caldav";

default:
assert_not_reached();
assert_not_reached ();
}
}
}
Expand Down Expand Up @@ -199,7 +199,7 @@ public enum ObjectType {
return _("Lists");

default:
assert_not_reached();
assert_not_reached ();
}
}
}
Expand Down Expand Up @@ -243,7 +243,7 @@ public enum RecurrencyType {
}

default:
assert_not_reached();
assert_not_reached ();
}
}
}
Expand All @@ -266,7 +266,7 @@ public enum PickerType {
return "sections";

default:
assert_not_reached();
assert_not_reached ();
}
}
}
2 changes: 1 addition & 1 deletion src/Services/Settings.vala → core/Services/Settings.vala
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ public class Services.Settings : GLib.Object {
public Settings () {
settings = new GLib.Settings ("io.github.alainm23.planify");
}
}
}
93 changes: 93 additions & 0 deletions core/Utils.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
/*
* Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Alain M. <[email protected]>
*/

public class Utils : GLib.Object {
private static Utils? _instance;
public static Utils get_default () {
if (_instance == null) {
_instance = new Utils ();
}

return _instance;
}

public string get_encode_text (string text) {
return GLib.Uri.escape_string (text, null, false);
}

/*
Icons
*/

private Gee.HashMap<string, bool>? _dynamic_icons;
public Gee.HashMap<string, bool> dynamic_icons {
get {
if (_dynamic_icons != null) {
return _dynamic_icons;
}

_dynamic_icons = new Gee.HashMap<string, bool> ();
_dynamic_icons.set ("planner-calendar", true);
_dynamic_icons.set ("planner-search", true);
_dynamic_icons.set ("chevron-right", true);
_dynamic_icons.set ("chevron-down", true);
_dynamic_icons.set ("planner-refresh", true);
_dynamic_icons.set ("planner-edit", true);
_dynamic_icons.set ("planner-trash", true);
_dynamic_icons.set ("planner-star", true);
_dynamic_icons.set ("planner-note", true);
_dynamic_icons.set ("planner-close-circle", true);
_dynamic_icons.set ("planner-check-circle", true);
_dynamic_icons.set ("planner-flag", true);
_dynamic_icons.set ("planner-tag", true);
_dynamic_icons.set ("planner-pinned", true);
_dynamic_icons.set ("planner-settings", true);
_dynamic_icons.set ("planner-bell", true);
_dynamic_icons.set ("sidebar-left", true);
_dynamic_icons.set ("sidebar-right", true);
_dynamic_icons.set ("planner-mail", true);
_dynamic_icons.set ("planner-note", true);
_dynamic_icons.set ("planner-settings-sliders", true);
_dynamic_icons.set ("planner-list", true);
_dynamic_icons.set ("planner-board", true);
_dynamic_icons.set ("color-swatch", true);
_dynamic_icons.set ("emoji-happy", true);
_dynamic_icons.set ("planner-clipboard", true);
_dynamic_icons.set ("planner-copy", true);
_dynamic_icons.set ("planner-rotate", true);
_dynamic_icons.set ("planner-section", true);
_dynamic_icons.set ("unordered-list", true);
_dynamic_icons.set ("ordered-list", true);
_dynamic_icons.set ("menu", true);
_dynamic_icons.set ("share", true);
_dynamic_icons.set ("dropdown", true);
_dynamic_icons.set ("information", true);
_dynamic_icons.set ("dots-vertical", true);
_dynamic_icons.set ("plus", true);

return _dynamic_icons;
}
}

public bool is_dynamic_icon (string icon_name) {
return dynamic_icons.has_key (icon_name);
}
}
91 changes: 91 additions & 0 deletions core/Widgets/DynamicIcon.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* Copyright © 2023 Alain M. (https://github.com/alainm23/planify)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA
*
* Authored by: Alain M. <[email protected]>
*/

public class Widgets.DynamicIcon : Adw.Bin {
public string icon_name { get; set; default = null; }
public int size { get; set; default = 16; }

private Gtk.Image icon;

public DynamicIcon () {
Object(
halign: Gtk.Align.CENTER,
valign: Gtk.Align.CENTER
);
}

public DynamicIcon.from_icon_name (string icon_name) {
Object(
halign: Gtk.Align.CENTER,
valign: Gtk.Align.CENTER,
icon_name: icon_name
);

generate_icon ();
}

construct {
icon = new Gtk.Image () {
halign = Gtk.Align.CENTER,
valign = Gtk.Align.CENTER
};

child = icon;

notify["size"].connect (() => {
generate_icon ();
});



Services.Settings.get_default ().settings.changed.connect ((key) => {
if (key == "system-appearance" || key == "appearance" || key == "dark-mode") {
generate_icon ();
}
});
}

public void update_icon_name (string icon_name) {
this.icon_name = icon_name;
generate_icon ();
}

private void generate_icon () {
if (icon_name == null) {
return;
}

bool dark_mode = Services.Settings.get_default ().settings.get_boolean ("dark-mode");
if (Services.Settings.get_default ().settings.get_boolean ("system-appearance")) {
dark_mode = Granite.Settings.get_default ().prefers_color_scheme == Granite.Settings.ColorScheme.DARK;
}

if (Utils.get_default ().is_dynamic_icon (icon_name)) {
icon.gicon = new ThemedIcon ("%s-%s".printf (
icon_name, dark_mode ? "dark" : "light"
));
icon.pixel_size = size;
} else {
icon.gicon = new ThemedIcon (icon_name);
icon.pixel_size = size;
}
}
}
File renamed without changes.
64 changes: 64 additions & 0 deletions core/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
conf_data = configuration_data()
conf_data.set_quoted('APPLICATION_ID', application_id)
conf_data.set_quoted('GETTEXT_PACKAGE', application_id)
conf_data.set_quoted('VERSION', meson.project_version())
conf_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
conf_data.set_quoted('PACKAGE_VERSION', meson.project_version())
conf_data.set_quoted('PREFIX', get_option('prefix'))
conf_data.set_quoted('DATADIR', join_paths (get_option('prefix'), get_option('datadir')))
conf_data.set_quoted('PROFILE', profile)

config_file = configure_file(
configuration : conf_data,
input : 'config.vala.in',
output : 'config.vala'
)

core_files = files(
'Utils.vala',
'Enum.vala',
'Services/Settings.vala',
'Widgets/DynamicIcon.vala'
)

core_deps = [
glib_dep,
gee_dep,
gtk_dep,
sqlite3_dep,
libadwaita_dep,
granite_dep,
json_dep,
]

core_lib = shared_library(
'planify',
core_files,
dependencies: [ core_deps, m_dep ],
install: true,
install_dir: [true, join_paths(get_option('includedir'), 'planify'), true],
soversion: '0',
version: '0.1'
)

core_dep = declare_dependency(
link_with: core_lib,
dependencies: core_deps,
include_directories: include_directories('.')
)

install_data(
'planify.deps',
install_dir: join_paths(get_option('datadir'), 'vala', 'vapi')
)

pkgconfig.generate(
core_lib,
filebase: 'planify',
version: meson.project_version(),
name: 'Planify',
description: 'Extension endpoint to the Planify application',
subdirs: 'planify',
requires: core_deps
)

11 changes: 11 additions & 0 deletions core/planify.deps
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
glib-2.0
gee-0.8
gtk4
sqlite3
libadwaita-1
webkitgtk-6.0
granite-7
json-glib-1.0
libecal-2.0
libedataserver-1.2
libical-glib
22 changes: 20 additions & 2 deletions data/io.github.alainm23.planify.appdata.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/alainm23/planner/master/data/resources/screenshot/screenshot-01.png</image>
<image>https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-01.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/alainm23/planner/master/data/resources/screenshot/screenshot-02.png</image>
<image>https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-02.png</image>
</screenshot>
<screenshot>
<image>https://raw.githubusercontent.com/alainm23/planify/master/data/resources/screenshot/screenshot-03.png</image>
</screenshot>
</screenshots>
<kudos>
Expand All @@ -51,6 +54,21 @@
<url type="help">https://useplanner.com/support/</url>
<launchable type="desktop-id">@[email protected]</launchable>
​<releases>
<release version="4.2" date="2023-12-10">
<description>
<ul>
<li>Icon size update.</li>
<li>Custom decoration layout support.</li>
<li>Improved colors in light theme.</li>
<li>Sort to-dos by project available.</li>
<li>Ability to configure or decrease the size of the sidebar.</li>
<li>Available configuration to change the start day of the week in the calendar.</li>
<li>Added the functionality to select the home page.</li>
<li>Bugs fixed #1053, #1026, #1042, #1041, #1037, #1035, #1015, #1001, #995, #946, #1055.</li>
</ul>
</description>
</release>

<release version="4.1.4" date="2023-12-05">
<description>
<ul>
Expand Down
Binary file modified data/resources/screenshot/screenshot-01.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 modified data/resources/screenshot/screenshot-02.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 data/resources/screenshot/screenshot-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6279e37

Please sign in to comment.