[gnome-shell] dateMenu: Watch for a resume, and update the clock



commit c714a66ba3a7bf20a9d85e624c9f43ea1e6b9dd5
Author: Colin Walters <walters verbum org>
Date:   Fri Aug 12 10:06:19 2011 -0400

    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

 js/ui/dateMenu.js |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js
index a48fde7..edad21e 100644
--- a/js/ui/dateMenu.js
+++ b/js/ui/dateMenu.js
@@ -14,6 +14,7 @@ const Main = imports.ui.main;
 const PanelMenu = imports.ui.panelMenu;
 const PopupMenu = imports.ui.popupMenu;
 const Calendar = imports.ui.calendar;
+const UPowerGlib = imports.gi.UPowerGlib;
 
 // in org.gnome.desktop.interface
 const CLOCK_FORMAT_KEY        = 'clock-format';
@@ -142,6 +143,10 @@ DateMenuButton.prototype = {
         this._desktopSettings.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
         this._updateClockAndDate();
     },



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]