[gnome-shell] dash: reload favorites when the installed app change
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] dash: reload favorites when the installed app change
- Date: Sat, 31 Aug 2013 16:55:33 +0000 (UTC)
commit e26a6ea71b8b97efc6e6cd5202d0aacaab27b0c9
Author: Giovanni Campagna <gcampagn redhat com>
Date: Tue Aug 27 14:00:26 2013 +0200
dash: reload favorites when the installed app change
Force a reload of the favorite system, to pick apps that were
uninstalled.
https://bugzilla.gnome.org/show_bug.cgi?id=706878
js/ui/appFavorites.js | 6 +++---
js/ui/dash.js | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js
index 2c572d0..b389621 100644
--- a/js/ui/appFavorites.js
+++ b/js/ui/appFavorites.js
@@ -14,15 +14,15 @@ const AppFavorites = new Lang.Class({
_init: function() {
this._favorites = {};
global.settings.connect('changed::' + this.FAVORITE_APPS_KEY, Lang.bind(this, this._onFavsChanged));
- this._reload();
+ this.reload();
},
_onFavsChanged: function() {
- this._reload();
+ this.reload();
this.emit('changed');
},
- _reload: function() {
+ reload: function() {
let ids = global.settings.get_strv(this.FAVORITE_APPS_KEY);
let appSys = Shell.AppSystem.get_default();
let apps = ids.map(function (id) {
diff --git a/js/ui/dash.js b/js/ui/dash.js
index 03ceb82..3e45c32 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -423,7 +423,10 @@ const Dash = new Lang.Class({
this._appSystem = Shell.AppSystem.get_default();
- this._appSystem.connect('installed-changed', Lang.bind(this, this._queueRedisplay));
+ this._appSystem.connect('installed-changed', Lang.bind(this, function() {
+ AppFavorites.getAppFavorites().reload();
+ his._queueRedisplay();
+ }));
AppFavorites.getAppFavorites().connect('changed', Lang.bind(this, this._queueRedisplay));
this._appSystem.connect('app-state-changed', Lang.bind(this, this._queueRedisplay));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]