From d443a3c2509889533ca812c163056bace396b586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 14 Jun 2023 20:35:58 +0200 Subject: New upstream version 0.32.1 --- .../shotwell-transitions/shotwell-transitions.vala | 51 ++++++++-------------- 1 file changed, 19 insertions(+), 32 deletions(-) (limited to 'plugins/shotwell-transitions/shotwell-transitions.vala') diff --git a/plugins/shotwell-transitions/shotwell-transitions.vala b/plugins/shotwell-transitions/shotwell-transitions.vala index 1d2344f..a4288bb 100644 --- a/plugins/shotwell-transitions/shotwell-transitions.vala +++ b/plugins/shotwell-transitions/shotwell-transitions.vala @@ -9,19 +9,17 @@ extern const string _VERSION; private class ShotwellTransitions : Object, Spit.Module { private Spit.Pluggable[] pluggables = new Spit.Pluggable[0]; - public ShotwellTransitions(GLib.File module_file) { - GLib.File resource_directory = module_file.get_parent(); - - pluggables += new FadeEffectDescriptor(resource_directory); - pluggables += new SlideEffectDescriptor(resource_directory); - pluggables += new CrumbleEffectDescriptor(resource_directory); - pluggables += new BlindsEffectDescriptor(resource_directory); - pluggables += new CircleEffectDescriptor(resource_directory); - pluggables += new CirclesEffectDescriptor(resource_directory); - pluggables += new ClockEffectDescriptor(resource_directory); - pluggables += new SquaresEffectDescriptor(resource_directory); - pluggables += new ChessEffectDescriptor(resource_directory); - pluggables += new StripesEffectDescriptor(resource_directory); + public ShotwellTransitions() { + pluggables += new FadeEffectDescriptor(); + pluggables += new SlideEffectDescriptor(); + pluggables += new CrumbleEffectDescriptor(); + pluggables += new BlindsEffectDescriptor(); + pluggables += new CircleEffectDescriptor(); + pluggables += new CirclesEffectDescriptor(); + pluggables += new ClockEffectDescriptor(); + pluggables += new SquaresEffectDescriptor(); + pluggables += new ChessEffectDescriptor(); + pluggables += new StripesEffectDescriptor(); } public unowned string get_module_name() { @@ -33,7 +31,7 @@ private class ShotwellTransitions : Object, Spit.Module { } public unowned string get_id() { - return "org.yorba.shotwell.transitions"; + return "org.gnome.shotwell.transitions"; } public unowned Spit.Pluggable[]? get_pluggables() { @@ -47,20 +45,12 @@ public Spit.Module? spit_entry_point(Spit.EntryPointParams *params) { params->host_max_spit_interface, Spit.CURRENT_INTERFACE); return (params->module_spit_interface != Spit.UNSUPPORTED_INTERFACE) - ? new ShotwellTransitions(params->module_file) : null; + ? new ShotwellTransitions() : null; } // Base class for all transition descriptors in this module public abstract class ShotwellTransitionDescriptor : Object, Spit.Pluggable, Spit.Transitions.Descriptor { - private const string ICON_FILENAME = "slideshow-plugin.png"; - - private static Gdk.Pixbuf[] icon_pixbuf_set = null; - - protected ShotwellTransitionDescriptor(GLib.File resource_directory) { - if (icon_pixbuf_set == null) - icon_pixbuf_set = - Resources.load_from_resource(Resources.RESOURCE_PATH + "/" + ICON_FILENAME); - } + protected ShotwellTransitionDescriptor() {} public int get_pluggable_interface(int min_host_interface, int max_host_interface) { return Spit.negotiate_interfaces(min_host_interface, max_host_interface, @@ -71,16 +61,13 @@ public abstract class ShotwellTransitionDescriptor : Object, Spit.Pluggable, Spi public abstract unowned string get_pluggable_name(); - public void get_info(ref Spit.PluggableInfo info) { + public Spit.PluggableInfo get_info() { + var info = new Spit.PluggableInfo(); info.authors = "Maxim Kartashev"; info.copyright = _("Copyright 2010 Maxim Kartashev, Copyright 2016 Software Freedom Conservancy Inc."); - info.translators = Resources.TRANSLATORS; - info.version = _VERSION; - info.website_name = Resources.WEBSITE_NAME; - info.website_url = Resources.WEBSITE_URL; - info.is_license_wordwrapped = false; - info.license = Resources.LICENSE; - info.icons = icon_pixbuf_set; + info.icon_name = "slideshow-plugin"; + + return info; } public void activation(bool enabled) { -- cgit v1.2.3