[hamster-applet] drag view date with us when zooming in and out
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] drag view date with us when zooming in and out
- Date: Tue, 13 Jul 2010 15:45:33 +0000 (UTC)
commit fbc51810e2936d3591198d56c66338456a03b739
Author: Toms Bauģis <toms baugis gmail com>
Date: Tue Jul 13 16:45:22 2010 +0100
drag view date with us when zooming in and out
src/hamster/overview.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/hamster/overview.py b/src/hamster/overview.py
index 6929ea1..3979de0 100644
--- a/src/hamster/overview.py
+++ b/src/hamster/overview.py
@@ -127,7 +127,7 @@ class Overview(object):
def on_timechart_new_range(self, chart, start_date, end_date):
self.start_date = start_date
self.end_date = end_date
- self.search()
+ self.apply_range_select()
def on_timechart_zoom_out_clicked(self, chart):
if (self.end_date - self.start_date < dt.timedelta(days=6)):
@@ -229,6 +229,12 @@ class Overview(object):
def apply_range_select(self):
+ if self.view_date < self.start_date:
+ self.view_date = self.start_date
+
+ if self.view_date > self.end_date:
+ self.view_date = self.end_date
+
self.search()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]