typedef struct {
EmpathyAccountChooser *chooser;
- McAccount *account;
+ EmpathyAccount *account;
gboolean set;
} SetAccountData;
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,
* @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;
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);
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;
/**
* 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.
*
*/
gboolean
empathy_account_chooser_set_account (EmpathyAccountChooser *chooser,
- McAccount *account)
+ EmpathyAccount *account)
{
GtkComboBox *combobox;
GtkTreeModel *model;
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));
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;
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;
gpointer user_data)
{
FindAccountData *data = user_data;
- McAccount *account;
+ EmpathyAccount *account;
gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
static gboolean
account_chooser_find_account (EmpathyAccountChooser *chooser,
- McAccount *account,
+ EmpathyAccount *account,
GtkTreeIter *iter)
{
GtkListStore *store;
}
static void
-account_chooser_account_remove_foreach (McAccount *account,
+account_chooser_account_remove_foreach (EmpathyAccount *account,
EmpathyAccountChooser *chooser)
{
GtkListStore *store;
EmpathyAccountChooserPriv *priv;
GtkListStore *store;
GtkComboBox *combobox;
- McAccount *account;
+ EmpathyAccount *account;
const gchar *icon_name;
gboolean is_enabled = TRUE;
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);
static void
account_chooser_connection_changed_cb (EmpathyAccountManager *manager,
- McAccount *account,
+ EmpathyAccount *account,
TpConnectionStatusReason reason,
TpConnectionStatus new_status,
TpConnectionStatus old_status,
GtkTreeIter *iter,
SetAccountData *data)
{
- McAccount *account;
+ EmpathyAccount *account;
gboolean equal;
gtk_tree_model_get (model, iter, COL_ACCOUNT_POINTER, &account, -1);
/**
* EmpathyAccountChooserFilterFunc:
- * @account: an #McAccount
+ * @account: an #EmpathyAccount
* @user_data: user data, or %NULL
*
* A function which decides whether the account indicated by @account
/**
* 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
* 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;
}
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
+#include <libempathy/empathy-account.h>
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);
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
#include <glib/gi18n-lib.h>
#include <gtk/gtk.h>
-#include <libmissioncontrol/mc-account.h>
#include <libmissioncontrol/mc-protocol.h>
#include <libempathy/empathy-utils.h>
#define IRC_NETWORKS_FILENAME "irc-networks.xml"
typedef struct {
- McAccount *account;
+ EmpathyAccount *account;
EmpathyIrcNetworkManager *network_manager;
GtkWidget *vbox_settings;
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
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);
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);
}
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)
{
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)
/**
* 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;
#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
#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 "empathy-ui-utils.h"
typedef struct {
- McAccount *account;
+ EmpathyAccount *account;
GtkWidget *vbox_settings;
/**
* 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;
#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
#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"
static gboolean
account_widget_entry_focus_cb (GtkWidget *widget,
GdkEventFocus *event,
- McAccount *account)
+ EmpathyAccount *account)
{
const gchar *str;
const gchar *param_name;
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);
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);
}
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);
}
static void
account_widget_int_changed_cb (GtkWidget *widget,
- McAccount *account)
+ EmpathyAccount *account)
{
const gchar *param_name;
gint value;
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;
/* 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);
}
}
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), "");
}
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) {
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",
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",
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);
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",
}
static void
-accounts_widget_generic_setup (McAccount *account,
+accounts_widget_generic_setup (EmpathyAccount *account,
GtkWidget *table_common_settings,
GtkWidget *table_advanced_settings)
{
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) {
}
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)
}
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);
}
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)
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);
}
GtkWidget *
-empathy_account_widget_generic_new (McAccount *account)
+empathy_account_widget_generic_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
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,
}
GtkWidget *
-empathy_account_widget_salut_new (McAccount *account)
+empathy_account_widget_salut_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
}
GtkWidget *
-empathy_account_widget_msn_new (McAccount *account)
+empathy_account_widget_msn_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
}
GtkWidget *
-empathy_account_widget_jabber_new (McAccount *account)
+empathy_account_widget_jabber_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
}
GtkWidget *
-empathy_account_widget_icq_new (McAccount *account)
+empathy_account_widget_icq_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
}
GtkWidget *
-empathy_account_widget_aim_new (McAccount *account)
+empathy_account_widget_aim_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
}
GtkWidget *
-empathy_account_widget_yahoo_new (McAccount *account)
+empathy_account_widget_yahoo_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
}
GtkWidget *
-empathy_account_widget_groupwise_new (McAccount *account)
+empathy_account_widget_groupwise_new (EmpathyAccount *account)
{
GtkBuilder *gui;
GtkWidget *widget;
#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
#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"
#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyChat)
typedef struct {
EmpathyTpChat *tp_chat;
- McAccount *account;
+ EmpathyAccount *account;
gchar *id;
gchar *name;
gchar *subject;
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) &&
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,
show_pending_messages (chat);
}
-McAccount *
+EmpathyAccount *
empathy_chat_get_account (EmpathyChat *chat)
{
EmpathyChatPriv *priv = GET_PRIV (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);
*/
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;
}
#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>
EmpathyContactListViewPriv *priv;
EmpathyAccountManager *account_manager;
EmpathyTpContactFactory *factory = NULL;
- McAccount *account;
+ EmpathyAccount *account;
GtkTreeModel *model;
GtkTreeViewDropPosition position;
GtkTreePath *path;
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);
GtkTreeIter iter;
GtkTreeModel *model;
EmpathyContact *contact;
- McAccount *account;
+ EmpathyAccount *account;
const gchar *contact_id;
const gchar *account_id;
gchar *str;
}
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);
#include <champlain-gtk/champlain-gtk.h>
#endif
-#include <libmissioncontrol/mc-account.h>
#include <telepathy-glib/util.h>
#include <libempathy/empathy-tp-contact-factory.h>
#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"
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 */
{
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);
}
}
#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"
#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>
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,
};
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;
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);
GtkTreeView *view;
GtkTreeModel *model;
GtkTreeIter iter;
- McAccount *account;
+ EmpathyAccount *account;
gchar *chat_id;
gboolean is_chatroom;
gchar *date;
}
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);
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 */
log_window_chats_populate (EmpathyLogWindow *window)
{
EmpathyAccountChooser *account_chooser;
- McAccount *account;
+ EmpathyAccount *account;
GList *chats, *l;
GtkTreeView *view;
/* 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);
static void
log_window_chats_set_selected (EmpathyLogWindow *window,
- McAccount *account,
+ EmpathyAccount *account,
const gchar *chat_id,
gboolean is_chatroom)
{
}
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;
static gboolean
log_window_chats_get_selected (EmpathyLogWindow *window,
- McAccount **account,
+ EmpathyAccount **account,
gchar **chat_id,
gboolean *is_chatroom)
{
GtkTreeSelection *selection;
GtkTreeIter iter;
gchar *id = NULL;
- McAccount *acc = NULL;
+ EmpathyAccount *acc = NULL;
gboolean room = FALSE;
view = GTK_TREE_VIEW (window->treeview_chats);
log_window_chats_get_messages (EmpathyLogWindow *window,
const gchar *date_to_show)
{
- McAccount *account;
+ EmpathyAccount *account;
gchar *chat_id;
gboolean is_chatroom;
EmpathyMessage *message;
log_window_calendar_chats_month_changed_cb (GtkWidget *calendar,
EmpathyLogWindow *window)
{
- McAccount *account;
+ EmpathyAccount *account;
gchar *chat_id;
gboolean is_chatroom;
guint year_selected;
#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);
#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>
#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>
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;
/* 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);
}
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);
}
#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"
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,