[hamster-applet] fixed the stale selection issues
- From: Toms Baugis <tbaugis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hamster-applet] fixed the stale selection issues
- Date: Fri, 21 May 2010 13:46:22 +0000 (UTC)
commit 6b3d222772e235596e1984cc7356b61a9dca8edb
Author: Toms Bauģis <toms baugis gmail com>
Date: Fri May 21 14:45:53 2010 +0100
fixed the stale selection issues
data/overview.ui | 2 +-
data/overview_totals.ui | 1 -
src/hamster/charting.py | 6 +-----
src/hamster/overview.py | 1 +
src/hamster/overview_totals.py | 7 ++-----
5 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/data/overview.ui b/data/overview.ui
index 1e9e0c2..5177e93 100644
--- a/data/overview.ui
+++ b/data/overview.ui
@@ -317,7 +317,7 @@
<property name="can_focus">True</property>
<property name="tab_hborder">8</property>
<property name="tab_vborder">4</property>
- <signal name="switch_page" handler="on_window_tabs_switch_page"/>
+ <signal name="switch_page" handler="on_window_tabs_switch_page" after="yes"/>
<child>
<object class="GtkAlignment" id="overview_tab">
<property name="visible">True</property>
diff --git a/data/overview_totals.ui b/data/overview_totals.ui
index 2da6ccc..51f9207 100644
--- a/data/overview_totals.ui
+++ b/data/overview_totals.ui
@@ -79,7 +79,6 @@
<child>
<object class="GtkEventBox" id="reports_box">
<property name="visible">True</property>
- <signal name="expose_event" handler="on_reports_box_expose_event"/>
<child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
diff --git a/src/hamster/charting.py b/src/hamster/charting.py
index 111e749..ceee57e 100644
--- a/src/hamster/charting.py
+++ b/src/hamster/charting.py
@@ -131,10 +131,6 @@ class Chart(graphics.Scene):
def plot(self, keys, data):
- if data == self.data:
- self.show()
- self.redraw()
- return
self.data = data
bars = dict([(bar.key, bar.normalized) for bar in self.bars])
@@ -175,7 +171,7 @@ class Chart(graphics.Scene):
def on_enter_frame(self, scene, context):
# adjust sizes and positions on redraw
-
+
self.find_colors()
self.plot_area.y = 0
diff --git a/src/hamster/overview.py b/src/hamster/overview.py
index bc641f6..8aa8e9b 100644
--- a/src/hamster/overview.py
+++ b/src/hamster/overview.py
@@ -325,6 +325,7 @@ class Overview(object):
elif pagenum == 1:
self.get_widget('remove').set_sensitive(False)
self.get_widget('edit').set_sensitive(False)
+ self.reports.do_charts()
def on_add_clicked(self, button):
diff --git a/src/hamster/overview_totals.py b/src/hamster/overview_totals.py
index ea1bc3a..1c8de34 100644
--- a/src/hamster/overview_totals.py
+++ b/src/hamster/overview_totals.py
@@ -111,16 +111,13 @@ class TotalsBox(gtk.VBox):
self.selected_tags.append(key)
self.calculate_totals()
self.do_charts()
-
-
- def on_reports_box_expose_event(self, box, someth):
- self.do_charts()
+
def search(self, start_date, end_date, facts):
self.facts = facts
self.category_sums, self.activity_sums, self.tag_sums = [], [], []
self.selected_categories, self.selected_activities, self.selected_tags = [], [], []
- self.category_chart.bars_selected, self.activity_chart.bars_selected, self.tag_chart.bars_selected = [], [], []
+ self.category_chart.selected_keys, self.activity_chart.selected_keys, self.tag_chart.selected_keys = [], [], []
self.start_date = start_date
self.end_date = end_date
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]