Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Bar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ Item {
? pluginRegistry.isEnabled(id) : null
const desiredSpecs = v1PluginSpecs(replacedProviderIds,
installed === true ? { id: id, region: targetRegion } : null)
if (!layoutStateController.reconcileV1PluginGroups(desiredSpecs))
if (!layoutStateController.v2Mode
&& !layoutStateController.reconcileV1PluginGroups(desiredSpecs))
return false

if (installed === true && pluginRegistry
Expand Down Expand Up @@ -860,7 +861,8 @@ Item {
if (!Util.isPlainObject(config.bar)) config.bar = {}
config.bar.layout = JSON.parse(JSON.stringify(previousLayout))
})
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (!layoutStateController.v2Mode)
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (registryWasEnabled === false && pluginRegistry
&& typeof pluginRegistry.setEnabled === "function")
pluginRegistry.setEnabled(id, false)
Expand All @@ -880,7 +882,8 @@ Item {
? Object.keys(stateValues) : []
const previousStates = groups.length > 0
? widgetGroupVariantStates(groups) : null
if (!layoutStateController.reconcileV1PluginGroups(desiredSpecs))
if (!layoutStateController.v2Mode
&& !layoutStateController.reconcileV1PluginGroups(desiredSpecs))
return false
shell.mutateShellConfig(function(config) {
if (!Util.isPlainObject(config.bar)) config.bar = {}
Expand All @@ -892,7 +895,8 @@ Item {
if (!Util.isPlainObject(config.bar)) config.bar = {}
config.bar.layout = JSON.parse(JSON.stringify(previousLayout))
})
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (!layoutStateController.v2Mode)
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (previousStates) setWidgetGroupVariantStates(previousStates)
return false
}
Expand Down
12 changes: 8 additions & 4 deletions hancore.shibumi.bar/Bar.qml
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,8 @@ Item {
? pluginRegistry.isEnabled(id) : null
const desiredSpecs = v1PluginSpecs(replacedProviderIds,
installed === true ? { id: id, region: targetRegion } : null)
if (!layoutStateController.reconcileV1PluginGroups(desiredSpecs))
if (!layoutStateController.v2Mode
&& !layoutStateController.reconcileV1PluginGroups(desiredSpecs))
return false

if (installed === true && pluginRegistry
Expand Down Expand Up @@ -860,7 +861,8 @@ Item {
if (!Util.isPlainObject(config.bar)) config.bar = {}
config.bar.layout = JSON.parse(JSON.stringify(previousLayout))
})
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (!layoutStateController.v2Mode)
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (registryWasEnabled === false && pluginRegistry
&& typeof pluginRegistry.setEnabled === "function")
pluginRegistry.setEnabled(id, false)
Expand All @@ -880,7 +882,8 @@ Item {
? Object.keys(stateValues) : []
const previousStates = groups.length > 0
? widgetGroupVariantStates(groups) : null
if (!layoutStateController.reconcileV1PluginGroups(desiredSpecs))
if (!layoutStateController.v2Mode
&& !layoutStateController.reconcileV1PluginGroups(desiredSpecs))
return false
shell.mutateShellConfig(function(config) {
if (!Util.isPlainObject(config.bar)) config.bar = {}
Expand All @@ -892,7 +895,8 @@ Item {
if (!Util.isPlainObject(config.bar)) config.bar = {}
config.bar.layout = JSON.parse(JSON.stringify(previousLayout))
})
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (!layoutStateController.v2Mode)
layoutStateController.reconcileV1PluginGroups(previousSpecs)
if (previousStates) setWidgetGroupVariantStates(previousStates)
return false
}
Expand Down
4 changes: 3 additions & 1 deletion hancore.shibumi.control-center/ControlCenterPanel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,9 @@ ShibumiPanel {
const changed = setPluginBarWidgetEnabled(id, enabled === true, section)
if (!changed)
pluginActionError = enabled === true
? "V1 has no free extension slot. Remove an active added plugin or free a V1 extension slot under Bars."
? (v2LayoutActive
? "The plugin could not be activated in the active bar layout."
: "V1 has no free extension slot. Remove an active added plugin or free a V1 extension slot under Bars.")
: "The plugin could not be removed from the active bar."
return changed
}
Expand Down