[hamster-applet] refresh input text label on updates
- From: Toms Baugis <tbaugis src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] refresh input text label on updates
- Date: Thu, 19 Nov 2009 22:04:56 +0000 (UTC)
commit 36c7c444bb7480b415bbc24504de8851c7178fd7
Author: Toms Bauģis <toms baugis gmail com>
Date: Thu Nov 19 19:22:18 2009 +0000
refresh input text label on updates
hamster/applet.py | 24 +++++++++++-------------
1 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/hamster/applet.py b/hamster/applet.py
index 8390cf2..c7379dc 100755
--- a/hamster/applet.py
+++ b/hamster/applet.py
@@ -339,10 +339,21 @@ class HamsterApplet(object):
stuff.format_duration(duration, False))
self._gui.get_object('stop_tracking').set_sensitive(1);
+
+ label = self.last_activity['name']
+ if self.last_activity['category'] != _("Unsorted"):
+ label += "@%s" % self.last_activity['category']
+ self.new_name.set_text(label)
+
+ self.new_name.select_region(0, -1)
+ self._gui.get_object("more_info_label").hide()
else:
label = "%s" % _(u"No activity")
self.button.set_text(label, None)
self._gui.get_object('stop_tracking').set_sensitive(0);
+
+ self.new_name.set_text('')
+ self._gui.get_object("more_info_label").show()
def check_user(self):
@@ -454,19 +465,6 @@ class HamsterApplet(object):
"""main window display and positioning"""
self.button.set_active(is_active)
- if self.last_activity and self.last_activity["end_time"] is None:
- label = self.last_activity['name']
- if self.last_activity['category'] != _("Unsorted"):
- label += "@%s" % self.last_activity['category']
- self.new_name.set_text(label)
-
- self.new_name.select_region(0, -1)
- self._gui.get_object("more_info_label").hide()
- else:
- self.new_name.set_text('')
- self._gui.get_object("more_info_label").show()
-
-
if not is_active:
self.window.hide()
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]