aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-base-password-dialog.c5
-rw-r--r--libempathy-gtk/empathy-cell-renderer-text.c6
-rw-r--r--libempathy-gtk/empathy-chat.c23
-rw-r--r--libempathy-gtk/empathy-contact-widget.c3
-rw-r--r--libempathy-gtk/empathy-geometry.c5
-rw-r--r--libempathy-gtk/empathy-groups-widget.c5
-rw-r--r--libempathy-gtk/empathy-individual-store.c3
-rw-r--r--libempathy-gtk/empathy-individual-view.c2
-rw-r--r--libempathy-gtk/empathy-individual-widget.c3
-rw-r--r--libempathy-gtk/empathy-log-window.c5
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c3
-rw-r--r--libempathy-gtk/empathy-search-bar.c7
-rw-r--r--libempathy-gtk/empathy-smiley-manager.c6
13 files changed, 45 insertions, 31 deletions
diff --git a/libempathy-gtk/empathy-base-password-dialog.c b/libempathy-gtk/empathy-base-password-dialog.c
index 9cbb178f0..f080cb7b1 100644
--- a/libempathy-gtk/empathy-base-password-dialog.c
+++ b/libempathy-gtk/empathy-base-password-dialog.c
@@ -21,6 +21,7 @@
#include "empathy-base-password-dialog.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-utils.h"
@@ -108,10 +109,10 @@ password_entry_changed_cb (GtkEditable *entry,
str = gtk_entry_get_text (GTK_ENTRY (entry));
gtk_entry_set_icon_sensitive (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_SECONDARY, !EMP_STR_EMPTY (str));
+ GTK_ENTRY_ICON_SECONDARY, !TPAW_STR_EMPTY (str));
gtk_widget_set_sensitive (self->ok_button,
- !EMP_STR_EMPTY (str));
+ !TPAW_STR_EMPTY (str));
}
static void
diff --git a/libempathy-gtk/empathy-cell-renderer-text.c b/libempathy-gtk/empathy-cell-renderer-text.c
index 44bbd7eab..8b488f192 100644
--- a/libempathy-gtk/empathy-cell-renderer-text.c
+++ b/libempathy-gtk/empathy-cell-renderer-text.c
@@ -24,6 +24,8 @@
#include "config.h"
#include "empathy-cell-renderer-text.h"
+#include <tp-account-widgets/tpaw-utils.h>
+
#include "empathy-utils.h"
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyCellRendererText)
@@ -349,7 +351,7 @@ cell_renderer_text_update_text (EmpathyCellRendererText *cell,
}
if (priv->compact) {
- if (EMP_STR_EMPTY (priv->status)) {
+ if (TPAW_STR_EMPTY (priv->status)) {
str = g_strdup (priv->name);
} else {
str = g_strdup_printf ("%s %s", priv->name, priv->status);
@@ -358,7 +360,7 @@ cell_renderer_text_update_text (EmpathyCellRendererText *cell,
const gchar *status = priv->status;
gboolean on_a_phone = FALSE;
- if (EMP_STR_EMPTY (priv->status)) {
+ if (TPAW_STR_EMPTY (priv->status)) {
status = empathy_presence_get_default_message (priv->presence_type);
}
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index d8ea5e3ee..a7364e4ca 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -35,6 +35,7 @@
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-keyring.h>
#include <tp-account-widgets/tpaw-builder.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-client-factory.h"
#include "empathy-gsettings.h"
@@ -328,7 +329,7 @@ chat_new_connection_cb (TpAccount *account,
if (priv->tp_chat != NULL || account != priv->account ||
priv->handle_type == TP_HANDLE_TYPE_NONE ||
- EMP_STR_EMPTY (priv->id))
+ TPAW_STR_EMPTY (priv->id))
return;
g_object_ref (chat);
@@ -733,7 +734,7 @@ chat_command_msg_cb (GObject *source,
goto OUT;
}
- if (!EMP_STR_EMPTY (data->message) && TP_IS_TEXT_CHANNEL (channel)) {
+ if (!TPAW_STR_EMPTY (data->message) && TP_IS_TEXT_CHANNEL (channel)) {
TpTextChannel *text = (TpTextChannel *) channel;
TpMessage *msg;
@@ -823,7 +824,7 @@ chat_command_join (EmpathyChat *chat,
* https://bugs.freedesktop.org/show_bug.cgi?id=13422 */
while (rooms[i] != NULL) {
/* ignore empty strings */
- if (!EMP_STR_EMPTY (rooms[i])) {
+ if (!TPAW_STR_EMPTY (rooms[i])) {
empathy_chat_join_muc (chat, rooms[i]);
}
i++;
@@ -1194,7 +1195,7 @@ chat_command_parse (const gchar *text, guint max_parts)
/* Append last part if not empty */
item = g_strstrip (g_strdup (text));
- if (!EMP_STR_EMPTY (item)) {
+ if (!TPAW_STR_EMPTY (item)) {
g_ptr_array_add (array, item);
DEBUG ("\tITEM: \"%s\"", item);
} else {
@@ -1222,7 +1223,7 @@ chat_send (EmpathyChat *chat,
TpMessage *message;
guint i;
- if (EMP_STR_EMPTY (msg)) {
+ if (TPAW_STR_EMPTY (msg)) {
return;
}
@@ -1674,7 +1675,7 @@ chat_subject_changed_cb (EmpathyChat *chat)
priv->subject = g_strdup (empathy_tp_chat_get_subject (priv->tp_chat));
g_object_notify (G_OBJECT (chat), "subject");
- if (EMP_STR_EMPTY (priv->subject)) {
+ if (TPAW_STR_EMPTY (priv->subject)) {
gtk_widget_hide (priv->hbox_topic);
} else {
gchar *markup_topic;
@@ -1693,7 +1694,7 @@ chat_subject_changed_cb (EmpathyChat *chat)
if (priv->block_events_timeout_id == 0) {
gchar *str = NULL;
- if (!EMP_STR_EMPTY (priv->subject)) {
+ if (!TPAW_STR_EMPTY (priv->subject)) {
const gchar *actor = empathy_tp_chat_get_subject_actor (priv->tp_chat);
if (tp_str_empty (actor)) {
@@ -2412,7 +2413,7 @@ chat_input_populate_popup_cb (GtkTextView *view,
/* Add the Send menu item. */
gtk_text_buffer_get_bounds (buffer, &start, &end);
str = gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
- if (!EMP_STR_EMPTY (str)) {
+ if (!TPAW_STR_EMPTY (str)) {
item = gtk_menu_item_new_with_mnemonic (_("_Send"));
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (chat_text_send_cb), chat);
@@ -2459,7 +2460,7 @@ chat_input_populate_popup_cb (GtkTextView *view,
str = gtk_text_buffer_get_text (buffer,
&start, &end, FALSE);
}
- if (!EMP_STR_EMPTY (str)) {
+ if (!TPAW_STR_EMPTY (str)) {
chat_spell = chat_spell_new (chat, str, start, end);
g_object_set_data_full (G_OBJECT (menu),
"chat-spell", chat_spell,
@@ -2852,7 +2853,7 @@ build_part_message (guint reason,
g_string_append_printf (s, _("%s has left the room"), name);
}
- if (!EMP_STR_EMPTY (message)) {
+ if (!TPAW_STR_EMPTY (message)) {
/* Note to translators: this string is appended to
* notifications like "foo has left the room", with the message
* given by the user living the room. If this poses a problem,
@@ -3923,7 +3924,7 @@ password_entry_changed_cb (GtkEditable *entry,
str = gtk_entry_get_text (GTK_ENTRY (entry));
gtk_entry_set_icon_sensitive (GTK_ENTRY (entry),
- GTK_ENTRY_ICON_SECONDARY, !EMP_STR_EMPTY (str));
+ GTK_ENTRY_ICON_SECONDARY, !TPAW_STR_EMPTY (str));
}
static void
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index d6ce3e193..505dad402 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -25,6 +25,7 @@
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-builder.h>
#include <tp-account-widgets/tpaw-string-parser.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-avatar-image.h"
#include "empathy-client-factory.h"
@@ -505,7 +506,7 @@ contact_widget_change_contact (EmpathyContactWidget *self)
return;
id = gtk_entry_get_text (GTK_ENTRY (self->priv->widget_id));
- if (!EMP_STR_EMPTY (id))
+ if (!TPAW_STR_EMPTY (id))
{
EmpathyClientFactory *factory;
diff --git a/libempathy-gtk/empathy-geometry.c b/libempathy-gtk/empathy-geometry.c
index 452952bb8..6874cd796 100644
--- a/libempathy-gtk/empathy-geometry.c
+++ b/libempathy-gtk/empathy-geometry.c
@@ -25,6 +25,7 @@
#include "empathy-geometry.h"
#include <sys/stat.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
@@ -211,7 +212,7 @@ empathy_geometry_load (GtkWindow *window,
gboolean maximized;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (!EMP_STR_EMPTY (name));
+ g_return_if_fail (!TPAW_STR_EMPTY (name));
/* escape the name so that unwanted characters such as # are removed */
escaped_name = g_uri_escape_string (name, NULL, TRUE);
@@ -294,7 +295,7 @@ empathy_geometry_bind (GtkWindow *window,
gboolean connect_sigs = FALSE;
g_return_if_fail (GTK_IS_WINDOW (window));
- g_return_if_fail (!EMP_STR_EMPTY (name));
+ g_return_if_fail (!TPAW_STR_EMPTY (name));
/* Check if this window is already bound */
names = g_object_get_data (G_OBJECT (window), GEOMETRY_NAME_KEY);
diff --git a/libempathy-gtk/empathy-groups-widget.c b/libempathy-gtk/empathy-groups-widget.c
index d1a6febfa..b7f4b256a 100644
--- a/libempathy-gtk/empathy-groups-widget.c
+++ b/libempathy-gtk/empathy-groups-widget.c
@@ -23,6 +23,7 @@
#include "empathy-groups-widget.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-utils.h"
#include "empathy-connection-aggregator.h"
@@ -117,7 +118,7 @@ model_find_name (EmpathyGroupsWidget *self,
EmpathyGroupsWidgetPriv *priv = GET_PRIV (self);
FindNameData data;
- if (EMP_STR_EMPTY (name))
+ if (TPAW_STR_EMPTY (name))
return FALSE;
data.widget = self;
@@ -192,7 +193,7 @@ add_group_entry_changed_cb (GtkEditable *editable,
else
{
gtk_widget_set_sensitive (GTK_WIDGET (priv->add_group_button),
- !EMP_STR_EMPTY (group));
+ !TPAW_STR_EMPTY (group));
}
}
diff --git a/libempathy-gtk/empathy-individual-store.c b/libempathy-gtk/empathy-individual-store.c
index 1fc0076a5..9b685ee5f 100644
--- a/libempathy-gtk/empathy-individual-store.c
+++ b/libempathy-gtk/empathy-individual-store.c
@@ -28,6 +28,7 @@
#include "empathy-individual-store.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-gtk-enum-types.h"
#include "empathy-ui-utils.h"
@@ -283,7 +284,7 @@ empathy_individual_store_add_individual (EmpathyIndividualStore *self,
GeeSet *group_set = NULL;
gboolean grouped = FALSE;
- if (EMP_STR_EMPTY (folks_alias_details_get_alias (
+ if (TPAW_STR_EMPTY (folks_alias_details_get_alias (
FOLKS_ALIAS_DETAILS (individual))))
return;
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 4344840e4..22e65a0ec 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -1596,7 +1596,7 @@ individual_view_row_has_child_toggled_cb (GtkTreeModel *model,
EMPATHY_INDIVIDUAL_STORE_COL_NAME, &name,
-1);
- if (!is_group || EMP_STR_EMPTY (name))
+ if (!is_group || TPAW_STR_EMPTY (name))
{
g_free (name);
return;
diff --git a/libempathy-gtk/empathy-individual-widget.c b/libempathy-gtk/empathy-individual-widget.c
index 03490bcba..41d939966 100644
--- a/libempathy-gtk/empathy-individual-widget.c
+++ b/libempathy-gtk/empathy-individual-widget.c
@@ -26,6 +26,7 @@
#include <tp-account-widgets/tpaw-builder.h>
#include <tp-account-widgets/tpaw-contactinfo-utils.h>
#include <tp-account-widgets/tpaw-time.h>
+#include <tp-account-widgets/tpaw-utils.h>
#ifdef HAVE_LIBCHAMPLAIN
#include <champlain/champlain.h>
@@ -1296,7 +1297,7 @@ notify_presence_cb (gpointer folks_object,
/* FIXME: Default messages should be moved into libfolks (bgo#627403) */
message = folks_presence_details_get_presence_message (
FOLKS_PRESENCE_DETAILS (folks_object));
- if (EMP_STR_EMPTY (message))
+ if (TPAW_STR_EMPTY (message))
{
message = empathy_presence_get_default_message (presence);
}
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index f294502c6..7097616d7 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -30,6 +30,7 @@
#include <tp-account-widgets/tpaw-builder.h>
#include <tp-account-widgets/tpaw-images.h>
#include <tp-account-widgets/tpaw-camera-monitor.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "action-chain-internal.h"
#include "empathy-account-chooser.h"
@@ -1332,7 +1333,7 @@ log_window_append_call (TplEvent *event,
GTimeSpan span;
/* If searching, only add the call if the search string appears anywhere */
- if (!EMP_STR_EMPTY (log_window->priv->last_find))
+ if (!TPAW_STR_EMPTY (log_window->priv->last_find))
{
if (strstr (tpl_entity_get_identifier (tpl_event_get_sender (event)),
log_window->priv->last_find) == NULL &&
@@ -2009,7 +2010,7 @@ log_window_find_populate (EmpathyLogWindow *self,
gtk_list_store_clear (store);
- if (EMP_STR_EMPTY (search_criteria))
+ if (TPAW_STR_EMPTY (search_criteria))
{
tp_clear_pointer (&self->priv->hits, tpl_log_manager_search_free);
webkit_web_view_set_highlight_text_matches (
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 445f79b63..6ff113d2d 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -28,6 +28,7 @@
#include "empathy-presence-chooser.h"
#include <glib/gi18n-lib.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-presence-manager.h"
#include "empathy-status-presets.h"
@@ -272,7 +273,7 @@ get_state_and_status (EmpathyPresenceChooser *self,
state = tp_account_manager_get_most_available_presence (
priv->account_manager, NULL, &tmp);
- if (EMP_STR_EMPTY (tmp)) {
+ if (TPAW_STR_EMPTY (tmp)) {
/* no message, use the default message */
g_free (tmp);
tmp = g_strdup (empathy_presence_get_default_message (state));
diff --git a/libempathy-gtk/empathy-search-bar.c b/libempathy-gtk/empathy-search-bar.c
index 1ffdc1dc4..3383b9a12 100644
--- a/libempathy-gtk/empathy-search-bar.c
+++ b/libempathy-gtk/empathy-search-bar.c
@@ -22,6 +22,7 @@
#include <glib/gi18n-lib.h>
#include <tp-account-widgets/tpaw-builder.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
@@ -72,9 +73,9 @@ empathy_search_bar_update_buttons (EmpathySearchBar *self,
&can_go_backward, &can_go_forward);
gtk_widget_set_sensitive (priv->search_previous,
- can_go_backward && !EMP_STR_EMPTY (search));
+ can_go_backward && !TPAW_STR_EMPTY (search));
gtk_widget_set_sensitive (priv->search_next,
- can_go_forward && !EMP_STR_EMPTY (search));
+ can_go_forward && !TPAW_STR_EMPTY (search));
}
static void
@@ -158,7 +159,7 @@ empathy_search_bar_search (EmpathySearchBar *self,
/* (don't) display the not found label */
gtk_widget_set_visible (priv->search_not_found,
- !(found || EMP_STR_EMPTY (search)));
+ !(found || TPAW_STR_EMPTY (search)));
/* update the buttons */
empathy_search_bar_update_buttons (self, search, match_case);
diff --git a/libempathy-gtk/empathy-smiley-manager.c b/libempathy-gtk/empathy-smiley-manager.c
index 2e8ef3aa5..fcbe56024 100644
--- a/libempathy-gtk/empathy-smiley-manager.c
+++ b/libempathy-gtk/empathy-smiley-manager.c
@@ -23,6 +23,8 @@
#include "config.h"
#include "empathy-smiley-manager.h"
+#include <tp-account-widgets/tpaw-utils.h>
+
#include "empathy-ui-utils.h"
#include "empathy-utils.h"
@@ -242,8 +244,8 @@ empathy_smiley_manager_add (EmpathySmileyManager *manager,
va_list var_args;
g_return_if_fail (EMPATHY_IS_SMILEY_MANAGER (manager));
- g_return_if_fail (!EMP_STR_EMPTY (icon_name));
- g_return_if_fail (!EMP_STR_EMPTY (first_str));
+ g_return_if_fail (!TPAW_STR_EMPTY (icon_name));
+ g_return_if_fail (!TPAW_STR_EMPTY (first_str));
pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
if (pixbuf) {