[hamster-applet] allow adding fact when no row is selected
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] allow adding fact when no row is selected
- Date: Sat, 16 Jan 2010 05:15:15 +0000 (UTC)
commit b2f43f68014adc428027764bc66e5a6b922df3ab
Author: Toms Bauģis <toms baugis gmail com>
Date: Sat Jan 16 05:13:00 2010 +0000
allow adding fact when no row is selected
hamster/overview.py | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/hamster/overview.py b/hamster/overview.py
index 4091d88..0ec569b 100644
--- a/hamster/overview.py
+++ b/hamster/overview.py
@@ -323,9 +323,8 @@ class Overview(object):
def on_add_clicked(self, button):
fact = self.fact_tree.get_selected_fact()
if not fact:
- return
-
- if isinstance(fact, dt.date):
+ selected_date = self.start_date
+ elif isinstance(fact, dt.date):
selected_date = fact
else:
selected_date = fact["date"]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]