diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-06-28 21:35:52 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-06-28 21:35:52 +0200 |
commit | b86540b743f1a87a163ffb811c8fe22a01fefa38 (patch) | |
tree | b47cb3bb83c2377234226fb3987ab3320a987dd9 /plugins/shotwell-transitions/shotwell-transitions.vala | |
parent | ac6e0b731b9f0b2efd392e3309a5c07e2a66adad (diff) | |
parent | e905d8e16eec152d19797937f13ba3cf4b8f8aca (diff) |
Merge branch 'release/debian/0.32.1-1'debian/0.32.1-1
Diffstat (limited to 'plugins/shotwell-transitions/shotwell-transitions.vala')
-rw-r--r-- | plugins/shotwell-transitions/shotwell-transitions.vala | 51 |
1 files changed, 19 insertions, 32 deletions
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) { |