diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-03-22 06:40:44 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-03-22 06:40:44 +0100 |
commit | 8e1c5a834469d804d28ee8ab2cbe2da8e600a789 (patch) | |
tree | b9771456583eaead893cfd8f02e680b58a3da970 /plugins/shotwell-publishing/shotwell-publishing.vala | |
parent | 80a5f2d8b095e895a5424f90b2ce4684d94c1a32 (diff) | |
parent | 3253d99365813f2d2ffd05e10cbb8c11f53d746e (diff) |
Merge tag 'upstream/0.26.0'
Upstream version 0.26.0
Diffstat (limited to 'plugins/shotwell-publishing/shotwell-publishing.vala')
-rw-r--r-- | plugins/shotwell-publishing/shotwell-publishing.vala | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/plugins/shotwell-publishing/shotwell-publishing.vala b/plugins/shotwell-publishing/shotwell-publishing.vala index bbd5ddb..dce5954 100644 --- a/plugins/shotwell-publishing/shotwell-publishing.vala +++ b/plugins/shotwell-publishing/shotwell-publishing.vala @@ -14,12 +14,41 @@ private class ShotwellPublishingCoreServices : Object, Spit.Module { // module file directory public ShotwellPublishingCoreServices(GLib.File module_file) { GLib.File resource_directory = module_file.get_parent(); - - pluggables += new FacebookService(resource_directory); - pluggables += new PicasaService(resource_directory); - pluggables += new FlickrService(resource_directory); - pluggables += new YouTubeService(resource_directory); + var factory = Publishing.Authenticator.Factory.get_instance(); + var authenicators = factory.get_available_authenticators(); + + // Prevent vala complaining when all authenticators from this plugin + // are disabled + debug("Looking for resources in %s", resource_directory.get_path()); + debug("Found %d authenicators", authenicators.size); + +#if HAVE_FACEBOOK + if (authenicators.contains("facebook")) { + pluggables += new FacebookService(resource_directory); + } +#endif + +#if HAVE_PICASA + if (authenicators.contains("picasa")) { + pluggables += new PicasaService(resource_directory); + } +#endif + +#if HAVE_FLICKR + if (authenicators.contains("flickr")) { + pluggables += new FlickrService(resource_directory); + } +#endif + +#if HAVE_YOUTUBE + if (authenicators.contains("youtube")) { + pluggables += new YouTubeService(resource_directory); + } +#endif + +#if HAVE_PIWIGO pluggables += new PiwigoService(resource_directory); +#endif } public unowned string get_module_name() { |