How do I make the launcher progress bar work with my application?
Solution 1:
The .desktop file has to be installed in the location where the bamf
library knows about it.
You should be able to test by copying the built .desktop file (which should be created from the .desktop.in), into your ~/.local/share/applications
folder, and running update-desktop-database ~/.local/share/applications
, though running this command may not be needed if your application does not handle any MIME types.
The difference between the .desktop and .desktop.in is that the .desktop.in is set up for being translated, and is processed by intltool during build, to have the translations inserted, creating the .desktop file from the .desktop.in file.
Also I just noticed a typo in your code:
self.launcher = Unity.LauncherEntry.get_for_desktop_id("test.destkop")
Notice the "destkop" vs. "desktop" that it should be. Perhaps this is it, if it's not a re-typing error. Assuming your code is actually being run, this is a problem. If it isn't run, then that's the problem. You can add a print('Integrating with launcher')
to the add_launcher_integration function to see. It should appear on the terminal when run.