appDisplay: Rename _redisplay() functions unrelated to BaseAppView

The _redisplay() function is usally used for subclasses of BaseAppView
which want to implement their own _redisplay() function, having that
function name in two classes which have nothing to do with BaseAppView
can be quite confusing. Make those names less confusing and call the
functions  _sync() and _rebuildMenu() instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1011
This commit is contained in:
Jonas Dreßler 2020-02-17 15:35:49 +01:00 committed by Florian Müllner
parent 4d773a5ce9
commit bf2d012e40

View File

@ -1501,8 +1501,8 @@ var FolderIcon = GObject.registerClass({
this.connect('destroy', this._onDestroy.bind(this)); this.connect('destroy', this._onDestroy.bind(this));
this._folder.connect('changed', this._redisplay.bind(this)); this._folder.connect('changed', this._sync.bind(this));
this._redisplay(); this._sync();
} }
_onDestroy() { _onDestroy() {
@ -1617,7 +1617,7 @@ var FolderIcon = GObject.registerClass({
this.emit('name-changed'); this.emit('name-changed');
} }
_redisplay() { _sync() {
this._updateName(); this._updateName();
this.visible = this.view.getAllItems().length > 0; this.visible = this.view.getAllItems().length > 0;
this.icon.update(); this.icon.update();
@ -2440,7 +2440,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
Main.uiGroup.add_actor(this.actor); Main.uiGroup.add_actor(this.actor);
} }
_redisplay() { _rebuildMenu() {
this.removeAll(); this.removeAll();
let windows = this._source.app.get_windows().filter( let windows = this._source.app.get_windows().filter(
@ -2557,7 +2557,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
} }
popup(_activatingButton) { popup(_activatingButton) {
this._redisplay(); this._rebuildMenu();
this.open(); this.open();
} }
}; };