diff options
author | Jon Lund Steffensen <jonlst@gmail.com> | 2014-04-11 00:26:57 +0200 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2014-04-11 00:26:57 +0200 |
commit | 9426e9fba038a3b5076ed92dbe538451de8725f2 (patch) | |
tree | 3e365f40c4eb14b116f67f2496330d9fbd105cfa /src/redshift-gtk/statusicon.py | |
parent | Update po files from source (diff) | |
download | redshift-ng-9426e9fba038a3b5076ed92dbe538451de8725f2.tar.gz redshift-ng-9426e9fba038a3b5076ed92dbe538451de8725f2.tar.bz2 redshift-ng-9426e9fba038a3b5076ed92dbe538451de8725f2.tar.xz |
redshift-gtk: Fix crash when toggling state using the status icon
Diffstat (limited to 'src/redshift-gtk/statusicon.py')
-rw-r--r-- | src/redshift-gtk/statusicon.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py index 5685f08..08f28ef 100644 --- a/src/redshift-gtk/statusicon.py +++ b/src/redshift-gtk/statusicon.py @@ -79,7 +79,7 @@ class RedshiftStatusIcon(object): # Add toggle action self.toggle_item = Gtk.CheckMenuItem.new_with_label(_('Enabled')) - self.toggle_item.connect('activate', self.toggle_cb) + self.toggle_item.connect('activate', self.toggle_item_cb) self.status_menu.append(self.toggle_item) # Add suspend menu @@ -215,6 +215,10 @@ class RedshiftStatusIcon(object): self.status_icon, button, time) def toggle_cb(self, widget, data=None): + self.remove_suspend_timer() + self.child_toggle_status() + + def toggle_item_cb(self, widget, data=None): # Only toggle if a change from current state was requested if self.is_enabled() != widget.get_active(): self.remove_suspend_timer() |