diff options
author | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-05-10 23:58:34 +0800 |
---|---|---|
committer | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-08-20 18:03:06 +0800 |
commit | 7eae2e49e62834cfff13cc2ee10b37eaff38a6fb (patch) | |
tree | dd8ce7c22177cd14324b466c2841466c23816ff8 /libempathy | |
parent | 6609b50bce338fdb3fe470f57727d30211c8d104 (diff) | |
download | gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.tar gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.tar.gz gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.tar.bz2 gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.tar.lz gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.tar.xz gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.tar.zst gsoc2013-empathy-7eae2e49e62834cfff13cc2ee10b37eaff38a6fb.zip |
tpaw-utils: move EMP_STR_EMPTY to tp-aw and rename it
https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-chatroom.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-contact.c | 16 | ||||
-rw-r--r-- | libempathy/empathy-ft-handler.c | 5 | ||||
-rw-r--r-- | libempathy/empathy-presence-manager.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-tp-chat.c | 4 | ||||
-rw-r--r-- | libempathy/empathy-utils.h | 1 |
6 files changed, 21 insertions, 13 deletions
diff --git a/libempathy/empathy-chatroom.c b/libempathy/empathy-chatroom.c index 32bb4ce30..b186b2dd2 100644 --- a/libempathy/empathy-chatroom.c +++ b/libempathy/empathy-chatroom.c @@ -22,6 +22,8 @@ #include "config.h" #include "empathy-chatroom.h" +#include <tp-account-widgets/tpaw-utils.h> + #include "empathy-utils.h" #define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyChatroom) @@ -413,7 +415,7 @@ empathy_chatroom_get_name (EmpathyChatroom *chatroom) priv = GET_PRIV (chatroom); - if (EMP_STR_EMPTY (priv->name)) { + if (TPAW_STR_EMPTY (priv->name)) { return priv->room; } diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 9f8e23227..2f381a5be 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -22,6 +22,8 @@ #include "config.h" #include "empathy-contact.h" +#include <tp-account-widgets/tpaw-utils.h> + #ifdef HAVE_GEOCODE #include <geocode-glib/geocode-glib.h> #endif @@ -462,7 +464,7 @@ empathy_contact_set_id (EmpathyContact *contact, priv->id = g_strdup (id); g_object_notify (G_OBJECT (contact), "id"); - if (EMP_STR_EMPTY (priv->alias)) + if (TPAW_STR_EMPTY (priv->alias)) g_object_notify (G_OBJECT (contact), "alias"); } @@ -768,7 +770,7 @@ empathy_contact_from_tpl_contact (TpAccount *account, } } - if (!EMP_STR_EMPTY (tpl_entity_get_avatar_token (tpl_entity))) + if (!TPAW_STR_EMPTY (tpl_entity_get_avatar_token (tpl_entity))) contact_load_avatar_cache (retval, tpl_entity_get_avatar_token (tpl_entity)); @@ -812,12 +814,12 @@ empathy_contact_get_alias (EmpathyContact *contact) priv = GET_PRIV (contact); - if (!EMP_STR_EMPTY (priv->alias)) + if (!TPAW_STR_EMPTY (priv->alias)) alias = priv->alias; else if (priv->tp_contact != NULL) alias = tp_contact_get_alias (priv->tp_contact); - if (!EMP_STR_EMPTY (alias)) + if (!TPAW_STR_EMPTY (alias)) return alias; else return empathy_contact_get_id (contact); @@ -1185,7 +1187,7 @@ empathy_contact_get_status (EmpathyContact *contact) g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), ""); message = empathy_contact_get_presence_message (contact); - if (!EMP_STR_EMPTY (message)) + if (!TPAW_STR_EMPTY (message)) return message; return empathy_presence_get_default_message ( @@ -1330,7 +1332,7 @@ contact_get_avatar_filename (EmpathyContact *contact, gchar *avatar_file; gchar *token_escaped; - if (EMP_STR_EMPTY (empathy_contact_get_id (contact))) + if (TPAW_STR_EMPTY (empathy_contact_get_id (contact))) return NULL; token_escaped = tp_escape_as_identifier (token); @@ -1363,7 +1365,7 @@ contact_load_avatar_cache (EmpathyContact *contact, GError *error = NULL; g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), FALSE); - g_return_val_if_fail (!EMP_STR_EMPTY (token), FALSE); + g_return_val_if_fail (!TPAW_STR_EMPTY (token), FALSE); /* Load the avatar from file if it exists */ filename = contact_get_avatar_filename (contact, token); diff --git a/libempathy/empathy-ft-handler.c b/libempathy/empathy-ft-handler.c index 049489c4e..d7e112a2f 100644 --- a/libempathy/empathy-ft-handler.c +++ b/libempathy/empathy-ft-handler.c @@ -26,6 +26,7 @@ #include <glib/gi18n-lib.h> #include <tp-account-widgets/tpaw-time.h> +#include <tp-account-widgets/tpaw-utils.h> #include "empathy-utils.h" @@ -601,7 +602,7 @@ check_hash_incoming (EmpathyFTHandler *handler) HashingData *hash_data; EmpathyFTHandlerPriv *priv = GET_PRIV (handler); - if (!EMP_STR_EMPTY (priv->content_hash)) + if (!TPAW_STR_EMPTY (priv->content_hash)) { hash_data = g_slice_new0 (HashingData); hash_data->total_bytes = priv->total_bytes; @@ -1512,7 +1513,7 @@ empathy_ft_handler_incoming_set_destination (EmpathyFTHandler *handler, /* check if hash is supported. if it isn't, set use_hash to FALSE * anyway, so that clients won't be expecting us to checksum. */ - if (EMP_STR_EMPTY (priv->content_hash) || + if (TPAW_STR_EMPTY (priv->content_hash) || priv->content_hash_type == TP_FILE_HASH_TYPE_NONE) priv->use_hash = FALSE; else diff --git a/libempathy/empathy-presence-manager.c b/libempathy/empathy-presence-manager.c index 1c288fb98..6eab7f15b 100644 --- a/libempathy/empathy-presence-manager.c +++ b/libempathy/empathy-presence-manager.c @@ -21,6 +21,8 @@ #include "config.h" #include "empathy-presence-manager.h" +#include <tp-account-widgets/tpaw-utils.h> + #include "empathy-utils.h" #define DEBUG_FLAG EMPATHY_DEBUG_OTHER @@ -107,7 +109,7 @@ most_available_presence_changed (TpAccountManager *manager, g_free (self->priv->status); self->priv->state = state; - if (EMP_STR_EMPTY (status_message)) + if (TPAW_STR_EMPTY (status_message)) self->priv->status = NULL; else self->priv->status = g_strdup (status_message); diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c index 4711affcb..e0fd4c2cb 100644 --- a/libempathy/empathy-tp-chat.c +++ b/libempathy/empathy-tp-chat.c @@ -21,6 +21,8 @@ #include "config.h" #include "empathy-tp-chat.h" +#include <tp-account-widgets/tpaw-utils.h> + #include "empathy-request-util.h" #include "empathy-utils.h" @@ -1115,7 +1117,7 @@ empathy_tp_chat_get_id (EmpathyTpChat *self) g_return_val_if_fail (EMPATHY_IS_TP_CHAT (self), NULL); id = tp_channel_get_identifier ((TpChannel *) self); - if (!EMP_STR_EMPTY (id)) + if (!TPAW_STR_EMPTY (id)) return id; else if (self->priv->remote_contact) return empathy_contact_get_id (self->priv->remote_contact); diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h index 7310320b1..40291b971 100644 --- a/libempathy/empathy-utils.h +++ b/libempathy/empathy-utils.h @@ -36,7 +36,6 @@ #include "empathy-contact.h" #define EMPATHY_GET_PRIV(obj,type) ((type##Priv *) ((type *) obj)->priv) -#define EMP_STR_EMPTY(x) ((x) == NULL || (x)[0] == '\0') G_BEGIN_DECLS |