Moving to use ContextMenu

This commit is contained in:
2022-10-25 23:27:21 -05:00
parent efa42a301c
commit 9697e8ca16
16 changed files with 154 additions and 466 deletions

View File

@@ -5,7 +5,7 @@
"version": "0.0.1",
"support": "",
"requests": {
"ui_target": "context_menu",
"ui_target": "context_menu_plugins",
"pass_fm_events": "true"
}
}

View File

@@ -70,12 +70,11 @@ class Plugin(PluginBase):
def generate_reference_ui_element(self):
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(f"{self.path}/../../icons/video.png", 16, 16, True)
icon = Gtk.Image.new_from_pixbuf(pixbuf)
button = Gtk.Button(label=self.name)
button.set_image(icon)
button.connect("button-release-event", self._show_thumbnailer_page)
return button
item = Gtk.ImageMenuItem("Delete")
item.set_image( icon )
item.connect("activate", self._show_thumbnailer_page)
item.set_always_show_image(True)
return item
@threaded