summaryrefslogtreecommitdiff
path: root/plugins/shotwell-publishing-extras/TumblrPublishing.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-06-26 08:39:49 +0200
commit29a7aef998e975b42401cfa96d1b750d91eadf06 (patch)
treeeda2bdff398789ea2358cc39986dd1f7ee9d027a /plugins/shotwell-publishing-extras/TumblrPublishing.vala
parent4e10e30c2f99d552239871aa1b27a08a6c18f1a4 (diff)
Imported Upstream version 0.23.2upstream/0.23.2
Diffstat (limited to 'plugins/shotwell-publishing-extras/TumblrPublishing.vala')
-rw-r--r--plugins/shotwell-publishing-extras/TumblrPublishing.vala16
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);