diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-06-26 08:40:03 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2016-06-26 08:40:03 +0200 |
commit | 386403d8a5de83642598d811b6a6a5c40cce51c0 (patch) | |
tree | abdcc42a870fa2becbf189a67e42d9b1c63a8ee1 /plugins/shotwell-publishing-extras/TumblrPublishing.vala | |
parent | 5db2423befaf4834bb8bd9ae297817debdaa3b78 (diff) | |
parent | 29a7aef998e975b42401cfa96d1b750d91eadf06 (diff) |
Merge tag 'upstream/0.23.2'
Upstream version 0.23.2
Diffstat (limited to 'plugins/shotwell-publishing-extras/TumblrPublishing.vala')
-rw-r--r-- | plugins/shotwell-publishing-extras/TumblrPublishing.vala | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/shotwell-publishing-extras/TumblrPublishing.vala b/plugins/shotwell-publishing-extras/TumblrPublishing.vala index 6bafb21..9e17b4e 100644 --- a/plugins/shotwell-publishing-extras/TumblrPublishing.vala +++ b/plugins/shotwell-publishing-extras/TumblrPublishing.vala @@ -6,7 +6,6 @@ */ -extern string hmac_sha1(string key, string message); public class TumblrService : Object, Spit.Pluggable, Spit.Publishing.Service { private const string ICON_FILENAME = "tumblr.png"; @@ -656,10 +655,8 @@ internal class AuthenticationPane : Spit.Publishing.DialogPane, Object { } private void update_login_button_sensitivity() { - login_button.set_sensitive( - !is_string_empty(username_entry.get_text()) && - !is_string_empty(password_entry.get_text()) - ); + login_button.set_sensitive(username_entry.text_length > 0 && + password_entry.text_length > 0); } public Gtk.Widget get_widget() { @@ -954,12 +951,7 @@ internal class UploadTransaction : Publishing.RESTSupport.UploadTransaction { string[] keywords = base.publishable.get_publishing_keywords(); string tags = ""; if (keywords != null) { - foreach (string tag in keywords) { - if (!is_string_empty(tags)) { - tags += ","; - } - tags += tag; - } + tags = string.joinv (",", keywords); } add_argument("tags", Soup.URI.encode(tags, ENCODE_RFC_3986_EXTRA)); @@ -1105,7 +1097,7 @@ internal class Session : Publishing.RESTSupport.Session { debug("signing key = '%s'", signing_key); // compute the signature - string signature = hmac_sha1(signing_key, signature_base_string); + string signature = Publishing.RESTSupport.hmac_sha1(signing_key, signature_base_string); debug("signature = '%s'", signature); signature = Soup.URI.encode(signature, ENCODE_RFC_3986_EXTRA); |