#include "empathy-chat.h"
#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"
#include "empathy-individual-store-channel.h"
#include "empathy-individual-view.h"
#include "empathy-input-text-view.h"
-#include "empathy-keyring.h"
#include "empathy-request-util.h"
#include "empathy-search-bar.h"
#include "empathy-smiley-manager.h"
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);
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;
* 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++;
/* 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 {
TpMessage *message;
guint i;
- if (EMP_STR_EMPTY (msg)) {
+ if (TPAW_STR_EMPTY (msg)) {
return;
}
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;
gchar *markup_text;
- markup_topic = empathy_add_link_markup (priv->subject);
+ markup_topic = tpaw_add_link_markup (priv->subject);
markup_text = g_strdup_printf ("<span weight=\"bold\">%s</span> %s",
_("Topic:"), markup_topic);
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)) {
/* 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);
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,
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,
filename = empathy_file_lookup ("empathy-chat.ui",
"libempathy-gtk");
- gui = empathy_builder_get_file (filename,
+ gui = tpaw_builder_get_file (filename,
"chat_widget", &priv->widget,
"hpaned", &priv->hpaned,
"vbox_left", &priv->vbox_left,
"info_bar_vbox", &priv->info_bar_vbox,
NULL);
- empathy_builder_connect (gui, chat,
+ tpaw_builder_connect (gui, chat,
"expander_topic", "notify::expanded", chat_topic_expander_activate_cb,
"label_topic", "size-allocate", chat_topic_label_size_allocate_cb,
NULL);
if (response_id == GTK_RESPONSE_OK) {
DEBUG ("Saving room password");
- empathy_keyring_set_room_password_async (priv->account,
+ tpaw_keyring_set_room_password_async (priv->account,
empathy_tp_chat_get_id (priv->tp_chat),
data->password,
NULL, NULL);
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
const gchar *password;
GError *error = NULL;
- password = empathy_keyring_get_room_password_finish (priv->account,
+ password = tpaw_keyring_get_room_password_finish (priv->account,
result, &error);
if (error != NULL) {
EmpathyChatPriv *priv = GET_PRIV (self);
if (tp_channel_password_needed (TP_CHANNEL (priv->tp_chat))) {
- empathy_keyring_get_room_password_async (priv->account,
+ tpaw_keyring_get_room_password_async (priv->account,
empathy_tp_chat_get_id (priv->tp_chat),
chat_room_got_password_cb, self);
}
if (individual == NULL)
return NULL;
- menu = empathy_individual_menu_new (individual,
+ menu = empathy_individual_menu_new (individual, NULL,
EMPATHY_INDIVIDUAL_FEATURE_CALL |
EMPATHY_INDIVIDUAL_FEATURE_LOG |
EMPATHY_INDIVIDUAL_FEATURE_INFO |