[gnome-shell] system: Remove Install Updates & Restart



commit de8ca5c1b5770753fba2eaf2224094933801a6ed
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jun 11 14:47:37 2013 -0400

    system: Remove Install Updates & Restart
    
    This will eventually end up in a redesign of the "end session" dialog.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704368

 js/ui/status/system.js |   22 ----------------------
 1 files changed, 0 insertions(+), 22 deletions(-)
---
diff --git a/js/ui/status/system.js b/js/ui/status/system.js
index a5f5c7b..6a1f56a 100644
--- a/js/ui/status/system.js
+++ b/js/ui/status/system.js
@@ -78,10 +78,6 @@ const Indicator = new Lang.Class({
         this._updateLogout();
         this._updateLockScreen();
 
-        this._updatesFile = Gio.File.new_for_path('/var/lib/PackageKit/prepared-update');
-        this._updatesMonitor = this._updatesFile.monitor(Gio.FileMonitorFlags.NONE, null);
-        this._updatesMonitor.connect('changed', Lang.bind(this, this._updateInstallUpdates));
-
         // Whether shutdown is available or not depends on both lockdown
         // settings (disable-log-out) and Polkit policy - the latter doesn't
         // notify, so we update the menu item each time the menu opens or
@@ -133,17 +129,11 @@ const Indicator = new Lang.Class({
         this._lockScreenItem.actor.visible = allowLockScreen && LoginManager.canLock();
     },
 
-    _updateInstallUpdates: function() {
-        let haveUpdates = this._updatesFile.query_exists(null);
-        this._installUpdatesItem.actor.visible = haveUpdates && this._haveShutdown;
-    },
-
     _updateHaveShutdown: function() {
         this._session.CanShutdownRemote(Lang.bind(this,
             function(result, error) {
                 if (!error) {
                     this._haveShutdown = result[0];
-                    this._updateInstallUpdates();
                     this._updatePowerOff();
                 }
             }));
@@ -183,11 +173,6 @@ const Indicator = new Lang.Class({
         this.menu.addMenuItem(item);
         item.connect('activate', Lang.bind(this, this._onPowerOffActivate));
         this._powerOffItem = item;
-
-        item = new PopupMenu.PopupMenuItem(_("Install Updates & Restart"));
-        item.connect('activate', Lang.bind(this, this._onInstallUpdatesActivate));
-        this.menu.addMenuItem(item);
-        this._installUpdatesItem = item;
     },
 
     _onLockScreenActivate: function() {
@@ -209,13 +194,6 @@ const Indicator = new Lang.Class({
         this._session.LogoutRemote(0);
     },
 
-    _onInstallUpdatesActivate: function() {
-        Main.overview.hide();
-        Util.spawn(['pkexec', '/usr/libexec/pk-trigger-offline-update']);
-
-        this._session.RebootRemote();
-    },
-
     _openSessionWarnDialog: function(sessions) {
         let dialog = new ModalDialog.ModalDialog();
         let subjectLabel = new St.Label({ style_class: 'end-session-dialog-subject',


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