Other: Mark AppIndicator/KStatusNotifierItem addition as broken

This commit is contained in:
Julian 2023-01-27 21:44:59 +01:00
parent 7b1c030325
commit ba373e9e49
Signed by: julian
GPG Key ID: 094C2AC34192FA11
2 changed files with 25 additions and 17 deletions

View File

@ -22,3 +22,4 @@ rules:
- argsIgnorePattern: "^_" - argsIgnorePattern: "^_"
globals: globals:
imports: readonly imports: readonly
log: readonly

View File

@ -136,24 +136,31 @@ class Extension {
// Handle the case where the new item is a // Handle the case where the new item is a
// AppIndicator/KStatusNotifierItem. // AppIndicator/KStatusNotifierItem.
// Note: This code is currently broken, since the extension
// providing AppIndicator/KStatusNotifierItems
// (appindicatorsupport@rgcjonas.gmail.com) doesn't give us an id on
// addition anymore and therefore we don't know which program/id the
// AppIndicator/KStatusNotifierItem belongs to.
// So just throw an error for now.
if (role.startsWith("appindicator-")) { if (role.startsWith("appindicator-")) {
switch (box) { throw new Error("AppIndicator/KStatusNotifierItem addition is currently broken.");
case "left": // switch (box) {
boxOrder = this.settings.get_strv("left-box-order"); // case "left":
this._appIndicatorKStatusNotifierItemManager.handleAppIndicatorKStatusNotifierItemItem(indicator.container, role, boxOrder, boxOrders); // boxOrder = this.settings.get_strv("left-box-order");
this.settings.set_strv("left-box-order", boxOrder); // this._appIndicatorKStatusNotifierItemManager.handleAppIndicatorKStatusNotifierItemItem(indicator.container, role, boxOrder, boxOrders);
break; // this.settings.set_strv("left-box-order", boxOrder);
case "center": // break;
boxOrder = this.settings.get_strv("center-box-order"); // case "center":
this._appIndicatorKStatusNotifierItemManager.handleAppIndicatorKStatusNotifierItemItem(indicator.container, role, boxOrder, boxOrders); // boxOrder = this.settings.get_strv("center-box-order");
this.settings.set_strv("center-box-order", boxOrder); // this._appIndicatorKStatusNotifierItemManager.handleAppIndicatorKStatusNotifierItemItem(indicator.container, role, boxOrder, boxOrders);
break; // this.settings.set_strv("center-box-order", boxOrder);
case "right": // break;
boxOrder = this.settings.get_strv("right-box-order"); // case "right":
this._appIndicatorKStatusNotifierItemManager.handleAppIndicatorKStatusNotifierItemItem(indicator.container, role, boxOrder, boxOrders, true); // boxOrder = this.settings.get_strv("right-box-order");
this.settings.set_strv("right-box-order", boxOrder); // this._appIndicatorKStatusNotifierItemManager.handleAppIndicatorKStatusNotifierItemItem(indicator.container, role, boxOrder, boxOrders, true);
break; // this.settings.set_strv("right-box-order", boxOrder);
} // break;
// }
} }
// Get the resolved box orders for all boxes. // Get the resolved box orders for all boxes.