Fix regressions in the item displays
Fix displaying documents in the document browse and refreshing the selection when the results have changed. Make sure we are passing the appropriate flag to _redisplay() in GenericDisplay. Make sure we set this._appsStale to true if there was a change in the applications set. Don't call _refreshCache() from the AppDisplay constructor. Don't short-circuit the call to _refreshCache() from _redisplay() on initial load. Rename _redisplayFull() to recreateDisplayItems() and remove adding an actor to the actual result list in _addDisplayItem() because we redo adding the actors to the list in _redisplayReordering() anyway to ensure that we add them in the right order. Based on a patch from Colin Walters.
This commit is contained in:
@ -186,23 +186,21 @@ AppDisplay.prototype = {
|
||||
this._appsStale = true;
|
||||
this._appSystem.connect('installed-changed', Lang.bind(this, function(appSys) {
|
||||
this._appsStale = true;
|
||||
this._redisplay(0);
|
||||
this._redisplayMenus();
|
||||
this._redisplay(GenericDisplay.RedisplayFlags.NONE);
|
||||
}));
|
||||
this._appSystem.connect('favorites-changed', Lang.bind(this, function(appSys) {
|
||||
this._redisplay(0);
|
||||
this._appsStale = true;
|
||||
this._redisplay(GenericDisplay.RedisplayFlags.NONE);
|
||||
}));
|
||||
this._appMonitor.connect('app-added', Lang.bind(this, function(monitor) {
|
||||
this._redisplay(0);
|
||||
this._appsStale = true;
|
||||
this._redisplay(GenericDisplay.RedisplayFlags.NONE);
|
||||
}));
|
||||
this._appMonitor.connect('app-removed', Lang.bind(this, function(monitor) {
|
||||
this._redisplay(0);
|
||||
this._appsStale = true;
|
||||
this._redisplay(GenericDisplay.RedisplayFlags.NONE);
|
||||
}));
|
||||
|
||||
// Load the apps now so it doesn't slow down the first
|
||||
// transition into the Overview
|
||||
this._refreshCache();
|
||||
|
||||
this._focusInMenus = true;
|
||||
this._activeMenuIndex = -1;
|
||||
this._activeMenu = null;
|
||||
@ -210,7 +208,6 @@ AppDisplay.prototype = {
|
||||
this._menuDisplay = new Big.Box({ orientation: Big.BoxOrientation.VERTICAL,
|
||||
spacing: MENU_SPACING
|
||||
});
|
||||
this._redisplayMenus();
|
||||
|
||||
this.connect('expanded', Lang.bind(this, function (self) {
|
||||
this._filterReset();
|
||||
@ -303,7 +300,7 @@ AppDisplay.prototype = {
|
||||
this._activeMenuApps = this._appSystem.get_applications_for_menu(id);
|
||||
}
|
||||
}
|
||||
this._redisplay(true);
|
||||
this._redisplay(GenericDisplay.RedisplayFlags.FULL);
|
||||
}));
|
||||
this._menuDisplay.append(display.actor, 0);
|
||||
},
|
||||
@ -361,6 +358,7 @@ AppDisplay.prototype = {
|
||||
this._addApp(app);
|
||||
}
|
||||
}
|
||||
this._redisplayMenus();
|
||||
}
|
||||
|
||||
this._appsStale = false;
|
||||
|
Reference in New Issue
Block a user