diff options
author | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-05-08 21:39:41 +0800 |
---|---|---|
committer | Marco Barisione <marco.barisione@collabora.co.uk> | 2013-08-20 18:03:05 +0800 |
commit | fa2f3a41fd62737b803b9307b51415aa32dc6715 (patch) | |
tree | b43cb11eb368187ec189a5a59d38ead4db025b33 /libempathy-gtk | |
parent | e72ddde10dd32bcad39c604c579faa04c822d2be (diff) | |
download | gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.tar gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.tar.gz gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.tar.bz2 gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.tar.lz gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.tar.xz gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.tar.zst gsoc2013-empathy-fa2f3a41fd62737b803b9307b51415aa32dc6715.zip |
account-settings: move from Empathy to tp-account-widgets
https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-local-xmpp-assistant-widget.c | 14 | ||||
-rw-r--r-- | libempathy-gtk/empathy-new-account-dialog.c | 10 | ||||
-rw-r--r-- | libempathy-gtk/empathy-new-account-dialog.h | 5 | ||||
-rw-r--r-- | libempathy-gtk/empathy-protocol-chooser.c | 26 | ||||
-rw-r--r-- | libempathy-gtk/empathy-protocol-chooser.h | 5 |
5 files changed, 29 insertions, 31 deletions
diff --git a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c index d9fecc1c0..04275282a 100644 --- a/libempathy-gtk/empathy-local-xmpp-assistant-widget.c +++ b/libempathy-gtk/empathy-local-xmpp-assistant-widget.c @@ -42,7 +42,7 @@ static gulong signals[LAST_SIGNAL] = { 0, }; struct _EmpathyLocalXmppAssistantWidgetPrivate { - EmpathyAccountSettings *settings; + TpawAccountSettings *settings; }; static void @@ -96,7 +96,7 @@ empathy_local_xmpp_assistant_widget_constructed (GObject *object) g_object_unref (pix); } - self->priv->settings = empathy_account_settings_new ("salut", "local-xmpp", + self->priv->settings = tpaw_account_settings_new ("salut", "local-xmpp", NULL, _("People nearby")); account_widget = tpaw_account_widget_new_for_protocol ( @@ -191,11 +191,11 @@ apply_account_cb (GObject *source, GAsyncResult *result, gpointer user_data) { - EmpathyAccountSettings *settings = EMPATHY_ACCOUNT_SETTINGS (source); + TpawAccountSettings *settings = TPAW_ACCOUNT_SETTINGS (source); TpAccount *account; GError *error = NULL; - if (!empathy_account_settings_apply_finish (settings, result, NULL, &error)) + if (!tpaw_account_settings_apply_finish (settings, result, NULL, &error)) { DEBUG ("Failed to create account: %s", error->message); g_error_free (error); @@ -203,7 +203,7 @@ apply_account_cb (GObject *source, } /* enable the newly created account */ - account = empathy_account_settings_get_account (settings); + account = tpaw_account_settings_get_account (settings); tp_account_set_enabled_async (account, TRUE, account_enabled_cb, NULL); } @@ -211,7 +211,7 @@ void empathy_local_xmpp_assistant_widget_create_account ( EmpathyLocalXmppAssistantWidget *self) { - empathy_account_settings_apply_async (self->priv->settings, + tpaw_account_settings_apply_async (self->priv->settings, apply_account_cb, NULL); } @@ -244,5 +244,5 @@ gboolean empathy_local_xmpp_assistant_widget_is_valid ( EmpathyLocalXmppAssistantWidget *self) { - return empathy_account_settings_is_valid (self->priv->settings); + return tpaw_account_settings_is_valid (self->priv->settings); } diff --git a/libempathy-gtk/empathy-new-account-dialog.c b/libempathy-gtk/empathy-new-account-dialog.c index eaa8b07ed..5f77fe2ce 100644 --- a/libempathy-gtk/empathy-new-account-dialog.c +++ b/libempathy-gtk/empathy-new-account-dialog.c @@ -38,7 +38,7 @@ struct _EmpathyNewAccountDialogPrivate GtkWidget *main_vbox; GtkWidget *connect_button; - EmpathyAccountSettings *settings; + TpawAccountSettings *settings; }; static void @@ -53,7 +53,7 @@ static void protocol_changed_cb (GtkComboBox *chooser, EmpathyNewAccountDialog *self) { - EmpathyAccountSettings *settings; + TpawAccountSettings *settings; TpawAccountWidget *account_widget; gchar *password = NULL, *account = NULL; @@ -66,10 +66,10 @@ protocol_changed_cb (GtkComboBox *chooser, /* Save "account" and "password" parameters */ if (self->priv->settings != NULL) { - account = empathy_account_settings_dup_string ( + account = tpaw_account_settings_dup_string ( self->priv->settings, "account"); - password = empathy_account_settings_dup_string ( + password = tpaw_account_settings_dup_string ( self->priv->settings, "password"); g_object_unref (self->priv->settings); @@ -190,7 +190,7 @@ empathy_new_account_dialog_new (GtkWindow *parent) return result; } -EmpathyAccountSettings * +TpawAccountSettings * empathy_new_account_dialog_get_settings (EmpathyNewAccountDialog *self) { return self->priv->settings; diff --git a/libempathy-gtk/empathy-new-account-dialog.h b/libempathy-gtk/empathy-new-account-dialog.h index 6a5d5c2d5..1fa6b43f8 100644 --- a/libempathy-gtk/empathy-new-account-dialog.h +++ b/libempathy-gtk/empathy-new-account-dialog.h @@ -21,8 +21,7 @@ #define ___EMPATHY_NEW_ACCOUNT_DIALOG_H__ #include <gtk/gtk.h> - -#include "empathy-account-settings.h" +#include <tp-account-widgets/tpaw-account-settings.h> G_BEGIN_DECLS @@ -51,7 +50,7 @@ GType empathy_new_account_dialog_get_type (void) G_GNUC_CONST; GtkWidget * empathy_new_account_dialog_new (GtkWindow *parent); -EmpathyAccountSettings * empathy_new_account_dialog_get_settings ( +TpawAccountSettings * empathy_new_account_dialog_get_settings ( EmpathyNewAccountDialog *self); G_END_DECLS diff --git a/libempathy-gtk/empathy-protocol-chooser.c b/libempathy-gtk/empathy-protocol-chooser.c index a060d9f7e..b2fec5e0f 100644 --- a/libempathy-gtk/empathy-protocol-chooser.c +++ b/libempathy-gtk/empathy-protocol-chooser.c @@ -576,10 +576,10 @@ empathy_protocol_chooser_set_visible (EmpathyProtocolChooser *protocol_chooser, gtk_combo_box_set_active (GTK_COMBO_BOX (protocol_chooser), 0); } -EmpathyAccountSettings * +TpawAccountSettings * empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self) { - EmpathyAccountSettings *settings = NULL; + TpawAccountSettings *settings = NULL; gchar *str; const gchar *display_name; TpConnectionManager *cm; @@ -602,7 +602,7 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self) */ str = g_strdup_printf (_("New %s account"), display_name); - settings = empathy_account_settings_new (tp_connection_manager_get_name (cm), + settings = tpaw_account_settings_new (tp_connection_manager_get_name (cm), tp_protocol_get_name (proto), service, str); g_free (str); @@ -619,19 +619,19 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self) "talk.google.com", NULL}; - empathy_account_settings_set_icon_name_async (settings, "im-google-talk", + tpaw_account_settings_set_icon_name_async (settings, "im-google-talk", NULL, NULL); - empathy_account_settings_set (settings, "server", + tpaw_account_settings_set (settings, "server", g_variant_new_string (extra_certificate_identities[0])); - empathy_account_settings_set (settings, "require-encryption", + tpaw_account_settings_set (settings, "require-encryption", g_variant_new_boolean (TRUE)); - empathy_account_settings_set (settings, "fallback-servers", + tpaw_account_settings_set (settings, "fallback-servers", g_variant_new_strv (fallback_servers, -1)); - if (empathy_account_settings_have_tp_param (settings, + if (tpaw_account_settings_have_tp_param (settings, "extra-certificate-identities")) { - empathy_account_settings_set (settings, + tpaw_account_settings_set (settings, "extra-certificate-identities", g_variant_new_strv (extra_certificate_identities, -1)); } @@ -642,13 +642,13 @@ empathy_protocol_chooser_create_account_settings (EmpathyProtocolChooser *self) "chat.facebook.com:443", NULL }; - empathy_account_settings_set_icon_name_async (settings, "im-facebook", + tpaw_account_settings_set_icon_name_async (settings, "im-facebook", NULL, NULL); - empathy_account_settings_set (settings, "require-encryption", + tpaw_account_settings_set (settings, "require-encryption", g_variant_new_boolean (TRUE)); - empathy_account_settings_set (settings, "server", + tpaw_account_settings_set (settings, "server", g_variant_new_string ("chat.facebook.com")); - empathy_account_settings_set (settings, "fallback-servers", + tpaw_account_settings_set (settings, "fallback-servers", g_variant_new_strv (fallback_servers, -1)); } diff --git a/libempathy-gtk/empathy-protocol-chooser.h b/libempathy-gtk/empathy-protocol-chooser.h index 2ae8017ef..520f71f53 100644 --- a/libempathy-gtk/empathy-protocol-chooser.h +++ b/libempathy-gtk/empathy-protocol-chooser.h @@ -25,8 +25,7 @@ #include <gtk/gtk.h> #include <telepathy-glib/telepathy-glib.h> - -#include "empathy-account-settings.h" +#include <tp-account-widgets/tpaw-account-settings.h> G_BEGIN_DECLS @@ -75,7 +74,7 @@ void empathy_protocol_chooser_set_visible ( EmpathyProtocolChooserFilterFunc func, gpointer user_data); -EmpathyAccountSettings * empathy_protocol_chooser_create_account_settings ( +TpawAccountSettings * empathy_protocol_chooser_create_account_settings ( EmpathyProtocolChooser *self); G_END_DECLS |