aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-account-chooser.c88
-rw-r--r--libempathy-gtk/empathy-accounts-dialog.c175
-rw-r--r--libempathy-gtk/empathy-chat.c124
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c10
-rw-r--r--libempathy-gtk/empathy-group-chat.c4
-rw-r--r--libempathy-gtk/empathy-main-window.c186
-rw-r--r--libempathy-gtk/empathy-presence-chooser.c3
-rw-r--r--libempathy-gtk/empathy-status-presets.c6
8 files changed, 301 insertions, 295 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index c9cfbed59..8c9674177 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -64,41 +64,41 @@ enum {
COL_ACCOUNT_COUNT
};
-static void account_chooser_finalize (GObject *object);
-static void account_chooser_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec);
-static void account_chooser_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec);
-static void account_chooser_setup (EmpathyAccountChooser *chooser);
-static void account_chooser_account_created_cb (McAccountMonitor *monitor,
- const gchar *unique_name,
- EmpathyAccountChooser *chooser);
-static void account_chooser_account_add_foreach (McAccount *account,
- EmpathyAccountChooser *chooser);
-static void account_chooser_account_deleted_cb (McAccountMonitor *monitor,
- const gchar *unique_name,
- EmpathyAccountChooser *chooser);
-static void account_chooser_account_remove_foreach (McAccount *account,
- EmpathyAccountChooser *chooser);
-static void account_chooser_update_iter (EmpathyAccountChooser *chooser,
- GtkTreeIter *iter);
-static void account_chooser_status_changed_cb (MissionControl *mc,
- TelepathyConnectionStatus status,
- McPresence presence,
- TelepathyConnectionStatusReason reason,
- const gchar *unique_name,
- EmpathyAccountChooser *chooser);
-static gboolean account_chooser_separator_func (GtkTreeModel *model,
- GtkTreeIter *iter,
- EmpathyAccountChooser *chooser);
-static gboolean account_chooser_set_account_foreach (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- SetAccountData *data);
+static void account_chooser_finalize (GObject *object);
+static void account_chooser_get_property (GObject *object,
+ guint param_id,
+ GValue *value,
+ GParamSpec *pspec);
+static void account_chooser_set_property (GObject *object,
+ guint param_id,
+ const GValue *value,
+ GParamSpec *pspec);
+static void account_chooser_setup (EmpathyAccountChooser *chooser);
+static void account_chooser_account_created_cb (McAccountMonitor *monitor,
+ const gchar *unique_name,
+ EmpathyAccountChooser *chooser);
+static void account_chooser_account_add_foreach (McAccount *account,
+ EmpathyAccountChooser *chooser);
+static void account_chooser_account_deleted_cb (McAccountMonitor *monitor,
+ const gchar *unique_name,
+ EmpathyAccountChooser *chooser);
+static void account_chooser_account_remove_foreach (McAccount *account,
+ EmpathyAccountChooser *chooser);
+static void account_chooser_update_iter (EmpathyAccountChooser *chooser,
+ GtkTreeIter *iter);
+static void account_chooser_status_changed_cb (MissionControl *mc,
+ TpConnectionStatus status,
+ McPresence presence,
+ TpConnectionStatusReason reason,
+ const gchar *unique_name,
+ EmpathyAccountChooser *chooser);
+static gboolean account_chooser_separator_func (GtkTreeModel *model,
+ GtkTreeIter *iter,
+ EmpathyAccountChooser *chooser);
+static gboolean account_chooser_set_account_foreach (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ SetAccountData *data);
enum {
PROP_0,
@@ -555,12 +555,12 @@ account_chooser_update_iter (EmpathyAccountChooser *chooser,
}
static void
-account_chooser_status_changed_cb (MissionControl *mc,
- TelepathyConnectionStatus status,
- McPresence presence,
- TelepathyConnectionStatusReason reason,
- const gchar *unique_name,
- EmpathyAccountChooser *chooser)
+account_chooser_status_changed_cb (MissionControl *mc,
+ TpConnectionStatus status,
+ McPresence presence,
+ TpConnectionStatusReason reason,
+ const gchar *unique_name,
+ EmpathyAccountChooser *chooser)
{
McAccount *account;
GtkTreeIter iter;
@@ -663,8 +663,8 @@ gboolean
empathy_account_chooser_filter_is_connected (McAccount *account,
gpointer user_data)
{
- MissionControl *mc;
- TelepathyConnectionStatus status;
+ MissionControl *mc;
+ TpConnectionStatus status;
g_return_val_if_fail (MC_IS_ACCOUNT (account), FALSE);
@@ -672,6 +672,6 @@ empathy_account_chooser_filter_is_connected (McAccount *account,
status = mission_control_get_connection_status (mc, account, NULL);
g_object_unref (mc);
- return status == TP_CONN_STATUS_CONNECTED;
+ return status == TP_CONNECTION_STATUS_CONNECTED;
}
diff --git a/libempathy-gtk/empathy-accounts-dialog.c b/libempathy-gtk/empathy-accounts-dialog.c
index f171664b3..4c0719c21 100644
--- a/libempathy-gtk/empathy-accounts-dialog.c
+++ b/libempathy-gtk/empathy-accounts-dialog.c
@@ -36,6 +36,7 @@
#include <libmissioncontrol/mc-profile.h>
#include <libmissioncontrol/mission-control.h>
#include <libmissioncontrol/mc-account-monitor.h>
+#include <telepathy-glib/util.h>
#include <libtelepathy/tp-constants.h>
#include <libempathy/empathy-debug.h>
@@ -96,64 +97,64 @@ enum {
COL_COUNT
};
-static void accounts_dialog_setup (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
- McAccount *account);
-static void accounts_dialog_model_setup (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_model_add_columns (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_model_select_first (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
- GtkCellRenderer *cell,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- EmpathyAccountsDialog *dialog);
-static McAccount *accounts_dialog_model_get_selected (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_model_set_selected (EmpathyAccountsDialog *dialog,
- McAccount *account);
-static gboolean accounts_dialog_model_remove_selected (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
- McAccount *account);
-static void accounts_dialog_account_added_cb (McAccountMonitor *monitor,
- gchar *unique_name,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_account_removed_cb (McAccountMonitor *monitor,
- gchar *unique_name,
- EmpathyAccountsDialog *dialog);
-static gboolean accounts_dialog_row_changed_foreach (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data);
-static gboolean accounts_dialog_flash_connecting_cb (EmpathyAccountsDialog *dialog);
-static void accounts_dialog_status_changed_cb (MissionControl *mc,
- TelepathyConnectionStatus status,
- McPresence presence,
- TelepathyConnectionStatusReason reason,
- const gchar *unique_name,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_button_create_clicked_cb (GtkWidget *button,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_button_back_clicked_cb (GtkWidget *button,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_button_connect_clicked_cb (GtkWidget *button,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_button_add_clicked_cb (GtkWidget *button,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_remove_response_cb (GtkWidget *dialog,
- gint response,
- McAccount *account);
-static void accounts_dialog_button_remove_clicked_cb (GtkWidget *button,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_treeview_row_activated_cb (GtkTreeView *tree_view,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_response_cb (GtkWidget *widget,
- gint response,
- EmpathyAccountsDialog *dialog);
-static void accounts_dialog_destroy_cb (GtkWidget *widget,
- EmpathyAccountsDialog *dialog);
+static void accounts_dialog_setup (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
+ McAccount *account);
+static void accounts_dialog_model_setup (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_add_columns (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_select_first (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
+ GtkCellRenderer *cell,
+ GtkTreeModel *model,
+ GtkTreeIter *iter,
+ EmpathyAccountsDialog *dialog);
+static McAccount *accounts_dialog_model_get_selected (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_set_selected (EmpathyAccountsDialog *dialog,
+ McAccount *account);
+static gboolean accounts_dialog_model_remove_selected (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_model_selection_changed (GtkTreeSelection *selection,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
+ McAccount *account);
+static void accounts_dialog_account_added_cb (McAccountMonitor *monitor,
+ gchar *unique_name,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_account_removed_cb (McAccountMonitor *monitor,
+ gchar *unique_name,
+ EmpathyAccountsDialog *dialog);
+static gboolean accounts_dialog_row_changed_foreach (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer user_data);
+static gboolean accounts_dialog_flash_connecting_cb (EmpathyAccountsDialog *dialog);
+static void accounts_dialog_status_changed_cb (MissionControl *mc,
+ TpConnectionStatus status,
+ McPresence presence,
+ TpConnectionStatusReason reason,
+ const gchar *unique_name,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_button_create_clicked_cb (GtkWidget *button,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_button_back_clicked_cb (GtkWidget *button,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_button_connect_clicked_cb (GtkWidget *button,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_button_add_clicked_cb (GtkWidget *button,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_remove_response_cb (GtkWidget *dialog,
+ gint response,
+ McAccount *account);
+static void accounts_dialog_button_remove_clicked_cb (GtkWidget *button,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_treeview_row_activated_cb (GtkTreeView *tree_view,
+ GtkTreePath *path,
+ GtkTreeViewColumn *column,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_response_cb (GtkWidget *widget,
+ gint response,
+ EmpathyAccountsDialog *dialog);
+static void accounts_dialog_destroy_cb (GtkWidget *widget,
+ EmpathyAccountsDialog *dialog);
static void
accounts_dialog_setup (EmpathyAccountsDialog *dialog)
@@ -169,9 +170,9 @@ accounts_dialog_setup (EmpathyAccountsDialog *dialog)
accounts = mc_accounts_list ();
for (l = accounts; l; l = l->next) {
- McAccount *account;
- const gchar *name;
- TelepathyConnectionStatus status;
+ McAccount *account;
+ const gchar *name;
+ TpConnectionStatus status;
account = l->data;
@@ -192,7 +193,7 @@ accounts_dialog_setup (EmpathyAccountsDialog *dialog)
accounts_dialog_status_changed_cb (dialog->mc,
status,
MC_PRESENCE_UNSET,
- TP_CONN_STATUS_REASON_NONE_SPECIFIED,
+ TP_CONNECTION_STATUS_REASON_NONE_SPECIFIED,
mc_account_get_unique_name (account),
dialog);
@@ -289,15 +290,15 @@ accounts_dialog_update_account (EmpathyAccountsDialog *dialog,
config_ui = mc_profile_get_configuration_ui (profile);
g_object_unref (profile);
- if (!empathy_strdiff (config_ui, "jabber")) {
+ if (!tp_strdiff (config_ui, "jabber")) {
dialog->settings_widget =
empathy_account_widget_jabber_new (account);
}
- else if (!empathy_strdiff (config_ui, "msn")) {
+ else if (!tp_strdiff (config_ui, "msn")) {
dialog ->settings_widget =
empathy_account_widget_msn_new (account);
}
- else if (!empathy_strdiff (config_ui, "local-xmpp")) {
+ else if (!tp_strdiff (config_ui, "local-xmpp")) {
dialog->settings_widget =
empathy_account_widget_salut_new (account);
}
@@ -452,10 +453,10 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
GtkTreeIter *iter,
EmpathyAccountsDialog *dialog)
{
- McAccount *account;
- const gchar *icon_name;
- GdkPixbuf *pixbuf;
- TelepathyConnectionStatus status;
+ McAccount *account;
+ const gchar *icon_name;
+ GdkPixbuf *pixbuf;
+ TpConnectionStatus status;
gtk_tree_model_get (model, iter,
COL_STATUS, &status,
@@ -466,8 +467,8 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column,
pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
if (pixbuf) {
- if (status == TP_CONN_STATUS_DISCONNECTED ||
- (status == TP_CONN_STATUS_CONNECTING &&
+ if (status == TP_CONNECTION_STATUS_DISCONNECTED ||
+ (status == TP_CONNECTION_STATUS_CONNECTING &&
!dialog->connecting_show)) {
GdkPixbuf *modded_pixbuf;
@@ -602,13 +603,13 @@ static void
accounts_dialog_add_account (EmpathyAccountsDialog *dialog,
McAccount *account)
{
- TelepathyConnectionStatus status;
- const gchar *name;
- GtkTreeView *view;
- GtkTreeModel *model;
- GtkListStore *store;
- GtkTreeIter iter;
- gboolean ok;
+ TpConnectionStatus status;
+ const gchar *name;
+ GtkTreeView *view;
+ GtkTreeModel *model;
+ GtkListStore *store;
+ GtkTreeIter iter;
+ gboolean ok;
view = GTK_TREE_VIEW (dialog->treeview);
model = gtk_tree_view_get_model (view);
@@ -702,12 +703,12 @@ accounts_dialog_flash_connecting_cb (EmpathyAccountsDialog *dialog)
}
static void
-accounts_dialog_status_changed_cb (MissionControl *mc,
- TelepathyConnectionStatus status,
- McPresence presence,
- TelepathyConnectionStatusReason reason,
- const gchar *unique_name,
- EmpathyAccountsDialog *dialog)
+accounts_dialog_status_changed_cb (MissionControl *mc,
+ TpConnectionStatus status,
+ McPresence presence,
+ TpConnectionStatusReason reason,
+ const gchar *unique_name,
+ EmpathyAccountsDialog *dialog)
{
GtkTreeView *view;
GtkTreeSelection *selection;
@@ -760,13 +761,13 @@ accounts_dialog_status_changed_cb (MissionControl *mc,
/* Check if there is still accounts in CONNECTING state */
accounts = mc_accounts_list ();
for (l = accounts; l; l = l->next) {
- McAccount *this_account;
- TelepathyConnectionStatus status;
+ McAccount *this_account;
+ TpConnectionStatus status;
this_account = l->data;
status = mission_control_get_connection_status (mc, this_account, NULL);
- if (status == TP_CONN_STATUS_CONNECTING) {
+ if (status == TP_CONNECTION_STATUS_CONNECTING) {
found = TRUE;
break;
}
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 30ec5d53c..1ea2985ce 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -92,60 +92,60 @@ typedef struct {
GtkTextIter end;
} EmpathyChatSpell;
-static void empathy_chat_class_init (EmpathyChatClass *klass);
-static void empathy_chat_init (EmpathyChat *chat);
-static void chat_finalize (GObject *object);
-static void chat_destroy_cb (EmpathyTpChat *tp_chat,
- EmpathyChat *chat);
-static void chat_send (EmpathyChat *chat,
- const gchar *msg);
-static void chat_input_text_view_send (EmpathyChat *chat);
-static void chat_message_received_cb (EmpathyTpChat *tp_chat,
- EmpathyMessage *message,
- EmpathyChat *chat);
-static void chat_send_error_cb (EmpathyTpChat *tp_chat,
- EmpathyMessage *message,
- TelepathyChannelTextSendError error_code,
- EmpathyChat *chat);
-void chat_sent_message_add (EmpathyChat *chat,
- const gchar *str);
-const gchar * chat_sent_message_get_next (EmpathyChat *chat);
-const gchar * chat_sent_message_get_last (EmpathyChat *chat);
-static gboolean chat_input_key_press_event_cb (GtkWidget *widget,
- GdkEventKey *event,
- EmpathyChat *chat);
-static void chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
- EmpathyChat *chat);
-static gboolean chat_text_view_focus_in_event_cb (GtkWidget *widget,
- GdkEvent *event,
- EmpathyChat *chat);
-static void chat_text_view_scroll_hide_cb (GtkWidget *widget,
- EmpathyChat *chat);
-static void chat_text_view_size_allocate_cb (GtkWidget *widget,
- GtkAllocation *allocation,
- EmpathyChat *chat);
-static void chat_text_view_realize_cb (GtkWidget *widget,
- EmpathyChat *chat);
-static void chat_text_populate_popup_cb (GtkTextView *view,
- GtkMenu *menu,
- EmpathyChat *chat);
-static void chat_text_check_word_spelling_cb (GtkMenuItem *menuitem,
- EmpathyChatSpell *chat_spell);
-static EmpathyChatSpell *chat_spell_new (EmpathyChat *chat,
- const gchar *word,
- GtkTextIter start,
- GtkTextIter end);
-static void chat_spell_free (EmpathyChatSpell *chat_spell);
-static void chat_composing_start (EmpathyChat *chat);
-static void chat_composing_stop (EmpathyChat *chat);
-static void chat_composing_remove_timeout (EmpathyChat *chat);
-static gboolean chat_composing_stop_timeout_cb (EmpathyChat *chat);
-static void chat_state_changed_cb (EmpathyTpChat *tp_chat,
- EmpathyContact *contact,
- TelepathyChannelChatState state,
- EmpathyChat *chat);
-static void chat_add_logs (EmpathyChat *chat);
-static gboolean chat_scroll_down_idle_func (EmpathyChat *chat);
+static void empathy_chat_class_init (EmpathyChatClass *klass);
+static void empathy_chat_init (EmpathyChat *chat);
+static void chat_finalize (GObject *object);
+static void chat_destroy_cb (EmpathyTpChat *tp_chat,
+ EmpathyChat *chat);
+static void chat_send (EmpathyChat *chat,
+ const gchar *msg);
+static void chat_input_text_view_send (EmpathyChat *chat);
+static void chat_message_received_cb (EmpathyTpChat *tp_chat,
+ EmpathyMessage *message,
+ EmpathyChat *chat);
+static void chat_send_error_cb (EmpathyTpChat *tp_chat,
+ EmpathyMessage *message,
+ TpChannelTextSendError error_code,
+ EmpathyChat *chat);
+void chat_sent_message_add (EmpathyChat *chat,
+ const gchar *str);
+const gchar * chat_sent_message_get_next (EmpathyChat *chat);
+const gchar * chat_sent_message_get_last (EmpathyChat *chat);
+static gboolean chat_input_key_press_event_cb (GtkWidget *widget,
+ GdkEventKey *event,
+ EmpathyChat *chat);
+static void chat_input_text_buffer_changed_cb (GtkTextBuffer *buffer,
+ EmpathyChat *chat);
+static gboolean chat_text_view_focus_in_event_cb (GtkWidget *widget,
+ GdkEvent *event,
+ EmpathyChat *chat);
+static void chat_text_view_scroll_hide_cb (GtkWidget *widget,
+ EmpathyChat *chat);
+static void chat_text_view_size_allocate_cb (GtkWidget *widget,
+ GtkAllocation *allocation,
+ EmpathyChat *chat);
+static void chat_text_view_realize_cb (GtkWidget *widget,
+ EmpathyChat *chat);
+static void chat_text_populate_popup_cb (GtkTextView *view,
+ GtkMenu *menu,
+ EmpathyChat *chat);
+static void chat_text_check_word_spelling_cb (GtkMenuItem *menuitem,
+ EmpathyChatSpell *chat_spell);
+static EmpathyChatSpell *chat_spell_new (EmpathyChat *chat,
+ const gchar *word,
+ GtkTextIter start,
+ GtkTextIter end);
+static void chat_spell_free (EmpathyChatSpell *chat_spell);
+static void chat_composing_start (EmpathyChat *chat);
+static void chat_composing_stop (EmpathyChat *chat);
+static void chat_composing_remove_timeout (EmpathyChat *chat);
+static gboolean chat_composing_stop_timeout_cb (EmpathyChat *chat);
+static void chat_state_changed_cb (EmpathyTpChat *tp_chat,
+ EmpathyContact *contact,
+ TpChannelChatState state,
+ EmpathyChat *chat);
+static void chat_add_logs (EmpathyChat *chat);
+static gboolean chat_scroll_down_idle_func (EmpathyChat *chat);
enum {
COMPOSING,
@@ -436,10 +436,10 @@ chat_message_received_cb (EmpathyTpChat *tp_chat,
}
static void
-chat_send_error_cb (EmpathyTpChat *tp_chat,
- EmpathyMessage *message,
- TelepathyChannelTextSendError error_code,
- EmpathyChat *chat)
+chat_send_error_cb (EmpathyTpChat *tp_chat,
+ EmpathyMessage *message,
+ TpChannelTextSendError error_code,
+ EmpathyChat *chat)
{
const gchar *error;
gchar *str;
@@ -1075,10 +1075,10 @@ chat_composing_stop_timeout_cb (EmpathyChat *chat)
}
static void
-chat_state_changed_cb (EmpathyTpChat *tp_chat,
- EmpathyContact *contact,
- TelepathyChannelChatState state,
- EmpathyChat *chat)
+chat_state_changed_cb (EmpathyTpChat *tp_chat,
+ EmpathyContact *contact,
+ TpChannelChatState state,
+ EmpathyChat *chat)
{
EmpathyChatPriv *priv;
GList *l;
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 54d62a3d0..68f63f646 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -233,15 +233,15 @@ static gboolean
can_add_contact_to_account (McAccount *account,
gpointer user_data)
{
- MissionControl *mc;
- TelepathyConnectionStatus status;
- McProfile *profile;
- const gchar *protocol_name;
+ MissionControl *mc;
+ TpConnectionStatus status;
+ McProfile *profile;
+ const gchar *protocol_name;
mc = empathy_mission_control_new ();
status = mission_control_get_connection_status (mc, account, NULL);
g_object_unref (mc);
- if (status != TP_CONN_STATUS_CONNECTED) {
+ if (status != TP_CONNECTION_STATUS_CONNECTED) {
/* Account is disconnected */
return FALSE;
}
diff --git a/libempathy-gtk/empathy-group-chat.c b/libempathy-gtk/empathy-group-chat.c
index 442db950f..948f728e5 100644
--- a/libempathy-gtk/empathy-group-chat.c
+++ b/libempathy-gtk/empathy-group-chat.c
@@ -33,6 +33,8 @@
#include <glade/glade.h>
#include <glib/gi18n.h>
+#include <telepathy-glib/util.h>
+
#include <libempathy/empathy-tp-chat.h>
#include <libempathy/empathy-tp-chatroom.h>
#include <libempathy/empathy-contact.h>
@@ -561,7 +563,7 @@ group_chat_subject_notify_cb (EmpathyTpChat *tp_chat,
priv = GET_PRIV (chat);
g_object_get (priv->tp_chat, "subject", &str, NULL);
- if (!empathy_strdiff (priv->topic, str)) {
+ if (!tp_strdiff (priv->topic, str)) {
g_free (str);
return;
}
diff --git a/libempathy-gtk/empathy-main-window.c b/libempathy-gtk/empathy-main-window.c
index cde7dbf67..399d0e5ee 100644
--- a/libempathy-gtk/empathy-main-window.c
+++ b/libempathy-gtk/empathy-main-window.c
@@ -95,80 +95,80 @@ typedef struct {
GList *widgets_disconnected; /* ... disconnected accounts */
} EmpathyMainWindow;
-static void main_window_destroy_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_setup (EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_added_cb (EmpathyChatroomManager *manager,
- EmpathyChatroom *chatroom,
- EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_removed_cb (EmpathyChatroomManager *manager,
- EmpathyChatroom *chatroom,
- EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_activate_cb (GtkMenuItem *menu_item,
- EmpathyChatroom *chatroom);
-static void main_window_favorite_chatroom_menu_update (EmpathyMainWindow *window);
-static void main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
- EmpathyChatroom *chatroom);
-static void main_window_favorite_chatroom_join (EmpathyChatroom *chatroom);
-static void main_window_chat_quit_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_chat_new_message_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_chat_history_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_room_join_new_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_room_join_favorites_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_room_manage_favorites_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_chat_add_contact_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_chat_show_offline_cb (GtkCheckMenuItem *item,
- EmpathyMainWindow *window);
-static gboolean main_window_edit_button_press_event_cb (GtkWidget *widget,
- GdkEventButton *event,
- EmpathyMainWindow *window);
-static void main_window_edit_accounts_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_edit_personal_information_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_edit_preferences_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_help_about_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static void main_window_help_contents_cb (GtkWidget *widget,
- EmpathyMainWindow *window);
-static gboolean main_window_throbber_button_press_event_cb (GtkWidget *throbber_ebox,
- GdkEventButton *event,
- EmpathyMainWindow *window);
-static void main_window_status_changed_cb (MissionControl *mc,
- TelepathyConnectionStatus status,
- McPresence presence,
- TelepathyConnectionStatusReason reason,
- const gchar *unique_name,
- EmpathyMainWindow *window);
-static void main_window_update_status (EmpathyMainWindow *window);
+static void main_window_destroy_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_favorite_chatroom_menu_setup (EmpathyMainWindow *window);
+static void main_window_favorite_chatroom_menu_added_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
+ EmpathyMainWindow *window);
+static void main_window_favorite_chatroom_menu_removed_cb (EmpathyChatroomManager *manager,
+ EmpathyChatroom *chatroom,
+ EmpathyMainWindow *window);
+static void main_window_favorite_chatroom_menu_activate_cb (GtkMenuItem *menu_item,
+ EmpathyChatroom *chatroom);
+static void main_window_favorite_chatroom_menu_update (EmpathyMainWindow *window);
+static void main_window_favorite_chatroom_menu_add (EmpathyMainWindow *window,
+ EmpathyChatroom *chatroom);
+static void main_window_favorite_chatroom_join (EmpathyChatroom *chatroom);
+static void main_window_chat_quit_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_chat_new_message_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_chat_history_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_room_join_new_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_room_join_favorites_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_room_manage_favorites_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_chat_add_contact_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_chat_show_offline_cb (GtkCheckMenuItem *item,
+ EmpathyMainWindow *window);
+static gboolean main_window_edit_button_press_event_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ EmpathyMainWindow *window);
+static void main_window_edit_accounts_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_edit_personal_information_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_edit_preferences_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_help_about_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static void main_window_help_contents_cb (GtkWidget *widget,
+ EmpathyMainWindow *window);
+static gboolean main_window_throbber_button_press_event_cb (GtkWidget *throbber_ebox,
+ GdkEventButton *event,
+ EmpathyMainWindow *window);
+static void main_window_status_changed_cb (MissionControl *mc,
+ TpConnectionStatus status,
+ McPresence presence,
+ TpConnectionStatusReason reason,
+ const gchar *unique_name,
+ EmpathyMainWindow *window);
+static void main_window_update_status (EmpathyMainWindow *window);
static void main_window_accels_load (void);
static void main_window_accels_save (void);
-static void main_window_connection_items_setup (EmpathyMainWindow *window,
- GladeXML *glade);
-static gboolean main_window_configure_event_timeout_cb (EmpathyMainWindow *window);
-static gboolean main_window_configure_event_cb (GtkWidget *widget,
- GdkEventConfigure *event,
- EmpathyMainWindow *window);
-static void main_window_notify_show_offline_cb (EmpathyConf *conf,
- const gchar *key,
- gpointer check_menu_item);
-static void main_window_notify_show_avatars_cb (EmpathyConf *conf,
- const gchar *key,
- EmpathyMainWindow *window);
-static void main_window_notify_compact_contact_list_cb (EmpathyConf *conf,
- const gchar *key,
- EmpathyMainWindow *window);
-static void main_window_notify_sort_criterium_cb (EmpathyConf *conf,
- const gchar *key,
- EmpathyMainWindow *window);
+static void main_window_connection_items_setup (EmpathyMainWindow *window,
+ GladeXML *glade);
+static gboolean main_window_configure_event_timeout_cb (EmpathyMainWindow *window);
+static gboolean main_window_configure_event_cb (GtkWidget *widget,
+ GdkEventConfigure *event,
+ EmpathyMainWindow *window);
+static void main_window_notify_show_offline_cb (EmpathyConf *conf,
+ const gchar *key,
+ gpointer check_menu_item);
+static void main_window_notify_show_avatars_cb (EmpathyConf *conf,
+ const gchar *key,
+ EmpathyMainWindow *window);
+static void main_window_notify_compact_contact_list_cb (EmpathyConf *conf,
+ const gchar *key,
+ EmpathyMainWindow *window);
+static void main_window_notify_sort_criterium_cb (EmpathyConf *conf,
+ const gchar *key,
+ EmpathyMainWindow *window);
GtkWidget *
empathy_main_window_show (void)
@@ -874,12 +874,12 @@ main_window_error_display (EmpathyMainWindow *window,
}
static void
-main_window_status_changed_cb (MissionControl *mc,
- TelepathyConnectionStatus status,
- McPresence presence,
- TelepathyConnectionStatusReason reason,
- const gchar *unique_name,
- EmpathyMainWindow *window)
+main_window_status_changed_cb (MissionControl *mc,
+ TpConnectionStatus status,
+ McPresence presence,
+ TpConnectionStatusReason reason,
+ const gchar *unique_name,
+ EmpathyMainWindow *window)
{
McAccount *account;
@@ -887,45 +887,45 @@ main_window_status_changed_cb (MissionControl *mc,
account = mc_account_lookup (unique_name);
- if (status == TP_CONN_STATUS_DISCONNECTED &&
- reason > TP_CONN_STATUS_REASON_REQUESTED) {
+ if (status == TP_CONNECTION_STATUS_DISCONNECTED &&
+ reason > TP_CONNECTION_STATUS_REASON_REQUESTED) {
const gchar *message;
switch (reason) {
- case TP_CONN_STATUS_REASON_NETWORK_ERROR:
+ case TP_CONNECTION_STATUS_REASON_NETWORK_ERROR:
message = _("Network error");
break;
- case TP_CONN_STATUS_REASON_AUTHENTICATION_FAILED:
+ case TP_CONNECTION_STATUS_REASON_AUTHENTICATION_FAILED:
message = _("Authentication failed");
break;
- case TP_CONN_STATUS_REASON_ENCRYPTION_ERROR:
+ case TP_CONNECTION_STATUS_REASON_ENCRYPTION_ERROR:
message = _("Encryption error");
break;
- case TP_CONN_STATUS_REASON_NAME_IN_USE:
+ case TP_CONNECTION_STATUS_REASON_NAME_IN_USE:
message = _("Name in use");
break;
- case TP_CONN_STATUS_REASON_CERT_NOT_PROVIDED:
+ case TP_CONNECTION_STATUS_REASON_CERT_NOT_PROVIDED:
message = _("Certificate not provided");
break;
- case TP_CONN_STATUS_REASON_CERT_UNTRUSTED:
+ case TP_CONNECTION_STATUS_REASON_CERT_UNTRUSTED:
message = _("Certificate untrusted");
break;
- case TP_CONN_STATUS_REASON_CERT_EXPIRED:
+ case TP_CONNECTION_STATUS_REASON_CERT_EXPIRED:
message = _("Certificate expired");
break;
- case TP_CONN_STATUS_REASON_CERT_NOT_ACTIVATED:
+ case TP_CONNECTION_STATUS_REASON_CERT_NOT_ACTIVATED:
message = _("Certificate not activated");
break;
- case TP_CONN_STATUS_REASON_CERT_HOSTNAME_MISMATCH:
+ case TP_CONNECTION_STATUS_REASON_CERT_HOSTNAME_MISMATCH:
message = _("Certificate hostname mismatch");
break;
- case TP_CONN_STATUS_REASON_CERT_FINGERPRINT_MISMATCH:
+ case TP_CONNECTION_STATUS_REASON_CERT_FINGERPRINT_MISMATCH:
message = _("Certificate fingerprint mismatch");
break;
- case TP_CONN_STATUS_REASON_CERT_SELF_SIGNED:
+ case TP_CONNECTION_STATUS_REASON_CERT_SELF_SIGNED:
message = _("Certificate self signed");
break;
- case TP_CONN_STATUS_REASON_CERT_OTHER_ERROR:
+ case TP_CONNECTION_STATUS_REASON_CERT_OTHER_ERROR:
message = _("Certificate error");
break;
default:
@@ -936,7 +936,7 @@ main_window_status_changed_cb (MissionControl *mc,
main_window_error_display (window, account, message);
}
- if (status == TP_CONN_STATUS_CONNECTED) {
+ if (status == TP_CONNECTION_STATUS_CONNECTED) {
GtkWidget *error_widget;
/* Account connected without error, remove error message if any */
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 468f6296a..6f34a3985 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -31,6 +31,7 @@
#include <gtk/gtk.h>
#include <glade/glade.h>
+#include <telepathy-glib/util.h>
#include <libmissioncontrol/mc-enum-types.h>
#include <libempathy/empathy-idle.h>
@@ -823,7 +824,7 @@ presence_chooser_dialog_message_changed_cb (GtkWidget *widget,
messages = empathy_status_presets_get (presence, -1);
for (l = messages; l; l = l->next) {
- if (!empathy_strdiff (text, l->data)) {
+ if (!tp_strdiff (text, l->data)) {
found = TRUE;
break;
}
diff --git a/libempathy-gtk/empathy-status-presets.c b/libempathy-gtk/empathy-status-presets.c
index 502772228..13b71bc75 100644
--- a/libempathy-gtk/empathy-status-presets.c
+++ b/libempathy-gtk/empathy-status-presets.c
@@ -32,6 +32,8 @@
#include <libxml/parser.h>
#include <libxml/tree.h>
+#include <telepathy-glib/util.h>
+
#include <libempathy/empathy-debug.h>
#include <libempathy/empathy-utils.h>
@@ -293,7 +295,7 @@ empathy_status_presets_set_last (McPresence state,
preset = l->data;
if (state == preset->state &&
- !empathy_strdiff (status, preset->status)) {
+ !tp_strdiff (status, preset->status)) {
return;
}
}
@@ -332,7 +334,7 @@ empathy_status_presets_remove (McPresence state,
preset = l->data;
if (state == preset->state &&
- !empathy_strdiff (status, preset->status)) {
+ !tp_strdiff (status, preset->status)) {
status_preset_free (preset);
presets = g_list_delete_link (presets, l);
status_presets_file_save ();