~ubuntu-branches/ubuntu/lucid/hamster-applet/lucid-proposed

« back to all changes in this revision

Viewing changes to src/hamster/preferences.py

  • Committer: Bazaar Package Importer
  • Author(s): Krzysztof Klimonda
  • Date: 2010-09-06 01:31:34 UTC
  • mfrom: (1.2.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100906013134-wtzn81wdx5en03cn
Tags: 2.30.2-0ubuntu1
* New upstream release. (LP: #629609)
* Fixes a bug that made hamster-applet always use some of the CPU,
  draining battery. (LP: #620113)

Show diffs side-by-side

added added

removed removed

Lines of Context:
269
269
        self.get_widget("idle_track").set_active(conf.get("enable_timeout"))
270
270
        self.get_widget("notify_interval").set_value(conf.get("notify_interval"))
271
271
        self.get_widget("keybinding").set_text(conf.get("keybinding"))
 
272
 
272
273
        self.get_widget("notify_on_idle").set_active(conf.get("notify_on_idle"))
 
274
        self.get_widget("notify_on_idle").set_sensitive(conf.get("notify_interval") <=120)
 
275
 
273
276
        self.get_widget("workspace_tracking_name").set_active("name" in conf.get("workspace_tracking"))
274
277
        self.get_widget("workspace_tracking_memory").set_active("memory" in conf.get("workspace_tracking"))
275
278
 
448
451
        #look for dupes
449
452
        activities = runtime.storage.get_activities(category_id)
450
453
        for activity in activities:
451
 
            if activity['name'].lower() == new_text.lower():
452
 
                if id == -1: # that was a new category
 
454
            if id != activity['id'] and activity['name'].lower() == new_text.lower():
 
455
                if id == -1: # that was a new activity
453
456
                    self.activity_store.remove(model.get_iter(path))
454
457
                self.select_activity(activity['id'])
455
458
                return False
771
774
 
772
775
    def on_day_start_changed(self, widget):
773
776
        day_start = self.day_start.get_time()
774
 
        if not day_start:
 
777
        if day_start is None:
775
778
            return
776
779
 
777
780
        day_start = day_start.hour * 60 + day_start.minute