dateMenu: Watch for a resume, and update the clock
Otherwise it can be very out of date. https://bugzilla.gnome.org/show_bug.cgi?id=656403
This commit is contained in:
parent
d80b7be6ca
commit
c714a66ba3
@ -14,6 +14,7 @@ const Main = imports.ui.main;
|
|||||||
const PanelMenu = imports.ui.panelMenu;
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Calendar = imports.ui.calendar;
|
const Calendar = imports.ui.calendar;
|
||||||
|
const UPowerGlib = imports.gi.UPowerGlib;
|
||||||
|
|
||||||
// in org.gnome.desktop.interface
|
// in org.gnome.desktop.interface
|
||||||
const CLOCK_FORMAT_KEY = 'clock-format';
|
const CLOCK_FORMAT_KEY = 'clock-format';
|
||||||
@ -142,6 +143,10 @@ DateMenuButton.prototype = {
|
|||||||
this._desktopSettings.connect('changed', Lang.bind(this, this._updateClockAndDate));
|
this._desktopSettings.connect('changed', Lang.bind(this, this._updateClockAndDate));
|
||||||
this._clockSettings.connect('changed', Lang.bind(this, this._updateClockAndDate));
|
this._clockSettings.connect('changed', Lang.bind(this, this._updateClockAndDate));
|
||||||
|
|
||||||
|
// https://bugzilla.gnome.org/show_bug.cgi?id=655129
|
||||||
|
this._upClient = new UPowerGlib.Client();
|
||||||
|
this._upClient.connect('notify-resume', Lang.bind(this, this._updateClockAndDate));
|
||||||
|
|
||||||
// Start the clock
|
// Start the clock
|
||||||
this._updateClockAndDate();
|
this._updateClockAndDate();
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user