billreminder r662 - in trunk: . src/gui src/gui/widgets
- From: ogmaciel svn gnome org
- To: svn-commits-list gnome org
- Subject: billreminder r662 - in trunk: . src/gui src/gui/widgets
- Date: Tue, 30 Sep 2008 00:14:40 +0000 (UTC)
Author: ogmaciel
Date: Tue Sep 30 00:14:40 2008
New Revision: 662
URL: http://svn.gnome.org/viewvc/billreminder?rev=662&view=rev
Log:
Added refresh method to Timeline and minor fixes.
Modified:
trunk/ChangeLog
trunk/src/gui/maindialog.py
trunk/src/gui/widgets/timeline.py
Modified: trunk/src/gui/maindialog.py
==============================================================================
--- trunk/src/gui/maindialog.py (original)
+++ trunk/src/gui/maindialog.py Tue Sep 30 00:14:40 2008
@@ -212,6 +212,7 @@
iface = get_dbus_interface(common.DBUS_INTERFACE, common.DBUS_PATH)
if iface:
iface.connect_to_signal("bill_edited", self.reloadTreeView)
+ iface.connect_to_signal("bill_edited", self.reloadTimeline)
iface.connect_to_signal("show_main_window", self.window.show)
self.iface = iface
timeout_add(2000, self._send_tray_hints)
@@ -429,6 +430,7 @@
self._update_statusbar()
# Reload records tree (something changed)
self.reloadTreeView()
+ self.reloadTimeline()
def edit_bill(self):
records = dialogs.edit_dialog(parent=self.window,
@@ -449,12 +451,14 @@
print str(e)
# Reload records tree (something changed)
self.reloadTreeView()
+ self.reloadTimeline()
def remove_bill(self):
try:
if self.actions.delete_bill(self.currentrecord.Id):
self.list.remove()
self._update_statusbar()
+ self.reloadTimeline()
except Exception, e:
print str(e)
@@ -651,6 +655,11 @@
return t
+ def reloadTimeline(self, *args):
+ print 'reloadtimeline'
+ self._bullet_cache = {}
+ self.timeline.refresh()
+
def on_timeline_cb(self, date):
# TODO: Improve tooltip
# TODO: Improve cache
Modified: trunk/src/gui/widgets/timeline.py
==============================================================================
--- trunk/src/gui/widgets/timeline.py (original)
+++ trunk/src/gui/widgets/timeline.py Tue Sep 30 00:14:40 2008
@@ -144,6 +144,11 @@
self.draw()
return False
+ def refresh(self):
+ self._bullets = {}
+ self._dist_dates()
+ self.queue_draw_area(0, 0, self.allocation.width, self.allocation.height)
+
def draw(self, redraw=False):
if self.orientation == gtk.ORIENTATION_HORIZONTAL:
self._hdraw(redraw)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]