Skip to content

1.0.2

Compare
Choose a tag to compare
@JoshStrobl JoshStrobl released this 02 Jan 17:21

Changelog:

  • Implement KeyFile-based desktop file support to support non-Application type desktop files (e.g. Type=Directory/Link), which cannot be handled by DesktopAppInfo.
    • To do this, we use GLib.KeyFile to load the file from its path, then check for the Icon and Name. If we fail to get an Icon and use a generic fallback. If we're successful, we set an icon name rather than attempt to load the icon, which saves us code by leveraging functionality in our DesktopItem.
    • For the name, we will attempt to get the "Name" key otherwise we set it to the display name of the file.
    • During launch of an item, we'll now check if keyfile is set. If it's set, we'll attempt to get the URL. If we get the URL, which should be set for Directory and Link types, we'll launch using the default handler for it.
  • Implemented a set_icon_from_name function which will attempt to load the pixbuf for the icon name provided. Refactored pixbuf fetching from the set_icon function into its own set_icon_from_iconinfo in case we need it down the road.
  • More aggressively prevent hidden files from being added. Since in some scenarios we won't have the FileInfo yet or we're dealing with a weird scenario like gedit saving temporarily to a dot file before moving it, we're doing it based on the basename of the file.
  • Use display name instead of label_name for file tracking in the file_items, since label_name is more likely to change.