Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Aug 29, 2024
1 parent 82800ed commit 6f59deb
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 19 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
16 changes: 2 additions & 14 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,8 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: CI
jobs:
lint:
name: "Vala Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: elementary/actions/vala-lint@main
with:
dir: .
conf: .vala-lint.conf
flatpak:
name: "Flatpak"
flatpak-devel:
name: "Flatpak (Devel)"
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-46
Expand All @@ -29,8 +19,6 @@ jobs:
bundle: io.github.alainm23.planify.Devel.flatpak
manifest-path: build-aux/io.github.alainm23.planify.Devel.json
cache-key: flatpak-builder-${{ github.sha }}
repository-name: flathub-beta
repository-url: https://flathub.org/beta-repo/flathub-beta.flatpakrepo
# snap:
# name: "Snap"
# runs-on: ubuntu-latest
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
jobs:
lint:
name: "Vala Lint"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: elementary/actions/vala-lint@main
with:
dir: .
conf: .vala-lint.conf
24 changes: 24 additions & 0 deletions data/io.github.alainm23.planify.appdata.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,30 @@
<url type="donation">https://www.patreon.com/alainm23</url>
<launchable type="desktop-id">@[email protected]</launchable>
<releases>
<release version="4.11.0" date="2024-08-28">
<description translate="no">
<ul>
<li>Added feature to collapse sections.</li>
<li>A task counter per section has been added.</li>
<li>Pinned tasks are now displayed at the start of each project.</li>
<li>Added an overdue tasks indicator to the today button.</li>
<li>New keyboard shortcuts were added to Quick Add, @ to add tags, # to select a project and ! to create a reminder.</li>
<li>A new view has been added to see completed tasks, sorted by date and the possibility to filter by Sections.</li>
<li>New task history log added, now it is possible to see when the task was completed, moved between projects or sections.</li>
<li>Fixed several bugs when doing Drag and Drop.</li>
<li>Quick Find now opens the task detail when selected.</li>
<li>Added a preference to enable or disable the use of Markdown in task detail.</li>
<li>Improved navigation using the keyboard.</li>
<li>In Quick Add, it is now possible to create a section if it does not exist.</li>
<li>Added a numerical indicator for the number of attachments.</li>
<li>Added preference to keep the task detail pane open, making navigation faster.</li>
<li>The option to repeat a task has been moved to the date and time selection widget, allowing you to create recurring tasks more quickly.</li>
<li>Fixed several bugs with Nextcloud synchronisation.</li>
<li>Several design and optimisation improvements, Planify now feels faster and consumes less resources.</li>
</ul>
</description>
</release>

<release version="4.10.8" date="2024-08-20">
<description translate="no">
<ul>
Expand Down
2 changes: 1 addition & 1 deletion src/App.vala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public class Planify : Adw.Application {
Object (
application_id: Build.APPLICATION_ID,
flags: ApplicationFlags.HANDLES_OPEN
);
);
}

~Planify () {
Expand Down
66 changes: 64 additions & 2 deletions src/Dialogs/CompletedTasks.vala
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,71 @@ public class Dialogs.CompletedTasks : Adw.Dialog {
add_items ();
Services.EventBus.get_default ().disconnect_typing_accel ();

listbox.row_activated.connect ((row) => {
signals_map[filters_flowbox.filter_removed.connect (() => {
filter_section_id = null;
clear_items ();
add_items ();
})] = filters_flowbox;

signals_map[search_entry.search_changed.connect (() => {
if (search_entry.text == "") {
clear_items ();
add_items ();
}

filter_section_id = null;
listbox.invalidate_filter ();
})] = search_entry;

signals_map[remove_all.clicked.connect (() => {
var items = Services.Store.instance ().get_items_checked_by_project (project);

var dialog = new Adw.AlertDialog (
_("Delete All Completed Tasks"),
_("This will delete %d completed tasks and their subtasks from project %s".printf (items.size, project.name))
);

dialog.body_use_markup = true;
dialog.add_response ("cancel", _("Cancel"));
dialog.add_response ("delete", _("Delete"));
dialog.set_response_appearance ("delete", Adw.ResponseAppearance.DESTRUCTIVE);
dialog.present (Planify._instance.main_window);

dialog.response.connect ((response) => {
if (response == "delete") {
delete_all_action (items);
}
});
})] = remove_all;

signals_map[listbox.row_activated.connect ((row) => {
view_item (((Widgets.CompletedTaskRow) row).item);
});
})] = listbox;

signals_map[Services.EventBus.get_default ().checked_toggled.connect ((item, old_checked) => {
if (item.project_id != project.id) {
return;
}

if (!old_checked) {
if (!items_checked.has_key (item.id)) {
items_checked [item.id] = new Widgets.CompletedTaskRow (item);
listbox.insert (items_checked [item.id], 0);
}
} else {
if (items_checked.has_key (item.id)) {
items_checked [item.id].hide_destroy ();
items_checked.unset (item.id);
}
}
})] = Services.EventBus.get_default ();

signals_map[Services.Store.instance ().item_deleted.connect ((item) => {
if (items_checked.has_key (item.id)) {
items_checked [item.id].hide_destroy ();
items_checked.unset (item.id);
}
})] = Services.Store.instance ();

closed.connect (() => {
listbox.set_sort_func (null);
Expand Down
3 changes: 2 additions & 1 deletion src/Widgets/CompletedTaskRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public class Widgets.CompletedTaskRow : Gtk.ListBoxRow {
}

construct {
add_css_class ("no-selectable");
add_css_class ("row");
add_css_class ("no-padding");

checked_button = new Gtk.CheckButton () {
valign = Gtk.Align.START,
Expand Down
5 changes: 4 additions & 1 deletion src/Widgets/ItemDetailCompleted.vala
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ public class Widgets.ItemDetailCompleted : Adw.Bin {
content.append (content_group);
content.append (properties_group);
content.append (description_group);
content.append (subitems_group);

if (item.items.size > 0) {
content.append (subitems_group);
}

var scrolled_window = new Widgets.ScrolledWindow (content);

Expand Down

0 comments on commit 6f59deb

Please sign in to comment.