-
-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
339 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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> | ||
|
@@ -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> | ||
|
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.