hamster-applet r682 - trunk/hamster
- From: tbaugis svn gnome org
 
- To: svn-commits-list gnome org
 
- Subject: hamster-applet r682 - trunk/hamster
 
- Date: Thu, 29 Jan 2009 17:02:41 +0000 (UTC)
 
Author: tbaugis
Date: Thu Jan 29 17:02:41 2009
New Revision: 682
URL: http://svn.gnome.org/viewvc/hamster-applet?rev=682&view=rev
Log:
update activity input field only on toggle - 
this way the user input will not be rewritten on timeout.
possibly will also fix that bug where user complained about clipboard overwrite
Modified:
   trunk/hamster/applet.py
Modified: trunk/hamster/applet.py
==============================================================================
--- trunk/hamster/applet.py	(original)
+++ trunk/hamster/applet.py	Thu Jan 29 17:02:41 2009
@@ -411,7 +411,6 @@
             label = "%s %s" % (self.last_activity['name'], format_duration(duration))
             self.button.set_text(self.last_activity['name'], format_duration(duration))
             
-            self.glade.get_widget('current_activity').set_text(self.last_activity['name'])
             self.glade.get_widget('stop_tracking').set_sensitive(1);
         else:
             label = "%s" % _(u"No activity")
@@ -526,7 +525,9 @@
 
         self.load_day() # reload day each time before showing to avoid outdated last activity
         self.update_label() #update also label, otherwise we can get 1 minute difference in durations (due to timers refreshed once a minute)
-        
+
+        if self.last_activity: #reset value of current_activity input, maybe we have some leftovers there
+            self.glade.get_widget('current_activity').set_text(self.last_activity['name'])        
 
         label_geom = self.button.get_allocation()
         window_geom = self.window.get_allocation()
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]