Refactor: Use private instance methods instead of prefixing with _

This commit is contained in:
June 2023-01-22 20:35:13 +01:00
commit e07411f9fd
No known key found for this signature in database
GPG key ID: 094C2AC34192FA11
2 changed files with 21 additions and 21 deletions

View file

@ -21,15 +21,15 @@ var PrefsBoxOrderItemRow = GObject.registerClass({
constructor(params = {}, item) {
super(params);
this._associateItem(item);
this._configureMenu();
this.#associateItem(item);
this.#configureMenu();
}
/**
* Associate `this` with an item.
* @param {String} item
*/
_associateItem(item) {
#associateItem(item) {
this.item = item;
// Set `this._item_name_display_label` to something nicer, if the
@ -42,7 +42,7 @@ var PrefsBoxOrderItemRow = GObject.registerClass({
/**
* Configure the menu.
*/
_configureMenu() {
#configureMenu() {
let menu = new Gio.Menu();
menu.append("Forget", `prefsBoxOrderItemRow-${this.item}.forget`);
this._menu_button.set_menu_model(menu);