Now, we get to the part where we can make the management functionality created earlier accessible to the user in the visual user interface.
Some of the functionality we created in this chapter is intrinsically bound to only one layer, so it makes sense to make these available directly by right-clicking on the desired layer to operate on. Such a feature is only specific to the application we are currently making, so let's define this right-click menu in the app/dialogues.py
module. Since Tkinter already has such a nicely formatted popup menu widget, with easy methods for adding items and commands, all we need to do is subclass it. Vector and raster layers will each get their own menu, but both will have in common items called as Rename, Save as, and Properties. To give them better visuals, find the three .png
images with the same names as each of these items so we can assign them to the menu items, saving them...