pageIndicator: Add getter for current number of pages

Add a getter to PageIndicators to retrieve the number of pages
it currently displays.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271
This commit is contained in:
Georges Basile Stavracas Neto 2020-05-25 16:51:26 -03:00
parent 68203e7091
commit 1e77e6fc79

View File

@ -120,6 +120,10 @@ var PageIndicators = GObject.registerClass({
for (let i = 0; i < children.length; i++) for (let i = 0; i < children.length; i++)
this._updateIndicator(children[i], i); this._updateIndicator(children[i], i);
} }
get nPages() {
return this._nPages;
}
}); });
var AnimatedPageIndicators = GObject.registerClass( var AnimatedPageIndicators = GObject.registerClass(