[billreminder] More tweaks to handle start and end dates. Needs to be refactored.
- From: Og B. Maciel <ogmaciel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [billreminder] More tweaks to handle start and end dates. Needs to be refactored.
- Date: Sun, 12 Dec 2010 23:03:54 +0000 (UTC)
commit 824ecaed4675f30b0c09688992bf1f8e9d855e61
Author: Og B. Maciel <ogmaciel gnome org>
Date: Sun Dec 12 18:03:37 2010 -0500
More tweaks to handle start and end dates. Needs to be refactored.
src/gui/adddialog.py | 19 ++++++++++---------
src/gui/maindialog.py | 3 ---
2 files changed, 10 insertions(+), 12 deletions(-)
---
diff --git a/src/gui/adddialog.py b/src/gui/adddialog.py
index 5cc36ca..5304e43 100644
--- a/src/gui/adddialog.py
+++ b/src/gui/adddialog.py
@@ -286,7 +286,7 @@ class AddDialog(object):
message = utils.Message()
text = _("The end date is set to a date prior to the start date. Setting it to match the start date.")
title = _("Date set in the past")
- message.ShowInfo(text=text, parentWindow=self, title=title)
+ message.ShowInfo(text=text, parentWindow=self.window, title=title)
else:
endDate = None
@@ -418,7 +418,7 @@ class AddDialog(object):
endDate = self.endDate.get_date()
if widget == self.dueDate:
- if startDate > endDate:
+ if self.endDate.get_sensitive() and startDate > endDate:
# Update endDate to be equal to dueDate
self.endDate.set_date(self.dueDate.get_date())
message = utils.Message()
@@ -426,13 +426,14 @@ class AddDialog(object):
title = _("Date set in the past")
message.ShowInfo(text=text, parentWindow=self.window, title=title)
else:
- if startDate > endDate:
- # Update endDate to be equal to dueDate
- self.endDate.set_date(self.dueDate.get_date())
- message = utils.Message()
- text = _("The end date is set to a date prior to the start date. Setting it to match the start date.")
- title = _("Date set in the past")
- message.ShowInfo(text=text, parentWindow=self.window, title=title)
+ if self.endDate.get_sensitive():
+ if startDate > endDate:
+ # Update endDate to be equal to dueDate
+ self.endDate.set_date(self.dueDate.get_date())
+ message = utils.Message()
+ text = _("The end date is set to a date prior to the start date. Setting it to match the start date.")
+ title = _("Date set in the past")
+ message.ShowInfo(text=text, parentWindow=self.window, title=title)
if self.alarmbutton.get_date():
# Extracts the date off the datepicker widget
diff --git a/src/gui/maindialog.py b/src/gui/maindialog.py
index 9eacc91..09bdc32 100644
--- a/src/gui/maindialog.py
+++ b/src/gui/maindialog.py
@@ -206,9 +206,6 @@ class MainDialog:
# Update list with updated record
status = self.gconf_client.get('show_paid_bills')
- #month = self.timeline.value.month
- #year = self.timeline.value.year
-
path = self.list.get_cursor()[0]
self.list.listStore.clear()
self.currentrecord = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]