Use GtkFileChooserDialog only when we need previews, default to
NativeFileChooser otherwise.
GtkFileChooserDialogs have a long list of issues, so lets only use it
if we gain something from it.
Flatpak should only run NativeFileChoosers because its sandboxed and
this is needed for security purposes. As a result of that, Flatpak Users
dont have image previews in the FileOpenDialogs
Refactor all FileChoosers for a more simple approach when we use them
Add a new SendFileDialog, so we dont have to put widgets into the FileChooser
which forces non-native Dialogs.
* rename the remove_plugin function to uninstall_plugin because it
deletes files on the disc and uninstall is the label of the button which
triggers this function
* added a new remove_plugin function, which deactivates the plugin (if
needed), removes it from the list of managed plugins and deletes the
contents of sys.modules
- remove gui extension point on close, to remove the reference the plugin manager holds to the Class.
- reduce scope of var that holds reference to Gtk.Builder(). We have to be careful with
Gtk.Builder, because it can hold a reference to our Class (methods bound to signals) which creates a reference cycle
which python is not able to detect. Hence neither Gtk.Builder nor our Class are garbage collected.
Why this is not detected as a reference cylce is unclear at the moment.
There are two approaches to circumvent the problem:
1. we lose our reference to Gtk.Builder when closing the window, which lets python garbage
collect the builder, afterwards it can garbage collect our class.
2. we reduce the scope of the var that holds a reference to Gtk.Builder, so that the builder
can be garbage collected at the end of __init__.
I chose to reduce the scope because the builder is not needed class wide.