[gnome-shell] appDisplay: Rename _redisplay() functions unrelated to BaseAppView



commit bf2d012e4095825c1a51c159ebdaa11f2989d549
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Mon Feb 17 15:35:49 2020 +0100

    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

 js/ui/appDisplay.js | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 4241bd7fb9..97bf72d6a8 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -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();
     }
 };


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