summaryrefslogtreecommitdiff
path: root/plugins/shotwell-transitions/shotwell-transitions.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-14 20:36:17 +0200
commit31804433d72460cbe0a39f9f8ea5e76058d84cda (patch)
tree2084a84c39f159c6aea254775dc0880d52579d45 /plugins/shotwell-transitions/shotwell-transitions.vala
parenta9898fb3f39c44a85876930ef6b2558052569ae6 (diff)
parentd443a3c2509889533ca812c163056bace396b586 (diff)
Update upstream source from tag 'upstream/0.32.1'
Update to upstream version '0.32.1' with Debian dir c460ad6e13d3c39eaa2d5399059385e64e6fba4c
Diffstat (limited to 'plugins/shotwell-transitions/shotwell-transitions.vala')
-rw-r--r--plugins/shotwell-transitions/shotwell-transitions.vala51
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) {