diff options
author | Andreev Alexander <andreevlex.as@gmail.com> | 2016-09-05 23:14:53 +0300 |
---|---|---|
committer | Jon Lund Steffensen <jonlst@gmail.com> | 2016-10-15 12:08:49 -0400 |
commit | 1fb32756055f9d70bdf1c6031a18c9981f7cce68 (patch) | |
tree | 96125f3e5ff471156daf11aa8b4a445f6967fbbd /src/redshift-gtk/statusicon.py | |
parent | Merge pull request #308 from Anarky/master (diff) | |
download | redshift-ng-1fb32756055f9d70bdf1c6031a18c9981f7cce68.tar.gz redshift-ng-1fb32756055f9d70bdf1c6031a18c9981f7cce68.tar.bz2 redshift-ng-1fb32756055f9d70bdf1c6031a18c9981f7cce68.tar.xz |
add display of color temperature and period in the tooltip status icon
Diffstat (limited to 'src/redshift-gtk/statusicon.py')
-rw-r--r-- | src/redshift-gtk/statusicon.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/redshift-gtk/statusicon.py b/src/redshift-gtk/statusicon.py index 86897c4..9d9835d 100644 --- a/src/redshift-gtk/statusicon.py +++ b/src/redshift-gtk/statusicon.py @@ -474,15 +474,23 @@ class RedshiftStatusIcon(object): def change_temperature(self, temperature): '''Change interface to new temperature''' self.temperature_label.set_markup('<b>{}:</b> {}K'.format(_('Color temperature'), temperature)) + self.update_tooltip_text() def change_period(self, period): '''Change interface to new period''' self.period_label.set_markup('<b>{}:</b> {}'.format(_('Period'), period)) + self.update_tooltip_text() def change_location(self, location): '''Change interface to new location''' self.location_label.set_markup('<b>{}:</b> {}, {}'.format(_('Location'), *location)) + def update_tooltip_text(self): + '''Update text of tooltip status icon ''' + if not appindicator: + self.status_icon.set_tooltip_text('{}: {}K, {}: {}'.format( + _('Color temperature'), self._controller.temperature, + _('Period'), self._controller.period)) def autostart_cb(self, widget, data=None): '''Callback when a request to toggle autostart is made''' |