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:
parent
4d773a5ce9
commit
bf2d012e40
@ -1501,8 +1501,8 @@ var FolderIcon = GObject.registerClass({
|
||||
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
||||
this._folder.connect('changed', this._redisplay.bind(this));
|
||||
this._redisplay();
|
||||
this._folder.connect('changed', this._sync.bind(this));
|
||||
this._sync();
|
||||
}
|
||||
|
||||
_onDestroy() {
|
||||
@ -1617,7 +1617,7 @@ var FolderIcon = GObject.registerClass({
|
||||
this.emit('name-changed');
|
||||
}
|
||||
|
||||
_redisplay() {
|
||||
_sync() {
|
||||
this._updateName();
|
||||
this.visible = this.view.getAllItems().length > 0;
|
||||
this.icon.update();
|
||||
@ -2440,7 +2440,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
||||
Main.uiGroup.add_actor(this.actor);
|
||||
}
|
||||
|
||||
_redisplay() {
|
||||
_rebuildMenu() {
|
||||
this.removeAll();
|
||||
|
||||
let windows = this._source.app.get_windows().filter(
|
||||
@ -2557,7 +2557,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu {
|
||||
}
|
||||
|
||||
popup(_activatingButton) {
|
||||
this._redisplay();
|
||||
this._rebuildMenu();
|
||||
this.open();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user