Skip to content

Watching for storage change in GUI in addon #3508

Answered by poncovka
ryncsn asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, you should be able to watch the AppliedPartitioning property of the Storage module. It would look like this:

# Connect a callback to the PropertiesChanged signal.
storage = STORAGE.get_proxy()
storage.PropertiesChanged.connect(callback)

# Check the changed properties in the callback.
def callback(interface, changed, invalid):
  if changed.get("AppliedPartitioning"):
    print("The partitioning has changed.")

The property returns an empty string or a DBus path to a checked and valid partitioning module, that will be used for the installation. This is also the partitioning that you should check for the LUKS devices.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ryncsn
Comment options

Answer selected by jkonecny12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants