Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking Changes Tracker #60

Open
linkfrg opened this issue Dec 10, 2024 · 10 comments
Open

Breaking Changes Tracker #60

linkfrg opened this issue Dec 10, 2024 · 10 comments
Labels

Comments

@linkfrg
Copy link
Owner

linkfrg commented Dec 10, 2024

This is a meta issue to track breaking changes in -git

If something is not working after an Ignis update, please read through the comments below first

@linkfrg linkfrg added the meta label Dec 10, 2024
@linkfrg linkfrg pinned this issue Dec 10, 2024
linkfrg added a commit that referenced this issue Dec 10, 2024
Repository owner locked and limited conversation to collaborators Dec 11, 2024
Repository owner deleted a comment from imxnasr Dec 11, 2024
@linkfrg
Copy link
Owner Author

linkfrg commented Dec 20, 2024

After 756ee85 Utils.DebounceTask.__call__() was removed, use the new Utils.DebounceTask.run() method instead

@linkfrg
Copy link
Owner Author

linkfrg commented Jan 6, 2025

#98 removes Options Service and brings the new OptionManager & Options API.
Migration guide is included in the first message.

@linkfrg
Copy link
Owner Author

linkfrg commented Jan 7, 2025

#103 removes Binding.target_property, use Binding.target_properties (list) instead

@linkfrg
Copy link
Owner Author

linkfrg commented Feb 11, 2025

After #146 logs are stored at $XDG_STATE_HOME/ignis/ignis.log (~/.local/state/ignis/ignis.log) instead of ~/.ignis/ignis.log

@linkfrg
Copy link
Owner Author

linkfrg commented Feb 15, 2025

#150: Utils.download_image() is no longer used by MprisPlayer and because of this it was removed.
Use Utils.read_file() & Utils.write_file() (or their async versions) as the replacement, Utils.read_file() supports loading from a URI too.

#150 is reverted

@linkfrg
Copy link
Owner Author

linkfrg commented Feb 21, 2025

#152 makes some functions asynchronous:

  • DBusProxy
    • new_async()
    • get_dbus_property_async()
    • set_dbus_property_async()
  • BluetoothDevice
    • connect_to()
    • disconnect_from()
  • WifiAccessPoint
    • commit_changes_async()
    • connect_to()
    • connect_to_graphical()
    • disconnect_from()
    • forget()
  • EthernetDevice
    • connect_to()
    • disconnect_from()
  • VpnConnection
    • connect_to()
    • disconnect_from()
  • WifiDevice
    • scan()
  • Utils.exec_sh_async()
  • Utils.read_file_async()
  • Utils.write_file_async()
  • Widget.FileDialog.open_dialog()

Use await or asyncio.create_task() to call them. More info in docs.
Plus, the minimal required version of PyGObject is now 3.50.0

@linkfrg
Copy link
Owner Author

linkfrg commented Feb 26, 2025

#157

Since properties have explicit types, their value can only be of the that defined type because it is now controlled on the GObject/C side, which doesn't support dynamic types.

It means you can't set None as a value for a property which type is bool/int/str/float or GObject/GType.
If you use .bind(), you have to add an additional check if the new value is None.

For example, it affects Widget.Scale.value and your transform function should include that check:
stream.bind("volume", transform=lambda vol: vol or 0)

Otherwise, an exception like this will be raised:
TypeError: could not convert None to type 'gdouble' when setting property 'IgnisScale.value'

@linkfrg
Copy link
Owner Author

linkfrg commented Feb 28, 2025

#171

#171 affects Hyprland Service.

Migration Guide:

  1. Since these objects are not dictionaries anymore, you have to get properties like usual class attributes:
# Old
hyprland.active_workspace["id"]
# New
hyprland.active_workspace.id
  1. HyprlandService.kb_layout is removed, use HyprlandService.main_keyboard.active_keymap instead.
  2. HyprlandService.switch_kb_layout() is removed, use HyprlandService.main_keyboard.switch_layout() instead (to restore the old functionality pass "next" as an argument to it).
  3. HyprlandService.workspaces will not be notified on the active workspace change anymore.
    If you want to restore the old functionality, use bind_many():
# Old
hyprland.bind(
    "workspaces",
     transform=lambda value: [WorkspaceButton(i) for i in value],
)
# New
hyprland.bind_many(
    ["workspaces", "active_workspace"],
    transform=lambda workspaces, *_: [
        WorkspaceButton(i) for i in workspaces
    ],
)

@linkfrg
Copy link
Owner Author

linkfrg commented Mar 6, 2025

#184

Methods of some services now are synchronous and have their explicit async versions.

Affected methods:

  • MprisPlayer

    • next()
    • previous()
    • pause()
    • play()
    • play_pause()
    • stop()
    • seek()
  • SystemTrayItem

    • activate()
    • secondary_activate()
    • context_menu()
    • scroll()
  • SystemdUnit

    • start()
    • stop()
    • restart()

This also affects some property setters:

BacklightDevice.brightness setter is now synchronous, you can use its asynchronous version which is available as usual method: set_brightness_async(). Same for BacklightService.brightness and MprisPlayer.position.

@linkfrg
Copy link
Owner Author

linkfrg commented Mar 8, 2025

45a27f4

Now Utils.FileMonitor.flags uses Gio.FileMonitorFlags, not str

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant