aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-06-26 21:43:26 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-07-01 21:19:40 +0800
commitf3d6fcb79762ff484c8b7221cec1079b0dad7fb7 (patch)
treebdbd6a83e5f4a97b239e1aaca86bf152c079b1bf
parent370bb92f2ce8ccd70bd694a6ab4ba78abeb448f9 (diff)
downloadgsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.tar
gsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.tar.gz
gsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.tar.bz2
gsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.tar.lz
gsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.tar.xz
gsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.tar.zst
gsoc2013-empathy-f3d6fcb79762ff484c8b7221cec1079b0dad7fb7.zip
Port libempathy-gtk to EmpathyAccount
-rw-r--r--libempathy-gtk/empathy-account-chooser.c71
-rw-r--r--libempathy-gtk/empathy-account-chooser.h10
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.c39
-rw-r--r--libempathy-gtk/empathy-account-widget-irc.h4
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.c9
-rw-r--r--libempathy-gtk/empathy-account-widget-sip.h4
-rw-r--r--libempathy-gtk/empathy-account-widget.c75
-rw-r--r--libempathy-gtk/empathy-account-widget.h22
-rw-r--r--libempathy-gtk/empathy-chat-text-view.c2
-rw-r--r--libempathy-gtk/empathy-chat.c8
-rw-r--r--libempathy-gtk/empathy-chat.h2
-rw-r--r--libempathy-gtk/empathy-contact-dialogs.c12
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c17
-rw-r--r--libempathy-gtk/empathy-contact-widget.c6
-rw-r--r--libempathy-gtk/empathy-irc-network-dialog.c2
-rw-r--r--libempathy-gtk/empathy-log-window.c45
-rw-r--r--libempathy-gtk/empathy-log-window.h4
-rw-r--r--libempathy-gtk/empathy-new-message-dialog.c2
-rw-r--r--libempathy-gtk/empathy-theme-adium.c4
-rw-r--r--libempathy-gtk/empathy-ui-utils.c4
-rw-r--r--libempathy-gtk/empathy-ui-utils.h4
21 files changed, 164 insertions, 182 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.c b/libempathy-gtk/empathy-account-chooser.c
index 488486fdf..7dccb2179 100644
--- a/libempathy-gtk/empathy-account-chooser.c
+++ b/libempathy-gtk/empathy-account-chooser.c
@@ -65,7 +65,7 @@ typedef struct {
typedef struct {
EmpathyAccountChooser *chooser;
- McAccount *account;
+ EmpathyAccount *account;
gboolean set;
} SetAccountData;
@@ -88,19 +88,19 @@ static void account_chooser_set_property (GObject
GParamSpec *pspec);
static void account_chooser_setup (EmpathyAccountChooser *chooser);
static void account_chooser_account_created_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
EmpathyAccountChooser *chooser);
-static void account_chooser_account_add_foreach (McAccount *account,
+static void account_chooser_account_add_foreach (EmpathyAccount *account,
EmpathyAccountChooser *chooser);
static void account_chooser_account_deleted_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
EmpathyAccountChooser *chooser);
-static void account_chooser_account_remove_foreach (McAccount *account,
+static void account_chooser_account_remove_foreach (EmpathyAccount *account,
EmpathyAccountChooser *chooser);
static void account_chooser_update_iter (EmpathyAccountChooser *chooser,
GtkTreeIter *iter);
static void account_chooser_connection_changed_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
TpConnectionStatusReason reason,
TpConnectionStatus new_status,
TpConnectionStatus old_status,
@@ -253,16 +253,16 @@ empathy_account_chooser_new (void)
* @chooser: an #EmpathyAccountChooser
*
* Returns the account which is currently selected in the chooser or %NULL
- * if there is no account selected. The #McAccount returned should be
+ * if there is no account selected. The #EmpathyAccount returned should be
* unrefed with g_object_unref() when finished with.
*
- * Return value: a new ref to the #McAccount currently selected, or %NULL.
+ * Return value: a new ref to the #EmpathyAccount currently selected, or %NULL.
*/
-McAccount *
+EmpathyAccount *
empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser)
{
EmpathyAccountChooserPriv *priv;
- McAccount *account;
+ EmpathyAccount *account;
GtkTreeModel *model;
GtkTreeIter iter;
@@ -295,7 +295,7 @@ TpConnection *
empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
{
EmpathyAccountChooserPriv *priv;
- McAccount *account;
+ EmpathyAccount *account;
TpConnection *connection;
g_return_val_if_fail (EMPATHY_IS_ACCOUNT_CHOOSER (chooser), NULL);
@@ -303,7 +303,7 @@ empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
priv = GET_PRIV (chooser);
account = empathy_account_chooser_dup_account (chooser);
- connection = empathy_account_manager_get_connection (priv->manager, account);
+ connection = empathy_account_get_connection (account);
g_object_unref (account);
return connection;
@@ -312,7 +312,7 @@ empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
/**
* empathy_account_chooser_set_account:
* @chooser: an #EmpathyAccountChooser
- * @account: an #McAccount
+ * @account: an #EmpathyAccount
*
* Sets the currently selected account to @account, if it exists in the list.
*
@@ -320,7 +320,7 @@ empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser)
*/
gboolean
empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
- McAccount *account)
+ EmpathyAccount *account)
{
GtkComboBox *combobox;
GtkTreeModel *model;
@@ -457,7 +457,7 @@ account_chooser_setup (EmpathyAccountChooser *chooser)
G_TYPE_STRING, /* Image */
G_TYPE_STRING, /* Name */
G_TYPE_BOOLEAN, /* Enabled */
- MC_TYPE_ACCOUNT);
+ EMPATHY_TYPE_ACCOUNT);
gtk_combo_box_set_model (combobox, GTK_TREE_MODEL (store));
@@ -477,25 +477,25 @@ account_chooser_setup (EmpathyAccountChooser *chooser)
NULL);
/* Populate accounts */
- accounts = mc_accounts_list ();
+ accounts = empathy_account_manager_dup_accounts (priv->manager);
g_list_foreach (accounts,
(GFunc) account_chooser_account_add_foreach,
chooser);
- mc_accounts_list_free (accounts);
+ g_list_free (accounts);
g_object_unref (store);
}
static void
account_chooser_account_created_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
EmpathyAccountChooser *chooser)
{
account_chooser_account_add_foreach (account, chooser);
}
static void
-account_chooser_account_add_foreach (McAccount *account,
+account_chooser_account_add_foreach (EmpathyAccount *account,
EmpathyAccountChooser *chooser)
{
GtkListStore *store;
@@ -511,18 +511,20 @@ account_chooser_account_add_foreach (McAccount *account,
COL_ACCOUNT_POINTER, account,
-1);
account_chooser_update_iter (chooser, &iter);
+ /* We got a reffed account and it was reffed by the liststore as well */
+ g_object_unref (account);
}
static void
account_chooser_account_deleted_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
EmpathyAccountChooser *chooser)
{
account_chooser_account_remove_foreach (account, chooser);
}
typedef struct {
- McAccount *account;
+ EmpathyAccount *account;
GtkTreeIter *iter;
gboolean found;
} FindAccountData;
@@ -534,7 +536,7 @@ account_chooser_find_account_foreach (GtkTreeModel *model,
gpointer user_data)
{
FindAccountData *data = user_data;
- McAccount *account;
+ EmpathyAccount *account;
gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
@@ -553,7 +555,7 @@ account_chooser_find_account_foreach (GtkTreeModel *model,
static gboolean
account_chooser_find_account (EmpathyAccountChooser *chooser,
- McAccount *account,
+ EmpathyAccount *account,
GtkTreeIter *iter)
{
GtkListStore *store;
@@ -573,7 +575,7 @@ account_chooser_find_account (EmpathyAccountChooser *chooser,
}
static void
-account_chooser_account_remove_foreach (McAccount *account,
+account_chooser_account_remove_foreach (EmpathyAccount *account,
EmpathyAccountChooser *chooser)
{
GtkListStore *store;
@@ -595,7 +597,7 @@ account_chooser_update_iter (EmpathyAccountChooser *chooser,
EmpathyAccountChooserPriv *priv;
GtkListStore *store;
GtkComboBox *combobox;
- McAccount *account;
+ EmpathyAccount *account;
const gchar *icon_name;
gboolean is_enabled = TRUE;
@@ -615,7 +617,7 @@ account_chooser_update_iter (EmpathyAccountChooser *chooser,
gtk_list_store_set (store, iter,
COL_ACCOUNT_IMAGE, icon_name,
- COL_ACCOUNT_TEXT, mc_account_get_display_name (account),
+ COL_ACCOUNT_TEXT, empathy_account_get_display_name (account),
COL_ACCOUNT_ENABLED, is_enabled,
-1);
@@ -630,7 +632,7 @@ account_chooser_update_iter (EmpathyAccountChooser *chooser,
static void
account_chooser_connection_changed_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
TpConnectionStatusReason reason,
TpConnectionStatus new_status,
TpConnectionStatus old_status,
@@ -671,7 +673,7 @@ account_chooser_set_account_foreach (GtkTreeModel *model,
GtkTreeIter *iter,
SetAccountData *data)
{
- McAccount *account;
+ EmpathyAccount *account;
gboolean equal;
gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
@@ -744,7 +746,7 @@ empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser,
/**
* EmpathyAccountChooserFilterFunc:
- * @account: an #McAccount
+ * @account: an #EmpathyAccount
* @user_data: user data, or %NULL
*
* A function which decides whether the account indicated by @account
@@ -755,7 +757,7 @@ empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser,
/**
* empathy_account_chooser_filter_is_connected:
- * @account: an #McAccount
+ * @account: an #EmpathyAccount
* @user_data: user data or %NULL
*
* A useful #EmpathyAccountChooserFilterFunc that one could pass into
@@ -764,17 +766,12 @@ empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser,
* Return value: Whether @account is connected
*/
gboolean
-empathy_account_chooser_filter_is_connected (McAccount *account,
+empathy_account_chooser_filter_is_connected (EmpathyAccount *account,
gpointer user_data)
{
- MissionControl *mc;
TpConnectionStatus status;
- g_return_val_if_fail (MC_IS_ACCOUNT (account), FALSE);
-
- mc = empathy_mission_control_dup_singleton ();
- status = mission_control_get_connection_status (mc, account, NULL);
- g_object_unref (mc);
+ g_object_get (account, "status", &status, NULL);
return status == TP_CONNECTION_STATUS_CONNECTED;
}
diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h
index c2105406a..255b6841f 100644
--- a/libempathy-gtk/empathy-account-chooser.h
+++ b/libempathy-gtk/empathy-account-chooser.h
@@ -27,7 +27,7 @@
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-account.h>
G_BEGIN_DECLS
@@ -38,7 +38,7 @@ G_BEGIN_DECLS
#define EMPATHY_IS_ACCOUNT_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_ACCOUNT_CHOOSER))
#define EMPATHY_ACCOUNT_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserClass))
-typedef gboolean (* EmpathyAccountChooserFilterFunc) (McAccount *account,
+typedef gboolean (* EmpathyAccountChooserFilterFunc) (EmpathyAccount *account,
gpointer user_data);
@@ -58,17 +58,17 @@ struct _EmpathyAccountChooserClass {
GType empathy_account_chooser_get_type (void) G_GNUC_CONST;
GtkWidget * empathy_account_chooser_new (void);
-McAccount * empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser);
+EmpathyAccount * empathy_account_chooser_dup_account (EmpathyAccountChooser *chooser);
TpConnection * empathy_account_chooser_get_connection (EmpathyAccountChooser *chooser);
gboolean empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
- McAccount *account);
+ EmpathyAccount *account);
gboolean empathy_account_chooser_get_has_all_option (EmpathyAccountChooser *chooser);
void empathy_account_chooser_set_has_all_option (EmpathyAccountChooser *chooser,
gboolean has_all_option);
void empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser,
EmpathyAccountChooserFilterFunc filter,
gpointer user_data);
-gboolean empathy_account_chooser_filter_is_connected (McAccount *account,
+gboolean empathy_account_chooser_filter_is_connected (EmpathyAccount *account,
gpointer user_data);
G_END_DECLS
diff --git a/libempathy-gtk/empathy-account-widget-irc.c b/libempathy-gtk/empathy-account-widget-irc.c
index 1306f517f..688a3e0e6 100644
--- a/libempathy-gtk/empathy-account-widget-irc.c
+++ b/libempathy-gtk/empathy-account-widget-irc.c
@@ -27,7 +27,6 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
@@ -44,7 +43,7 @@
#define IRC_NETWORKS_FILENAME "irc-networks.xml"
typedef struct {
- McAccount *account;
+ EmpathyAccount *account;
EmpathyIrcNetworkManager *network_manager;
GtkWidget *vbox_settings;
@@ -70,9 +69,9 @@ static void
unset_server_params (EmpathyAccountWidgetIrc *settings)
{
DEBUG ("Unset server, port and use-ssl");
- mc_account_unset_param (settings->account, "server");
- mc_account_unset_param (settings->account, "port");
- mc_account_unset_param (settings->account, "use-ssl");
+ empathy_account_unset_param (settings->account, "server");
+ empathy_account_unset_param (settings->account, "port");
+ empathy_account_unset_param (settings->account, "use-ssl");
}
static void
@@ -98,7 +97,7 @@ update_server_params (EmpathyAccountWidgetIrc *settings)
g_object_get (network, "charset", &charset, NULL);
DEBUG ("Setting charset to %s", charset);
- mc_account_set_param_string (settings->account, "charset", charset);
+ empathy_account_set_param_string (settings->account, "charset", charset);
g_free (charset);
servers = empathy_irc_network_get_servers (network);
@@ -117,11 +116,11 @@ update_server_params (EmpathyAccountWidgetIrc *settings)
NULL);
DEBUG ("Setting server to %s", address);
- mc_account_set_param_string (settings->account, "server", address);
+ empathy_account_set_param_string (settings->account, "server", address);
DEBUG ("Setting port to %u", port);
- mc_account_set_param_int (settings->account, "port", port);
+ empathy_account_set_param_int (settings->account, "port", port);
DEBUG ("Setting use-ssl to %s", ssl ? "TRUE": "FALSE" );
- mc_account_set_param_boolean (settings->account, "use-ssl", ssl);
+ empathy_account_set_param_boolean (settings->account, "use-ssl", ssl);
g_free (address);
}
@@ -332,17 +331,17 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
gboolean ssl = FALSE;
EmpathyIrcNetwork *network = NULL;
- mc_account_get_param_string (settings->account, "account", &nick);
- mc_account_get_param_string (settings->account, "fullname", &fullname);
- mc_account_get_param_string (settings->account, "server", &server);
- mc_account_get_param_string (settings->account, "charset", &charset);
- mc_account_get_param_int (settings->account, "port", &port);
- mc_account_get_param_boolean (settings->account, "use-ssl", &ssl);
+ nick = empathy_account_get_param_string (settings->account, "account");
+ fullname = empathy_account_get_param_string (settings->account, "fullname");
+ server = empathy_account_get_param_string (settings->account, "server");
+ charset = empathy_account_get_param_string (settings->account, "charset");
+ port = empathy_account_get_param_int (settings->account, "port");
+ ssl = empathy_account_get_param_boolean (settings->account, "use-ssl");
if (!nick)
{
nick = g_strdup (g_get_user_name ());
- mc_account_set_param_string (settings->account, "account", nick);
+ empathy_account_set_param_string (settings->account, "account", nick);
}
if (!fullname)
@@ -352,7 +351,7 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
{
fullname = g_strdup (nick);
}
- mc_account_set_param_string (settings->account, "fullname", fullname);
+ empathy_account_set_param_string (settings->account, "fullname", fullname);
}
if (server != NULL)
@@ -414,14 +413,14 @@ account_widget_irc_setup (EmpathyAccountWidgetIrc *settings)
/**
* empathy_account_widget_irc_new:
- * @account: the #McAccount to configure
+ * @account: the #EmpathyAccount to configure
*
- * Creates a new IRC account widget to configure a given #McAccount
+ * Creates a new IRC account widget to configure a given #EmpathyAccount
*
* Returns: The toplevel container of the configuration widget
*/
GtkWidget *
-empathy_account_widget_irc_new (McAccount *account)
+empathy_account_widget_irc_new (EmpathyAccount *account)
{
EmpathyAccountWidgetIrc *settings;
gchar *dir, *user_file_with_path, *global_file_with_path;
diff --git a/libempathy-gtk/empathy-account-widget-irc.h b/libempathy-gtk/empathy-account-widget-irc.h
index a89081fc0..40e58bbc3 100644
--- a/libempathy-gtk/empathy-account-widget-irc.h
+++ b/libempathy-gtk/empathy-account-widget-irc.h
@@ -22,11 +22,11 @@
#define __EMPATHY_ACCOUNT_WIDGET_IRC_H__
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-account.h>
G_BEGIN_DECLS
-GtkWidget * empathy_account_widget_irc_new (McAccount *account);
+GtkWidget * empathy_account_widget_irc_new (EmpathyAccount *account);
G_END_DECLS
diff --git a/libempathy-gtk/empathy-account-widget-sip.c b/libempathy-gtk/empathy-account-widget-sip.c
index da6082495..05e917e53 100644
--- a/libempathy-gtk/empathy-account-widget-sip.c
+++ b/libempathy-gtk/empathy-account-widget-sip.c
@@ -28,7 +28,6 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
@@ -38,7 +37,7 @@
#include "empathy-ui-utils.h"
typedef struct {
- McAccount *account;
+ EmpathyAccount *account;
GtkWidget *vbox_settings;
@@ -69,14 +68,14 @@ account_widget_sip_discover_stun_toggled_cb (
/**
* empathy_account_widget_sip_new:
- * @account: the #McAccount to configure
+ * @account: the #EmpathyAccount to configure
*
- * Creates a new SIP account widget to configure a given #McAccount
+ * Creates a new SIP account widget to configure a given #EmpathyAccount
*
* Returns: The toplevel container of the configuration widget
*/
GtkWidget *
-empathy_account_widget_sip_new (McAccount *account)
+empathy_account_widget_sip_new (EmpathyAccount *account)
{
EmpathyAccountWidgetSip *settings;
GtkBuilder *gui;
diff --git a/libempathy-gtk/empathy-account-widget-sip.h b/libempathy-gtk/empathy-account-widget-sip.h
index 9187c1e0c..69f60aacc 100644
--- a/libempathy-gtk/empathy-account-widget-sip.h
+++ b/libempathy-gtk/empathy-account-widget-sip.h
@@ -22,11 +22,11 @@
#define __EMPATHY_ACCOUNT_WIDGET_SIP_H__
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-account.h>
G_BEGIN_DECLS
-GtkWidget * empathy_account_widget_sip_new (McAccount *account);
+GtkWidget * empathy_account_widget_sip_new (EmpathyAccount *account);
G_END_DECLS
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index b0d7f8de5..f602cd8bd 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -29,10 +29,10 @@
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-account.h>
#include "empathy-account-widget.h"
#include "empathy-ui-utils.h"
@@ -43,7 +43,7 @@
static gboolean
account_widget_entry_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- McAccount *account)
+ EmpathyAccount *account)
{
const gchar *str;
const gchar *param_name;
@@ -54,8 +54,8 @@ account_widget_entry_focus_cb (GtkWidget *widget,
if (EMP_STR_EMPTY (str)) {
gchar *value = NULL;
- mc_account_unset_param (account, param_name);
- mc_account_get_param_string (account, param_name, &value);
+ empathy_account_unset_param (account, param_name);
+ value = empathy_account_get_param_string (account, param_name);
DEBUG ("Unset %s and restore to %s", param_name, value);
gtk_entry_set_text (GTK_ENTRY (widget), value ? value : "");
g_free (value);
@@ -64,7 +64,7 @@ account_widget_entry_focus_cb (GtkWidget *widget,
const gchar *domain = NULL;
gchar *dup_str = NULL;
- profile = mc_account_get_profile (account);
+ profile = empathy_account_get_profile (account);
if (mc_profile_get_capabilities (profile) &
MC_PROFILE_CAPABILITY_SPLIT_ACCOUNT) {
domain = mc_profile_get_default_account_domain (profile);
@@ -78,7 +78,7 @@ account_widget_entry_focus_cb (GtkWidget *widget,
}
DEBUG ("Setting %s to %s", param_name,
strstr (param_name, "password") ? "***" : str);
- mc_account_set_param_string (account, param_name, str);
+ empathy_account_set_param_string (account, param_name, str);
g_free (dup_str);
g_object_unref (profile);
}
@@ -88,7 +88,7 @@ account_widget_entry_focus_cb (GtkWidget *widget,
static void
account_widget_int_changed_cb (GtkWidget *widget,
- McAccount *account)
+ EmpathyAccount *account)
{
const gchar *param_name;
gint value;
@@ -97,19 +97,19 @@ account_widget_int_changed_cb (GtkWidget *widget,
param_name = g_object_get_data (G_OBJECT (widget), "param_name");
if (value == 0) {
- mc_account_unset_param (account, param_name);
- mc_account_get_param_int (account, param_name, &value);
+ empathy_account_unset_param (account, param_name);
+ value = empathy_account_get_param_int (account, param_name);
DEBUG ("Unset %s and restore to %d", param_name, value);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value);
} else {
DEBUG ("Setting %s to %d", param_name, value);
- mc_account_set_param_int (account, param_name, value);
+ empathy_account_set_param_int (account, param_name, value);
}
}
static void
account_widget_checkbutton_toggled_cb (GtkWidget *widget,
- McAccount *account)
+ EmpathyAccount *account)
{
gboolean value;
gboolean default_value;
@@ -121,14 +121,14 @@ account_widget_checkbutton_toggled_cb (GtkWidget *widget,
/* FIXME: This is ugly! checkbox don't have a "not-set" value so we
* always unset the param and set the value if different from the
* default value. */
- mc_account_unset_param (account, param_name);
- mc_account_get_param_boolean (account, param_name, &default_value);
+ empathy_account_unset_param (account, param_name);
+ default_value = empathy_account_get_param_boolean (account, param_name);
if (default_value == value) {
DEBUG ("Unset %s and restore to %d", param_name, default_value);
} else {
DEBUG ("Setting %s to %d", param_name, value);
- mc_account_set_param_boolean (account, param_name, value);
+ empathy_account_set_param_boolean (account, param_name, value);
}
}
@@ -136,14 +136,14 @@ static void
account_widget_forget_clicked_cb (GtkWidget *button,
GtkWidget *entry)
{
- McAccount *account;
+ EmpathyAccount *account;
const gchar *param_name;
param_name = g_object_get_data (G_OBJECT (entry), "param_name");
account = g_object_get_data (G_OBJECT (entry), "account");
DEBUG ("Unset %s", param_name);
- mc_account_unset_param (account, param_name);
+ empathy_account_unset_param (account, param_name);
gtk_entry_set_text (GTK_ENTRY (entry), "");
}
@@ -161,13 +161,13 @@ static void
account_widget_jabber_ssl_toggled_cb (GtkWidget *checkbutton_ssl,
GtkWidget *spinbutton_port)
{
- McAccount *account;
+ EmpathyAccount *account;
gboolean value;
gint port = 0;
value = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton_ssl));
account = g_object_get_data (G_OBJECT (spinbutton_port), "account");
- mc_account_get_param_int (account, "port", &port);
+ port = empathy_account_get_param_int (account, "port");
if (value) {
if (port == 5222 || port == 0) {
@@ -184,7 +184,7 @@ account_widget_jabber_ssl_toggled_cb (GtkWidget *checkbutton_ssl,
static void
account_widget_setup_widget (GtkWidget *widget,
- McAccount *account,
+ EmpathyAccount *account,
const gchar *param_name)
{
g_object_set_data_full (G_OBJECT (widget), "param_name",
@@ -195,7 +195,7 @@ account_widget_setup_widget (GtkWidget *widget,
if (GTK_IS_SPIN_BUTTON (widget)) {
gint value = 0;
- mc_account_get_param_int (account, param_name, &value);
+ value = empathy_account_get_param_int (account, param_name);
gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), value);
g_signal_connect (widget, "value-changed",
@@ -205,7 +205,7 @@ account_widget_setup_widget (GtkWidget *widget,
else if (GTK_IS_ENTRY (widget)) {
gchar *str = NULL;
- mc_account_get_param_string (account, param_name, &str);
+ str = empathy_account_get_param_string (account, param_name);
gtk_entry_set_text (GTK_ENTRY (widget), str ? str : "");
g_free (str);
@@ -220,7 +220,7 @@ account_widget_setup_widget (GtkWidget *widget,
else if (GTK_IS_TOGGLE_BUTTON (widget)) {
gboolean value = FALSE;
- mc_account_get_param_boolean (account, param_name, &value);
+ value = empathy_account_get_param_boolean (account, param_name);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), value);
g_signal_connect (widget, "toggled",
@@ -256,7 +256,7 @@ account_widget_generic_format_param_name (const gchar *param_name)
}
static void
-accounts_widget_generic_setup (McAccount *account,
+accounts_widget_generic_setup (EmpathyAccount *account,
GtkWidget *table_common_settings,
GtkWidget *table_advanced_settings)
{
@@ -264,7 +264,7 @@ accounts_widget_generic_setup (McAccount *account,
McProfile *profile;
GSList *params, *l;
- profile = mc_account_get_profile (account);
+ profile = empathy_account_get_profile (account);
protocol = mc_profile_get_protocol (profile);
if (!protocol) {
@@ -400,7 +400,7 @@ accounts_widget_generic_setup (McAccount *account,
}
static void
-account_widget_handle_params_valist (McAccount *account,
+account_widget_handle_params_valist (EmpathyAccount *account,
GtkBuilder *gui,
const gchar *first_widget,
va_list args)
@@ -424,14 +424,13 @@ account_widget_handle_params_valist (McAccount *account,
}
void
-empathy_account_widget_handle_params (McAccount *account,
+empathy_account_widget_handle_params (EmpathyAccount *account,
GtkBuilder *gui,
const gchar *first_widget,
...)
{
va_list args;
- g_return_if_fail (MC_IS_ACCOUNT (account));
g_return_if_fail (GTK_IS_BUILDER (gui));
va_start (args, first_widget);
@@ -440,7 +439,7 @@ empathy_account_widget_handle_params (McAccount *account,
}
void
-empathy_account_widget_add_forget_button (McAccount *account,
+empathy_account_widget_add_forget_button (EmpathyAccount *account,
GtkBuilder *gui,
const gchar *button,
const gchar *entry)
@@ -452,7 +451,7 @@ empathy_account_widget_add_forget_button (McAccount *account,
button_forget = GTK_WIDGET (gtk_builder_get_object (gui, button));
entry_password = GTK_WIDGET (gtk_builder_get_object (gui, entry));
- mc_account_get_param_string (account, "password", &password);
+ password = empathy_account_get_param_string (account, "password");
gtk_widget_set_sensitive (button_forget, !EMP_STR_EMPTY (password));
g_free (password);
@@ -477,7 +476,7 @@ empathy_account_widget_set_default_focus (GtkBuilder *gui,
}
GtkWidget *
-empathy_account_widget_generic_new (McAccount *account)
+empathy_account_widget_generic_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -485,8 +484,6 @@ empathy_account_widget_generic_new (McAccount *account)
GtkWidget *table_advanced_settings;
gchar *filename;
- g_return_val_if_fail (MC_IS_ACCOUNT (account), NULL);
-
filename = empathy_file_lookup ("empathy-account-widget-generic.ui",
"libempathy-gtk");
gui = empathy_builder_get_file (filename,
@@ -502,7 +499,7 @@ empathy_account_widget_generic_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_salut_new (McAccount *account)
+empathy_account_widget_salut_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -530,7 +527,7 @@ empathy_account_widget_salut_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_msn_new (McAccount *account)
+empathy_account_widget_msn_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -560,7 +557,7 @@ empathy_account_widget_msn_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_jabber_new (McAccount *account)
+empathy_account_widget_jabber_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -603,7 +600,7 @@ empathy_account_widget_jabber_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_icq_new (McAccount *account)
+empathy_account_widget_icq_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -636,7 +633,7 @@ empathy_account_widget_icq_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_aim_new (McAccount *account)
+empathy_account_widget_aim_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -668,7 +665,7 @@ empathy_account_widget_aim_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_yahoo_new (McAccount *account)
+empathy_account_widget_yahoo_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
@@ -702,7 +699,7 @@ empathy_account_widget_yahoo_new (McAccount *account)
}
GtkWidget *
-empathy_account_widget_groupwise_new (McAccount *account)
+empathy_account_widget_groupwise_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
diff --git a/libempathy-gtk/empathy-account-widget.h b/libempathy-gtk/empathy-account-widget.h
index 7287f5675..7a76db9e0 100644
--- a/libempathy-gtk/empathy-account-widget.h
+++ b/libempathy-gtk/empathy-account-widget.h
@@ -27,28 +27,28 @@
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-account.h>
G_BEGIN_DECLS
-void empathy_account_widget_handle_params (McAccount *account,
+void empathy_account_widget_handle_params (EmpathyAccount *account,
GtkBuilder *gui,
const gchar *first_widget,
...);
-void empathy_account_widget_add_forget_button (McAccount *account,
+void empathy_account_widget_add_forget_button (EmpathyAccount *account,
GtkBuilder *gui,
const gchar *button,
const gchar *entry);
void empathy_account_widget_set_default_focus (GtkBuilder *gui,
const gchar *entry);
-GtkWidget *empathy_account_widget_generic_new (McAccount *account);
-GtkWidget *empathy_account_widget_salut_new (McAccount *account);
-GtkWidget *empathy_account_widget_msn_new (McAccount *account);
-GtkWidget *empathy_account_widget_jabber_new (McAccount *account);
-GtkWidget *empathy_account_widget_icq_new (McAccount *account);
-GtkWidget *empathy_account_widget_aim_new (McAccount *account);
-GtkWidget *empathy_account_widget_yahoo_new (McAccount *account);
-GtkWidget *empathy_account_widget_groupwise_new (McAccount *account);
+GtkWidget *empathy_account_widget_generic_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_salut_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_msn_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_jabber_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_icq_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_aim_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_yahoo_new (EmpathyAccount *account);
+GtkWidget *empathy_account_widget_groupwise_new (EmpathyAccount *account);
G_END_DECLS
diff --git a/libempathy-gtk/empathy-chat-text-view.c b/libempathy-gtk/empathy-chat-text-view.c
index c47b5474f..5ed7c69c3 100644
--- a/libempathy-gtk/empathy-chat-text-view.c
+++ b/libempathy-gtk/empathy-chat-text-view.c
@@ -34,9 +34,9 @@
#include <gtk/gtk.h>
#include <telepathy-glib/util.h>
-#include <libmissioncontrol/mc-account.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-account.h>
#include "empathy-chat-text-view.h"
#include "empathy-chat.h"
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 9c5e47b0e..1f5225348 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -64,7 +64,7 @@
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyChat)
typedef struct {
EmpathyTpChat *tp_chat;
- McAccount *account;
+ EmpathyAccount *account;
gchar *id;
gchar *name;
gchar *subject;
@@ -201,7 +201,7 @@ chat_new_connection_cb (EmpathyAccountManager *manager,
EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
- McAccount *account;
+ EmpathyAccount *account;
account = empathy_account_manager_get_account (manager, connection);
if (!priv->tp_chat && empathy_account_equal (account, priv->account) &&
@@ -1562,7 +1562,7 @@ empathy_chat_class_init (EmpathyChatClass *klass)
g_param_spec_object ("account",
"Account of the chat",
"The account of the chat",
- MC_TYPE_ACCOUNT,
+ EMPATHY_TYPE_ACCOUNT,
G_PARAM_READABLE |
G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class,
@@ -1753,7 +1753,7 @@ empathy_chat_set_tp_chat (EmpathyChat *chat,
show_pending_messages (chat);
}
-McAccount *
+EmpathyAccount *
empathy_chat_get_account (EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (chat);
diff --git a/libempathy-gtk/empathy-chat.h b/libempathy-gtk/empathy-chat.h
index c38fd64a6..c7158759a 100644
--- a/libempathy-gtk/empathy-chat.h
+++ b/libempathy-gtk/empathy-chat.h
@@ -66,7 +66,7 @@ EmpathyChat * empathy_chat_new (EmpathyTpChat *tp_chat);
EmpathyTpChat * empathy_chat_get_tp_chat (EmpathyChat *chat);
void empathy_chat_set_tp_chat (EmpathyChat *chat,
EmpathyTpChat *tp_chat);
-McAccount * empathy_chat_get_account (EmpathyChat *chat);
+EmpathyAccount * empathy_chat_get_account (EmpathyChat *chat);
const gchar * empathy_chat_get_id (EmpathyChat *chat);
const gchar * empathy_chat_get_name (EmpathyChat *chat);
const gchar * empathy_chat_get_subject (EmpathyChat *chat);
diff --git a/libempathy-gtk/empathy-contact-dialogs.c b/libempathy-gtk/empathy-contact-dialogs.c
index 39edbf579..c1cca3e2b 100644
--- a/libempathy-gtk/empathy-contact-dialogs.c
+++ b/libempathy-gtk/empathy-contact-dialogs.c
@@ -328,26 +328,18 @@ empathy_contact_personal_dialog_show (GtkWindow *parent)
*/
static gboolean
-can_add_contact_to_account (McAccount *account,
+can_add_contact_to_account (EmpathyAccount *account,
gpointer user_data)
{
- EmpathyAccountManager *account_manager;
EmpathyContactManager *contact_manager;
TpConnection *connection;
gboolean result;
- account_manager = empathy_account_manager_dup_singleton ();
- connection = empathy_account_manager_get_connection (account_manager,
- account);
- if (!connection) {
- g_object_unref (account_manager);
- return FALSE;
- }
+ connection = empathy_account_get_connection (account);
contact_manager = empathy_contact_manager_dup_singleton ();
result = empathy_contact_manager_can_add (contact_manager, connection);
g_object_unref (contact_manager);
- g_object_unref (account_manager);
return result;
}
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 61db60cdf..f7b506e7c 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -32,7 +32,6 @@
#include <gtk/gtk.h>
#include <telepathy-glib/util.h>
-#include <libmissioncontrol/mc-account.h>
#include <libempathy/empathy-account-manager.h>
#include <libempathy/empathy-call-factory.h>
@@ -247,7 +246,7 @@ contact_list_view_drag_data_received (GtkWidget *view,
EmpathyContactListViewPriv *priv;
EmpathyAccountManager *account_manager;
EmpathyTpContactFactory *factory = NULL;
- McAccount *account;
+ EmpathyAccount *account;
GtkTreeModel *model;
GtkTreeViewDropPosition position;
GtkTreePath *path;
@@ -302,19 +301,17 @@ contact_list_view_drag_data_received (GtkWidget *view,
strv = g_strsplit (id, "/", 2);
account_id = strv[0];
contact_id = strv[1];
- account = mc_account_lookup (account_id);
+ account_manager = empathy_account_manager_dup_singleton ();
+ account = empathy_account_manager_lookup (account_manager, account_id);
if (account) {
TpConnection *connection;
- /* FIXME: We assume we have already an account manager */
- account_manager = empathy_account_manager_dup_singleton ();
- connection = empathy_account_manager_get_connection (account_manager,
- account);
+ connection = empathy_account_get_connection (account);
if (connection) {
factory = empathy_tp_contact_factory_dup_singleton (connection);
}
- g_object_unref (account_manager);
}
+ g_object_unref (account_manager);
if (!factory) {
DEBUG ("Failed to get factory for account '%s'", account_id);
@@ -451,7 +448,7 @@ contact_list_view_drag_data_get (GtkWidget *widget,
GtkTreeIter iter;
GtkTreeModel *model;
EmpathyContact *contact;
- McAccount *account;
+ EmpathyAccount *account;
const gchar *contact_id;
const gchar *account_id;
gchar *str;
@@ -481,7 +478,7 @@ contact_list_view_drag_data_get (GtkWidget *widget,
}
account = empathy_contact_get_account (contact);
- account_id = mc_account_get_unique_name (account);
+ account_id = empathy_account_get_unique_name (account);
contact_id = empathy_contact_get_id (contact);
g_object_unref (contact);
str = g_strconcat (account_id, "/", contact_id, NULL);
diff --git a/libempathy-gtk/empathy-contact-widget.c b/libempathy-gtk/empathy-contact-widget.c
index 12a139303..7e80d0d65 100644
--- a/libempathy-gtk/empathy-contact-widget.c
+++ b/libempathy-gtk/empathy-contact-widget.c
@@ -32,7 +32,6 @@
#include <champlain-gtk/champlain-gtk.h>
#endif
-#include <libmissioncontrol/mc-account.h>
#include <telepathy-glib/util.h>
#include <libempathy/empathy-tp-contact-factory.h>
@@ -41,6 +40,7 @@
#include <libempathy/empathy-location.h>
#include <libempathy/empathy-time.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-account.h>
#include "empathy-contact-widget.h"
#include "empathy-account-chooser.h"
@@ -697,7 +697,7 @@ contact_widget_contact_setup (EmpathyContactWidget *information)
static void
contact_widget_contact_update (EmpathyContactWidget *information)
{
- McAccount *account = NULL;
+ EmpathyAccount *account = NULL;
const gchar *id = NULL;
/* Connect and get info from new contact */
@@ -737,7 +737,7 @@ contact_widget_contact_update (EmpathyContactWidget *information)
{
const gchar *name;
- name = mc_account_get_display_name (account);
+ name = empathy_account_get_display_name (account);
gtk_label_set_label (GTK_LABEL (information->widget_account), name);
}
}
diff --git a/libempathy-gtk/empathy-irc-network-dialog.c b/libempathy-gtk/empathy-irc-network-dialog.c
index 63222badc..e6b4a6f7f 100644
--- a/libempathy-gtk/empathy-irc-network-dialog.c
+++ b/libempathy-gtk/empathy-irc-network-dialog.c
@@ -27,10 +27,10 @@
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-account.h>
#include <libempathy/empathy-irc-network-manager.h>
#include "empathy-ui-utils.h"
diff --git a/libempathy-gtk/empathy-log-window.c b/libempathy-gtk/empathy-log-window.c
index 21d73f8ea..f05017c9c 100644
--- a/libempathy-gtk/empathy-log-window.c
+++ b/libempathy-gtk/empathy-log-window.c
@@ -31,6 +31,7 @@
#include <gtk/gtk.h>
#include <libempathy/empathy-log-manager.h>
+#include <libempathy/empathy-account-manager.h>
#include <libempathy/empathy-chatroom-manager.h>
#include <libempathy/empathy-chatroom.h>
#include <libempathy/empathy-message.h>
@@ -94,11 +95,11 @@ static void log_window_chats_setup (EmpathyLogWindow *wi
static void log_window_chats_accounts_changed_cb (GtkWidget *combobox,
EmpathyLogWindow *window);
static void log_window_chats_set_selected (EmpathyLogWindow *window,
- McAccount *account,
+ EmpathyAccount *account,
const gchar *chat_id,
gboolean is_chatroom);
static gboolean log_window_chats_get_selected (EmpathyLogWindow *window,
- McAccount **account,
+ EmpathyAccount **account,
gchar **chat_id,
gboolean *is_chatroom);
static void log_window_chats_get_messages (EmpathyLogWindow *window,
@@ -134,14 +135,14 @@ enum {
};
GtkWidget *
-empathy_log_window_show (McAccount *account,
+empathy_log_window_show (EmpathyAccount *account,
const gchar *chat_id,
gboolean is_chatroom,
GtkWindow *parent)
{
static EmpathyLogWindow *window = NULL;
EmpathyAccountChooser *account_chooser;
- GList *accounts;
+ EmpathyAccountManager *account_manager;
gint account_num;
GtkBuilder *gui;
gchar *filename;
@@ -228,9 +229,9 @@ empathy_log_window_show (McAccount *account,
window);
/* Populate */
- accounts = mc_accounts_list ();
- account_num = g_list_length (accounts);
- mc_accounts_list_free (accounts);
+ account_manager = empathy_account_manager_dup_singleton ();
+ account_num = empathy_account_manager_get_count (account_manager);
+ g_object_unref (account_manager);
if (account_num > 1) {
gtk_widget_show (window->vbox_chats);
@@ -301,7 +302,7 @@ log_window_find_changed_cb (GtkTreeSelection *selection,
GtkTreeView *view;
GtkTreeModel *model;
GtkTreeIter iter;
- McAccount *account;
+ EmpathyAccount *account;
gchar *chat_id;
gboolean is_chatroom;
gchar *date;
@@ -417,7 +418,7 @@ log_window_find_populate (EmpathyLogWindow *window,
}
date_readable = empathy_log_manager_get_date_readable (hit->date);
- account_name = mc_account_get_display_name (hit->account);
+ account_name = empathy_account_get_display_name (hit->account);
account_icon = empathy_icon_name_from_account (hit->account);
gtk_list_store_append (store, &iter);
@@ -464,7 +465,7 @@ log_window_find_setup (EmpathyLogWindow *window)
store = gtk_list_store_new (COL_FIND_COUNT,
G_TYPE_STRING, /* account icon name */
G_TYPE_STRING, /* account name */
- MC_TYPE_ACCOUNT, /* account */
+ EMPATHY_TYPE_ACCOUNT, /* account */
G_TYPE_STRING, /* chat name */
G_TYPE_STRING, /* chat id */
G_TYPE_BOOLEAN, /* is chatroom */
@@ -608,7 +609,7 @@ static void
log_window_chats_populate (EmpathyLogWindow *window)
{
EmpathyAccountChooser *account_chooser;
- McAccount *account;
+ EmpathyAccount *account;
GList *chats, *l;
GtkTreeView *view;
@@ -684,11 +685,11 @@ log_window_chats_setup (EmpathyLogWindow *window)
/* new store */
store = gtk_list_store_new (COL_CHAT_COUNT,
- G_TYPE_STRING, /* icon */
- G_TYPE_STRING, /* name */
- MC_TYPE_ACCOUNT, /* account */
- G_TYPE_STRING, /* id */
- G_TYPE_BOOLEAN); /* is chatroom */
+ G_TYPE_STRING, /* icon */
+ G_TYPE_STRING, /* name */
+ EMPATHY_TYPE_ACCOUNT, /* account */
+ G_TYPE_STRING, /* id */
+ G_TYPE_BOOLEAN); /* is chatroom */
model = GTK_TREE_MODEL (store);
sortable = GTK_TREE_SORTABLE (store);
@@ -739,7 +740,7 @@ log_window_chats_accounts_changed_cb (GtkWidget *combobox,
static void
log_window_chats_set_selected (EmpathyLogWindow *window,
- McAccount *account,
+ EmpathyAccount *account,
const gchar *chat_id,
gboolean is_chatroom)
{
@@ -763,7 +764,7 @@ log_window_chats_set_selected (EmpathyLogWindow *window,
}
for (ok = TRUE; ok; ok = gtk_tree_model_iter_next (model, &iter)) {
- McAccount *this_account;
+ EmpathyAccount *this_account;
gchar *this_chat_id;
gboolean this_is_chatroom;
@@ -792,7 +793,7 @@ log_window_chats_set_selected (EmpathyLogWindow *window,
static gboolean
log_window_chats_get_selected (EmpathyLogWindow *window,
- McAccount **account,
+ EmpathyAccount **account,
gchar **chat_id,
gboolean *is_chatroom)
{
@@ -801,7 +802,7 @@ log_window_chats_get_selected (EmpathyLogWindow *window,
GtkTreeSelection *selection;
GtkTreeIter iter;
gchar *id = NULL;
- McAccount *acc = NULL;
+ EmpathyAccount *acc = NULL;
gboolean room = FALSE;
view = GTK_TREE_VIEW (window->treeview_chats);
@@ -839,7 +840,7 @@ static void
log_window_chats_get_messages (EmpathyLogWindow *window,
const gchar *date_to_show)
{
- McAccount *account;
+ EmpathyAccount *account;
gchar *chat_id;
gboolean is_chatroom;
EmpathyMessage *message;
@@ -999,7 +1000,7 @@ static void
log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
EmpathyLogWindow *window)
{
- McAccount *account;
+ EmpathyAccount *account;
gchar *chat_id;
gboolean is_chatroom;
guint year_selected;
diff --git a/libempathy-gtk/empathy-log-window.h b/libempathy-gtk/empathy-log-window.h
index 6dd8c0303..298d96099 100644
--- a/libempathy-gtk/empathy-log-window.h
+++ b/libempathy-gtk/empathy-log-window.h
@@ -25,11 +25,11 @@
#ifndef __EMPATHY_LOG_WINDOW_H__
#define __EMPATHY_LOG_WINDOW_H__
-#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-account.h>
G_BEGIN_DECLS
-GtkWidget * empathy_log_window_show (McAccount *account,
+GtkWidget * empathy_log_window_show (EmpathyAccount *account,
const gchar *chat_id,
gboolean chatroom,
GtkWindow *parent);
diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c
index 9aee42913..77b368bd9 100644
--- a/libempathy-gtk/empathy-new-message-dialog.c
+++ b/libempathy-gtk/empathy-new-message-dialog.c
@@ -27,7 +27,6 @@
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mission-control.h>
#include <libempathy/empathy-call-factory.h>
@@ -35,6 +34,7 @@
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-dispatcher.h>
#include <libempathy/empathy-utils.h>
+#include <libempathy/empathy-account.h>
#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
#include <libempathy/empathy-debug.h>
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index b16a3e7c9..1f1b3b06d 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -392,7 +392,7 @@ theme_adium_append_message (EmpathyChatView *view,
EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view);
EmpathyThemeAdiumPriv *priv = GET_PRIV (theme);
EmpathyContact *sender;
- McAccount *account;
+ EmpathyAccount *account;
McProfile *account_profile;
gchar *dup_body = NULL;
const gchar *body;
@@ -416,7 +416,7 @@ theme_adium_append_message (EmpathyChatView *view,
/* Get information */
sender = empathy_message_get_sender (msg);
account = empathy_contact_get_account (sender);
- account_profile = mc_account_get_profile (account);
+ account_profile = empathy_account_get_profile (account);
service_name = mc_profile_get_display_name (account_profile);
timestamp = empathy_message_get_timestamp (msg);
body = empathy_message_get_body (msg);
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index ffe81a352..baa6d21de 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -183,11 +183,11 @@ empathy_builder_unref_and_keep_widget (GtkBuilder *gui,
}
const gchar *
-empathy_icon_name_from_account (McAccount *account)
+empathy_icon_name_from_account (EmpathyAccount *account)
{
McProfile *profile;
- profile = mc_account_get_profile (account);
+ profile = empathy_account_get_profile (account);
return mc_profile_get_icon_name (profile);
}
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 4c1384602..10f889b0c 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -34,10 +34,10 @@
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-profile.h>
#include <libempathy/empathy-contact.h>
+#include <libempathy/empathy-account.h>
#include <libempathy/empathy-ft-handler.h>
#include "empathy-chat-view.h"
@@ -59,7 +59,7 @@ GtkWidget *empathy_builder_unref_and_keep_widget (GtkBuilder *gui,
GtkWidget *root);
/* Pixbufs */
-const gchar * empathy_icon_name_from_account (McAccount *account);
+const gchar * empathy_icon_name_from_account (EmpathyAccount *account);
const gchar * empathy_icon_name_for_presence (TpConnectionPresenceType presence);
const gchar * empathy_icon_name_for_contact (EmpathyContact *contact);
GdkPixbuf * empathy_pixbuf_from_data (gchar *data,