From 7e9886cd68be7c9a5ebb47eef93253bb006814b0 Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Sun, 30 Jul 2017 20:16:50 -0700 Subject: controller: Emit signal when stopped --- src/redshift-gtk/statusicon.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/redshift-gtk/statusicon.py') diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py index 9623a14..1dd8970 100644 --- a/src/redshift-gtk/statusicon.py +++ b/src/redshift-gtk/statusicon.py @@ -152,6 +152,7 @@ class RedshiftStatusIcon(object): 'temperature-changed', self.temperature_change_cb) self._controller.connect('location-changed', self.location_change_cb) self._controller.connect('error-occured', self.error_occured_cb) + self._controller.connect('stopped', self.controller_stopped_cb) # Set info box text self.change_inhibited(self._controller.inhibited) @@ -278,6 +279,10 @@ class RedshiftStatusIcon(object): # Quit when the model dialog is closed sys.exit(-1) + def controller_stopped_cb(self, controller): + """Callback when controlled is stopped successfully.""" + Gtk.main_quit() + # Update interface def change_inhibited(self, inhibited): """Change interface to new inhibition status.""" -- cgit v1.2.3-70-g09d2