[gnome-todo] unscheduled-panel: improve code style
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-todo] unscheduled-panel: improve code style
- Date: Fri, 21 Apr 2017 12:56:59 +0000 (UTC)
commit 1656856ab6cf128506bb8b5c4560cbbad3d0ed05
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri Apr 21 09:56:24 2017 -0300
unscheduled-panel: improve code style
.../unscheduled-panel/__init__.py | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/plugins/unscheduled-panel/unscheduled-panel/__init__.py
b/plugins/unscheduled-panel/unscheduled-panel/__init__.py
index e832929..9dbd5e7 100644
--- a/plugins/unscheduled-panel/unscheduled-panel/__init__.py
+++ b/plugins/unscheduled-panel/unscheduled-panel/__init__.py
@@ -66,10 +66,15 @@ class UnscheduledPanel(Gtk.Box, Gtd.Panel):
for tasklist in manager.get_task_lists():
for task in tasklist.get_tasks():
- if task.get_due_date() is None:
- current_tasks.append(task)
- if not task.get_complete():
- self.task_counter += 1
+
+ if not task.get_due_date() is None:
+ continue
+
+ current_tasks.append(task)
+
+ # Update the counter
+ if not task.get_complete():
+ self.task_counter += 1
self.view.set_list(current_tasks)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]