[nanny: 5/13] * Make chores check immune to changes of chores list in runtime. * A bit more sane chore availabilit
- From: Roberto Majadas <telemaco src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nanny: 5/13] * Make chores check immune to changes of chores list in runtime. * A bit more sane chore availabilit
- Date: Fri, 6 Jul 2012 13:29:49 +0000 (UTC)
commit dd72a493ce2abc4dd8079b34e1825325fc0d3dc3
Author: Guido Tabbernuk <boamaod gmail com>
Date: Fri Feb 24 14:51:22 2012 +0200
* Make chores check immune to changes of chores list in runtime.
* A bit more sane chore availability check.
client/gnome/admin/src/DesktopBlocker.py | 2 ++
daemon/src/QuarterBack.py | 3 ++-
2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/client/gnome/admin/src/DesktopBlocker.py b/client/gnome/admin/src/DesktopBlocker.py
index ac5bd08..808d77b 100755
--- a/client/gnome/admin/src/DesktopBlocker.py
+++ b/client/gnome/admin/src/DesktopBlocker.py
@@ -155,6 +155,8 @@ class DesktopBlocker(gtk.Window):
self.inventory.add(hb)
self.inventory.show_all()
+ self.buy_time_button.show()
+
# to make none of radio buttons selected
self.inv_none_button.hide()
diff --git a/daemon/src/QuarterBack.py b/daemon/src/QuarterBack.py
index 0e2c79f..a5e2ace 100755
--- a/daemon/src/QuarterBack.py
+++ b/daemon/src/QuarterBack.py
@@ -303,7 +303,8 @@ class QuarterBack(gobject.GObject) :
def is_chore_available(self, user_id):
count = self.chore_manager.get_contracted_chores_count(user_id)
limit = self.chore_settings[user_id][1]
- return count < limit
+ chores_available = len(self.chore_manager.list_chores(user_id, available=True, contracted=False, finished=False))
+ return count < limit and chores_available > 0
def is_blocked(self, user_id, app_id, date_time=None):
block_status = False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]