diff options
Diffstat (limited to 'plugins/shotwell-publishing-extras')
4 files changed, 7 insertions, 19 deletions
diff --git a/plugins/shotwell-publishing-extras/Makefile b/plugins/shotwell-publishing-extras/Makefile index 91452cf..83a42c2 100644 --- a/plugins/shotwell-publishing-extras/Makefile +++ b/plugins/shotwell-publishing-extras/Makefile @@ -16,8 +16,6 @@ SRC_FILES := \ YandexPublishing.vala \ TumblrPublishing.vala \ RajcePublishing.vala \ - ../../src/util/string.vala \ - ../common/RESTSupport.vala # RC_FILES must also be added to ../plugins.mk to ensure they're installed properly RC_FILES := \ diff --git a/plugins/shotwell-publishing-extras/RajcePublishing.vala b/plugins/shotwell-publishing-extras/RajcePublishing.vala index 8ae05c6..d282ed5 100644 --- a/plugins/shotwell-publishing-extras/RajcePublishing.vala +++ b/plugins/shotwell-publishing-extras/RajcePublishing.vala @@ -932,10 +932,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() 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); diff --git a/plugins/shotwell-publishing-extras/YandexPublishing.vala b/plugins/shotwell-publishing-extras/YandexPublishing.vala index ec99c2b..6504572 100644 --- a/plugins/shotwell-publishing-extras/YandexPublishing.vala +++ b/plugins/shotwell-publishing-extras/YandexPublishing.vala @@ -338,7 +338,7 @@ private class UploadTransaction: Transaction { image_part_header.set_content_disposition("form-data", result); - Soup.Message outbound_message = soup_form_request_new_from_multipart(get_endpoint_url(), message_parts); + Soup.Message outbound_message = Soup.Form.request_new_from_multipart(get_endpoint_url(), message_parts); outbound_message.request_headers.append("Authorization", ("OAuth %s").printf(session.get_auth_token())); outbound_message.request_headers.append("Connection", "close"); set_message(outbound_message); |