diff options
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | goa-mc-plugin/mcp-account-manager-goa.c | 28 | ||||
-rw-r--r-- | libempathy-gtk/empathy-account-widget.c | 2 | ||||
-rw-r--r-- | libempathy/Makefile.am | 2 | ||||
-rw-r--r-- | libempathy/empathy-auth-factory.c | 111 | ||||
-rw-r--r-- | libempathy/empathy-auth-factory.h | 2 | ||||
-rw-r--r-- | libempathy/empathy-goa-auth-handler.c | 436 | ||||
-rw-r--r-- | libempathy/empathy-goa-auth-handler.h | 72 | ||||
-rw-r--r-- | libempathy/empathy-utils.c | 15 | ||||
-rw-r--r-- | libempathy/empathy-utils.h | 3 | ||||
-rw-r--r-- | po/gl.po | 652 | ||||
-rw-r--r-- | src/empathy-auth-client.c | 12 |
12 files changed, 994 insertions, 347 deletions
diff --git a/configure.ac b/configure.ac index a8f7e4e70..1c0853cd3 100644 --- a/configure.ac +++ b/configure.ac @@ -47,6 +47,7 @@ TELEPATHY_FARSIGHT_REQUIRED=0.0.14 TELEPATHY_GLIB_REQUIRED=0.16.0 TELEPATHY_LOGGER=0.2.10 WEBKIT_REQUIRED=1.3.13 +GOA_REQUIRED=3.3.0 # Optional deps CLUTTER_REQUIRED=1.7.14 @@ -199,6 +200,8 @@ PKG_CHECK_MODULES(EMPATHY, libpulse libpulse-mainloop-glib webkitgtk-3.0 >= $WEBKIT_REQUIRED + libsoup-2.4 + goa-1.0 >= $GOA_REQUIRED ]) PKG_CHECK_MODULES(YELL, [telepathy-yell]) @@ -209,6 +212,9 @@ PKG_CHECK_MODULES(EMPATHY_AV, telepathy-farsight >= $TELEPATHY_FARSIGHT_REQUIRED ]) +AC_DEFINE(EMPATHY_GOA_PROVIDER, "org.gnome.OnlineAccounts", + [Name of provider for accounts imported from GOA]) + # ----------------------------------------------------------- # Call interface # ----------------------------------------------------------- diff --git a/goa-mc-plugin/mcp-account-manager-goa.c b/goa-mc-plugin/mcp-account-manager-goa.c index d81c60816..1185d7ba3 100644 --- a/goa-mc-plugin/mcp-account-manager-goa.c +++ b/goa-mc-plugin/mcp-account-manager-goa.c @@ -23,6 +23,8 @@ * Danielle Madeley <danielle.madeley@collabora.co.uk> */ +#include "config.h" + #include <glib/gi18n.h> #include <telepathy-glib/util.h> @@ -40,7 +42,7 @@ #define PLUGIN_NAME "goa" #define PLUGIN_PRIORITY (MCP_ACCOUNT_STORAGE_PLUGIN_PRIO_KEYRING + 10) #define PLUGIN_DESCRIPTION "Provide Telepathy Accounts from GOA" -#define PLUGIN_PROVIDER "org.gnome.OnlineAccounts" +#define PLUGIN_PROVIDER EMPATHY_GOA_PROVIDER #define INITIAL_COMMENT "Parameters of GOA Telepathy accounts" @@ -125,15 +127,33 @@ get_tp_parameters (GoaAccount *account) PARAM ("param-extra-certificate-identities", "talk.google.com"); PARAM ("param-require-encryption", "true"); } + else if (!tp_strdiff (type, "facebook")) + { + PARAM ("manager", "gabble"); + PARAM ("protocol", "jabber"); + PARAM ("Icon", "im-facebook"); + PARAM ("Service", "facebook"); + + PARAM ("param-account", "chat.facebook.com"); + PARAM ("param-require-encryption", "true"); + } + else if (!tp_strdiff (type, "windows_live")) + { + PARAM ("manager", "gabble"); + PARAM ("protocol", "jabber"); + PARAM ("Icon", "im-msn"); + PARAM ("Service", "windows-live"); + + PARAM ("param-account", "messenger.live.com"); + PARAM ("param-require-encryption", "true"); + } else { - /* unknown account type */ + DEBUG ("Unknown account type %s", type); g_hash_table_destroy (params); return NULL; } - /* TODO: add Facebook support */ - /* generic properties */ PARAM ("DisplayName", goa_account_get_presentation_identity (account)); diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c index 8b693fa03..33082ba63 100644 --- a/libempathy-gtk/empathy-account-widget.c +++ b/libempathy-gtk/empathy-account-widget.c @@ -2477,7 +2477,7 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self) default_display_name = g_strdup_printf (_("%1$s on %2$s"), login_id, empathy_irc_network_get_name (network)); } - else if (service == FACEBOOK_SERVICE) + else if (service == FACEBOOK_SERVICE && priv->jid_suffix != NULL) { gchar *tmp; diff --git a/libempathy/Makefile.am b/libempathy/Makefile.am index 079b4736b..0662f2cf0 100644 --- a/libempathy/Makefile.am +++ b/libempathy/Makefile.am @@ -29,6 +29,7 @@ libempathy_headers = \ action-chain-internal.h \ empathy-account-settings.h \ empathy-auth-factory.h \ + empathy-goa-auth-handler.h \ empathy-camera-monitor.h \ empathy-chatroom-manager.h \ empathy-chatroom.h \ @@ -72,6 +73,7 @@ libempathy_handwritten_source = \ action-chain.c \ empathy-account-settings.c \ empathy-auth-factory.c \ + empathy-goa-auth-handler.c \ empathy-camera-monitor.c \ empathy-chatroom-manager.c \ empathy-chatroom.c \ diff --git a/libempathy/empathy-auth-factory.c b/libempathy/empathy-auth-factory.c index 6368b1d7d..03f2cd16d 100644 --- a/libempathy/empathy-auth-factory.c +++ b/libempathy/empathy-auth-factory.c @@ -27,6 +27,7 @@ #include "empathy-keyring.h" #include "empathy-server-sasl-handler.h" #include "empathy-server-tls-handler.h" +#include "empathy-goa-auth-handler.h" #include "empathy-utils.h" #include "extensions/extensions.h" @@ -42,6 +43,7 @@ struct _EmpathyAuthFactoryPriv { * reffed (EmpathyServerSASLHandler *) * */ GHashTable *sasl_handlers; + EmpathyGoaAuthHandler *goa_handler; gboolean dispose_run; }; @@ -190,8 +192,6 @@ common_checks (EmpathyAuthFactory *self, { EmpathyAuthFactoryPriv *priv = GET_PRIV (self); TpChannel *channel; - GHashTable *props; - const gchar * const *available_mechanisms; const GError *dbus_error; EmpathyServerSASLHandler *handler; @@ -244,23 +244,7 @@ common_checks (EmpathyAuthFactory *self, return FALSE; } - props = tp_channel_borrow_immutable_properties (channel); - available_mechanisms = tp_asv_get_boxed (props, - TP_PROP_CHANNEL_INTERFACE_SASL_AUTHENTICATION_AVAILABLE_MECHANISMS, - G_TYPE_STRV); - - if (tp_channel_get_channel_type_id (channel) == - TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION - && !tp_strv_contains (available_mechanisms, "X-TELEPATHY-PASSWORD")) - { - g_set_error_literal (error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, - "Only the X-TELEPATHY-PASSWORD SASL mechanism is supported"); - - return FALSE; - } - dbus_error = tp_proxy_get_invalidated (channel); - if (dbus_error != NULL) { *error = g_error_copy (dbus_error); @@ -297,6 +281,20 @@ handle_channels (TpBaseClient *handler, /* The common checks above have checked this is fine. */ channel = channels->data; + /* Only password authentication is supported from here */ + if (tp_channel_get_channel_type_id (channel) == + TP_IFACE_QUARK_CHANNEL_TYPE_SERVER_AUTHENTICATION && + !empathy_sasl_channel_supports_mechanism (channel, + "X-TELEPATHY-PASSWORD")) + { + g_set_error_literal (&error, TP_ERROR, TP_ERROR_INVALID_ARGUMENT, + "Only the X-TELEPATHY-PASSWORD SASL mechanism is supported"); + DEBUG ("%s", error->message); + tp_handle_channels_context_fail (context, error); + g_clear_error (&error); + return; + } + data = handler_context_data_new (self, context); tp_handle_channels_context_delay (context); @@ -335,7 +333,7 @@ observe_channels_data_free (ObserveChannelsData *data) } static void -claim_cb (GObject *source, +password_claim_cb (GObject *source, GAsyncResult *result, gpointer user_data) { @@ -387,13 +385,37 @@ get_password_cb (GObject *source, tp_proxy_get_object_path (source)); tp_channel_dispatch_operation_claim_with_async (data->dispatch_operation, - TP_BASE_CLIENT (data->self), claim_cb, data); + TP_BASE_CLIENT (data->self), password_claim_cb, data); tp_observe_channels_context_accept (data->context); } } static void +goa_claim_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + ObserveChannelsData *data = user_data; + EmpathyAuthFactory *self = data->self; + GError *error = NULL; + + if (!tp_channel_dispatch_operation_claim_with_finish (data->dispatch_operation, + result, &error)) + { + DEBUG ("Failed to claim: %s", error->message); + g_clear_error (&error); + } + else + { + empathy_goa_auth_handler_start (self->priv->goa_handler, + data->channel, data->account); + } + + observe_channels_data_free (data); +} + +static void observe_channels (TpBaseClient *client, TpAccount *account, TpConnection *connection, @@ -417,9 +439,7 @@ observe_channels (TpBaseClient *client, return; } - /* We're now sure this is a server auth channel using the SASL auth - * type and X-TELEPATHY-PASSWORD is available. Great. */ - + /* The common checks above have checked this is fine. */ channel = channels->data; data = g_slice_new0 (ObserveChannelsData); @@ -429,9 +449,35 @@ observe_channels (TpBaseClient *client, data->account = g_object_ref (account); data->channel = g_object_ref (channel); - empathy_keyring_get_account_password_async (account, get_password_cb, data); + /* GOA auth? */ + if (empathy_goa_auth_handler_supports (self->priv->goa_handler, channel, account)) + { + DEBUG ("Supported GOA account (%s), claim SASL channel", + tp_proxy_get_object_path (account)); + + tp_channel_dispatch_operation_claim_with_async (dispatch_operation, + client, goa_claim_cb, data); + tp_observe_channels_context_accept (context); + return; + } + + /* Password auth? */ + if (empathy_sasl_channel_supports_mechanism (data->channel, + "X-TELEPATHY-PASSWORD")) + { + empathy_keyring_get_account_password_async (data->account, + get_password_cb, data); + tp_observe_channels_context_delay (context); + return; + } + + /* Unknown auth */ + error = g_error_new_literal (TP_ERROR, TP_ERROR_INVALID_ARGUMENT, + "Unknown auth mechanism"); + tp_observe_channels_context_fail (context, error); + g_clear_error (&error); - tp_observe_channels_context_delay (context); + observe_channels_data_free (data); } static GObject * @@ -465,6 +511,7 @@ empathy_auth_factory_init (EmpathyAuthFactory *self) self->priv->sasl_handlers = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref); + self->priv->goa_handler = empathy_goa_auth_handler_new (); } static void @@ -526,6 +573,7 @@ empathy_auth_factory_dispose (GObject *object) priv->dispose_run = TRUE; g_hash_table_unref (priv->sasl_handlers); + g_object_unref (priv->goa_handler); G_OBJECT_CLASS (empathy_auth_factory_parent_class)->dispose (object); } @@ -565,19 +613,12 @@ empathy_auth_factory_class_init (EmpathyAuthFactoryClass *klass) } EmpathyAuthFactory * -empathy_auth_factory_dup_singleton (void) +empathy_auth_factory_new (TpSimpleClientFactory *factory) { - EmpathyAuthFactory *out = NULL; - TpDBusDaemon *bus; - - bus = tp_dbus_daemon_dup (NULL); - out = g_object_new (EMPATHY_TYPE_AUTH_FACTORY, - "dbus-daemon", bus, + return g_object_new (EMPATHY_TYPE_AUTH_FACTORY, + "factory", factory, "name", "Empathy.Auth", NULL); - g_object_unref (bus); - - return out; } gboolean diff --git a/libempathy/empathy-auth-factory.h b/libempathy/empathy-auth-factory.h index e9a670ceb..e84c13bcc 100644 --- a/libempathy/empathy-auth-factory.h +++ b/libempathy/empathy-auth-factory.h @@ -59,7 +59,7 @@ GType empathy_auth_factory_get_type (void); (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_AUTH_FACTORY, \ EmpathyAuthFactoryClass)) -EmpathyAuthFactory * empathy_auth_factory_dup_singleton (void); +EmpathyAuthFactory * empathy_auth_factory_new (TpSimpleClientFactory *factory); gboolean empathy_auth_factory_register (EmpathyAuthFactory *self, GError **error); diff --git a/libempathy/empathy-goa-auth-handler.c b/libempathy/empathy-goa-auth-handler.c new file mode 100644 index 000000000..a439c72c2 --- /dev/null +++ b/libempathy/empathy-goa-auth-handler.c @@ -0,0 +1,436 @@ +/* + * empathy-auth-goa.c - Source for Goa SASL authentication + * Copyright (C) 2011 Collabora Ltd. + * @author Xavier Claessens <xavier.claessens@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "config.h" + +#define GOA_API_IS_SUBJECT_TO_CHANGE /* awesome! */ +#include <goa/goa.h> + +#include <libsoup/soup.h> +#include <string.h> + +#define DEBUG_FLAG EMPATHY_DEBUG_SASL +#include "empathy-debug.h" +#include "empathy-utils.h" +#include "empathy-goa-auth-handler.h" + +#define MECH_FACEBOOK "X-FACEBOOK-PLATFORM" +#define MECH_MSN "X-MESSENGER-OAUTH2" + +static const gchar *supported_mechanisms[] = { + MECH_FACEBOOK, + MECH_MSN, + NULL}; + +struct _EmpathyGoaAuthHandlerPriv +{ + GoaClient *client; + gboolean client_preparing; + + /* List of AuthData waiting for client to be created */ + GList *auth_queue; +}; + +G_DEFINE_TYPE (EmpathyGoaAuthHandler, empathy_goa_auth_handler, G_TYPE_OBJECT); + +static void +empathy_goa_auth_handler_init (EmpathyGoaAuthHandler *self) +{ + self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, + EMPATHY_TYPE_GOA_AUTH_HANDLER, EmpathyGoaAuthHandlerPriv); +} + +static void +empathy_goa_auth_handler_dispose (GObject *object) +{ + EmpathyGoaAuthHandler *self = (EmpathyGoaAuthHandler *) object; + + /* AuthData keeps a ref on self */ + g_assert (self->priv->auth_queue == NULL); + + tp_clear_object (&self->priv->client); + + G_OBJECT_CLASS (empathy_goa_auth_handler_parent_class)->dispose (object); +} + +static void +empathy_goa_auth_handler_class_init (EmpathyGoaAuthHandlerClass *klass) +{ + GObjectClass *oclass = G_OBJECT_CLASS (klass); + + oclass->dispose = empathy_goa_auth_handler_dispose; + + g_type_class_add_private (klass, sizeof (EmpathyGoaAuthHandlerPriv)); +} + +EmpathyGoaAuthHandler * +empathy_goa_auth_handler_new (void) +{ + return g_object_new (EMPATHY_TYPE_GOA_AUTH_HANDLER, NULL); +} + +typedef struct +{ + EmpathyGoaAuthHandler *self; + TpChannel *channel; + TpAccount *account; + + GoaObject *goa_object; + gchar *access_token; +} AuthData; + +static void +auth_data_free (AuthData *data) +{ + tp_clear_object (&data->self); + tp_clear_object (&data->channel); + tp_clear_object (&data->account); + tp_clear_object (&data->goa_object); + g_free (data->access_token); + g_slice_free (AuthData, data); +} + +static void +fail_auth (AuthData *data) +{ + DEBUG ("Auth failed for account %s", + tp_proxy_get_object_path (data->account)); + + tp_channel_close_async (data->channel, NULL, NULL); + auth_data_free (data); +} + +static void +sasl_status_changed_cb (TpChannel *channel, + guint status, + const gchar *reason, + GHashTable *details, + gpointer user_data, + GObject *self) +{ + switch (status) + { + case TP_SASL_STATUS_SERVER_SUCCEEDED: + tp_cli_channel_interface_sasl_authentication_call_accept_sasl (channel, + -1, NULL, NULL, NULL, NULL); + break; + + case TP_SASL_STATUS_SUCCEEDED: + case TP_SASL_STATUS_SERVER_FAILED: + case TP_SASL_STATUS_CLIENT_FAILED: + tp_cli_channel_call_close (channel, -1, NULL, NULL, NULL, NULL); + break; + + default: + break; + } +} + +static void +facebook_new_challenge_cb (TpChannel *channel, + const GArray *challenge, + gpointer user_data, + GObject *weak_object) +{ + AuthData *data = user_data; + GoaOAuth2Based *oauth2; + const gchar *client_id; + GHashTable *h; + GHashTable *params; + gchar *response; + GArray *response_array; + + DEBUG ("new challenge for %s:\n%s", + tp_proxy_get_object_path (data->account), + challenge->data); + + h = soup_form_decode (challenge->data); + + oauth2 = goa_object_get_oauth2_based (data->goa_object); + client_id = goa_oauth2_based_get_client_id (oauth2); + + /* See https://developers.facebook.com/docs/chat/#platauth */ + params = g_hash_table_new (g_str_hash, g_str_equal); + g_hash_table_insert (params, "method", g_hash_table_lookup (h, "method")); + g_hash_table_insert (params, "nonce", g_hash_table_lookup (h, "nonce")); + g_hash_table_insert (params, "access_token", data->access_token); + g_hash_table_insert (params, "api_key", (gpointer) client_id); + g_hash_table_insert (params, "call_id", "0"); + g_hash_table_insert (params, "v", "1.0"); + + response = soup_form_encode_hash (params); + DEBUG ("Response: %s", response); + + response_array = g_array_new (FALSE, FALSE, sizeof (gchar)); + g_array_append_vals (response_array, response, strlen (response)); + + tp_cli_channel_interface_sasl_authentication_call_respond (data->channel, -1, + response_array, NULL, NULL, NULL, NULL); + + g_hash_table_unref (h); + g_hash_table_unref (params); + g_object_unref (oauth2); + g_free (response); + g_array_unref (response_array); +} + +static void +got_oauth2_access_token_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + GoaOAuth2Based *oauth2 = (GoaOAuth2Based *) source; + AuthData *data = user_data; + gint expires_in; + GError *error = NULL; + + if (!goa_oauth2_based_call_get_access_token_finish (oauth2, + &data->access_token, &expires_in, result, &error)) + { + DEBUG ("Failed to get access token: %s", error->message); + fail_auth (data); + g_clear_error (&error); + return; + } + + DEBUG ("Got access token for %s:\n%s", + tp_proxy_get_object_path (data->account), + data->access_token); + + tp_cli_channel_interface_sasl_authentication_connect_to_sasl_status_changed ( + data->channel, sasl_status_changed_cb, NULL, NULL, NULL, NULL); + g_assert_no_error (error); + + if (empathy_sasl_channel_supports_mechanism (data->channel, MECH_FACEBOOK)) + { + /* Give ownership of data to signal connection */ + tp_cli_channel_interface_sasl_authentication_connect_to_new_challenge ( + data->channel, facebook_new_challenge_cb, + data, (GDestroyNotify) auth_data_free, + NULL, NULL); + + DEBUG ("Start %s mechanism for account %s", MECH_FACEBOOK, + tp_proxy_get_object_path (data->account)); + + tp_cli_channel_interface_sasl_authentication_call_start_mechanism ( + data->channel, -1, MECH_FACEBOOK, NULL, NULL, NULL, NULL); + } + else if (empathy_sasl_channel_supports_mechanism (data->channel, MECH_MSN)) + { + guchar *token_decoded; + gsize token_decoded_len; + GArray *token_decoded_array; + + /* Wocky will base64 encode, but token actually already is base64, so we + * decode now and it will be re-encoded. */ + token_decoded = g_base64_decode (data->access_token, &token_decoded_len); + token_decoded_array = g_array_new (FALSE, FALSE, sizeof (guchar)); + g_array_append_vals (token_decoded_array, token_decoded, token_decoded_len); + + DEBUG ("Start %s mechanism for account %s", MECH_MSN, + tp_proxy_get_object_path (data->account)); + + tp_cli_channel_interface_sasl_authentication_call_start_mechanism_with_data ( + data->channel, -1, MECH_MSN, token_decoded_array, + NULL, NULL, NULL, NULL); + + g_array_unref (token_decoded_array); + g_free (token_decoded); + auth_data_free (data); + } + else + { + /* We already checked it supports one of supported_mechanisms, so this + * can't happen */ + g_assert_not_reached (); + } +} + +static void +ensure_credentials_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + AuthData *data = user_data; + GoaAccount *goa_account = (GoaAccount *) source; + GoaOAuth2Based *oauth2; + gint expires_in; + GError *error = NULL; + + if (!goa_account_call_ensure_credentials_finish (goa_account, &expires_in, + result, &error)) + { + DEBUG ("Failed to EnsureCredentials: %s", error->message); + fail_auth (data); + g_clear_error (&error); + return; + } + + /* We support only oaut2 */ + oauth2 = goa_object_get_oauth2_based (data->goa_object); + if (oauth2 == NULL) + { + DEBUG ("GoaObject does not implement oauth2"); + fail_auth (data); + return; + } + + DEBUG ("Goa daemon has credentials for %s, get the access token", + tp_proxy_get_object_path (data->account)); + + goa_oauth2_based_call_get_access_token (oauth2, NULL, + got_oauth2_access_token_cb, data); + + g_object_unref (oauth2); +} + +static void +start_auth (AuthData *data) +{ + EmpathyGoaAuthHandler *self = data->self; + const GValue *id_value; + const gchar *id; + GList *goa_accounts, *l; + gboolean found = FALSE; + + id_value = tp_account_get_storage_identifier (data->account); + id = g_value_get_string (id_value); + + goa_accounts = goa_client_get_accounts (self->priv->client); + for (l = goa_accounts; l != NULL && !found; l = l->next) + { + GoaObject *goa_object = l->data; + GoaAccount *goa_account; + + goa_account = goa_object_get_account (goa_object); + if (!tp_strdiff (goa_account_get_id (goa_account), id)) + { + data->goa_object = g_object_ref (goa_object); + + DEBUG ("Found the GoaAccount for %s, ensure credentials", + tp_proxy_get_object_path (data->account)); + + goa_account_call_ensure_credentials (goa_account, NULL, + ensure_credentials_cb, data); + + found = TRUE; + } + + g_object_unref (goa_account); + } + g_list_free_full (goa_accounts, g_object_unref); + + if (!found) + { + DEBUG ("Cannot find GoaAccount"); + fail_auth (data); + } +} + +static void +client_new_cb (GObject *source, + GAsyncResult *result, + gpointer user_data) +{ + EmpathyGoaAuthHandler *self = user_data; + GList *l; + GError *error = NULL; + + self->priv->client_preparing = FALSE; + self->priv->client = goa_client_new_finish (result, &error); + if (self->priv->client == NULL) + { + DEBUG ("Error getting GoaClient: %s", error->message); + g_clear_error (&error); + } + + /* process queued data */ + for (l = self->priv->auth_queue; l != NULL; l = l->next) + { + AuthData *data = l->data; + + if (self->priv->client != NULL) + start_auth (data); + else + fail_auth (data); + } + + tp_clear_pointer (&self->priv->auth_queue, g_list_free); +} + +void +empathy_goa_auth_handler_start (EmpathyGoaAuthHandler *self, + TpChannel *channel, + TpAccount *account) +{ + AuthData *data; + + g_return_if_fail (TP_IS_CHANNEL (channel)); + g_return_if_fail (TP_IS_ACCOUNT (account)); + g_return_if_fail (empathy_goa_auth_handler_supports (self, channel, account)); + + DEBUG ("Start Goa auth for account: %s", + tp_proxy_get_object_path (account)); + + data = g_slice_new0 (AuthData); + data->self = g_object_ref (self); + data->channel = g_object_ref (channel); + data->account = g_object_ref (account); + + if (self->priv->client == NULL) + { + /* GOA client not ready yet, queue data */ + if (!self->priv->client_preparing) + { + goa_client_new (NULL, client_new_cb, self); + self->priv->client_preparing = TRUE; + } + + self->priv->auth_queue = g_list_prepend (self->priv->auth_queue, data); + } + else + { + start_auth (data); + } +} + +gboolean +empathy_goa_auth_handler_supports (EmpathyGoaAuthHandler *self, + TpChannel *channel, + TpAccount *account) +{ + const gchar *provider; + const gchar * const *iter; + + g_return_val_if_fail (TP_IS_CHANNEL (channel), FALSE); + g_return_val_if_fail (TP_IS_ACCOUNT (account), FALSE); + + provider = tp_account_get_storage_provider (account); + if (tp_strdiff (provider, EMPATHY_GOA_PROVIDER)) + return FALSE; + + for (iter = supported_mechanisms; *iter != NULL; iter++) + { + if (empathy_sasl_channel_supports_mechanism (channel, *iter)) + return TRUE; + } + + return FALSE; +} diff --git a/libempathy/empathy-goa-auth-handler.h b/libempathy/empathy-goa-auth-handler.h new file mode 100644 index 000000000..5b7c08774 --- /dev/null +++ b/libempathy/empathy-goa-auth-handler.h @@ -0,0 +1,72 @@ +/* + * empathy-auth-goa.h - Header for Goa SASL authentication + * Copyright (C) 2011 Collabora Ltd. + * @author Xavier Claessens <xavier.claessens@collabora.co.uk> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef __EMPATHY_GOA_AUTH_HANDLER_H__ +#define __EMPATHY_GOA_AUTH_HANDLER_H__ + +#include <telepathy-glib/telepathy-glib.h> + +G_BEGIN_DECLS + +typedef struct _EmpathyGoaAuthHandler EmpathyGoaAuthHandler; +typedef struct _EmpathyGoaAuthHandlerClass EmpathyGoaAuthHandlerClass; +typedef struct _EmpathyGoaAuthHandlerPriv EmpathyGoaAuthHandlerPriv; + +struct _EmpathyGoaAuthHandlerClass { + GObjectClass parent_class; +}; + +struct _EmpathyGoaAuthHandler { + GObject parent; + EmpathyGoaAuthHandlerPriv *priv; +}; + +GType empathy_goa_auth_handler_get_type (void); + +/* TYPE MACROS */ +#define EMPATHY_TYPE_GOA_AUTH_HANDLER \ + (empathy_goa_auth_handler_get_type ()) +#define EMPATHY_GOA_AUTH_HANDLER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST((obj), EMPATHY_TYPE_GOA_AUTH_HANDLER, \ + EmpathyGoaAuthHandler)) +#define EMPATHY_GOA_AUTH_HANDLER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST((klass), EMPATHY_TYPE_GOA_AUTH_HANDLER, \ + EmpathyGoaAuthHandlerClass)) +#define EMPATHY_IS_GOA_AUTH_HANDLER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE((obj), EMPATHY_TYPE_GOA_AUTH_HANDLER)) +#define EMPATHY_IS_GOA_AUTH_HANDLER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE((klass), EMPATHY_TYPE_GOA_AUTH_HANDLER)) +#define EMPATHY_GOA_AUTH_HANDLER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_GOA_AUTH_HANDLER, \ + EmpathyGoaAuthHandlerClass)) + +EmpathyGoaAuthHandler *empathy_goa_auth_handler_new (void); + +void empathy_goa_auth_handler_start (EmpathyGoaAuthHandler *self, + TpChannel *channel, + TpAccount *account); + +gboolean empathy_goa_auth_handler_supports (EmpathyGoaAuthHandler *self, + TpChannel *channel, + TpAccount *account); + +G_END_DECLS + +#endif /* #ifndef __EMPATHY_GOA_AUTH_HANDLER_H__*/ diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c index c4c2780ac..83fe4ce7e 100644 --- a/libempathy/empathy-utils.c +++ b/libempathy/empathy-utils.c @@ -1148,3 +1148,18 @@ while_finish: if (can_video_call != NULL) *can_video_call = can_video; } + +gboolean +empathy_sasl_channel_supports_mechanism (TpChannel *channel, + const gchar *mechanism) +{ + GHashTable *props; + const gchar * const *available_mechanisms; + + props = tp_channel_borrow_immutable_properties (channel); + available_mechanisms = tp_asv_get_boxed (props, + TP_PROP_CHANNEL_INTERFACE_SASL_AUTHENTICATION_AVAILABLE_MECHANISMS, + G_TYPE_STRV); + + return tp_strv_contains (available_mechanisms, mechanism); +} diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h index 4983c89a6..f8d47ec8a 100644 --- a/libempathy/empathy-utils.h +++ b/libempathy/empathy-utils.h @@ -118,6 +118,9 @@ void empathy_individual_can_audio_video_call (FolksIndividual *individual, gboolean *can_video_call, EmpathyContact **out_contact); +gboolean empathy_sasl_channel_supports_mechanism (TpChannel *channel, + const gchar *mechanism); + /* Copied from wocky/wocky-utils.h */ #define empathy_implement_finish_void(source, tag) \ @@ -13,8 +13,8 @@ msgid "" msgstr "" "Project-Id-Version: empathy-master-po-gl-57278_.merged\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-10-15 15:30+0200\n" -"PO-Revision-Date: 2011-10-15 15:35+0200\n" +"POT-Creation-Date: 2011-11-04 13:01+0100\n" +"PO-Revision-Date: 2011-11-04 13:02+0100\n" "Last-Translator: Fran Dieguez <frandieguez@gnome.org>\n" "Language-Team: Galician <gnome-l10n-gl@gnome.org>\n" "Language: gl\n" @@ -622,7 +622,7 @@ msgstr "Xestionar as contas de mensaxaría e VoIP" #. Tweak the dialog #: ../data/empathy-accounts.desktop.in.in.h:2 -#: ../src/empathy-accounts-dialog.c:2324 +#: ../src/empathy-accounts-dialog.c:2307 msgid "Messaging and VoIP Accounts" msgstr "Contas de mensaxaría e VoIP" @@ -735,7 +735,7 @@ msgstr "O estado está definido a desconectado" # rever #: ../libempathy/empathy-utils.c:288 ../libempathy/empathy-utils.c:322 #: ../libempathy-gtk/empathy-call-utils.c:49 -#: ../libempathy-gtk/empathy-new-message-dialog.c:75 +#: ../libempathy-gtk/empathy-new-message-dialog.c:82 msgid "Network error" msgstr "Erro de rede" @@ -923,7 +923,7 @@ msgstr[1] "Hai %d meses" msgid "in the future" msgstr "no futuro" -#: ../libempathy-gtk/empathy-account-chooser.c:540 +#: ../libempathy-gtk/empathy-account-chooser.c:688 msgid "All accounts" msgstr "Tódalas contas" @@ -946,60 +946,60 @@ msgstr "Servidor" msgid "Port" msgstr "Porto" -#: ../libempathy-gtk/empathy-account-widget.c:769 -#: ../libempathy-gtk/empathy-account-widget.c:826 +#: ../libempathy-gtk/empathy-account-widget.c:776 +#: ../libempathy-gtk/empathy-account-widget.c:828 #, c-format msgid "%s:" msgstr "%s:" # rever -#: ../libempathy-gtk/empathy-account-widget.c:1192 +#: ../libempathy-gtk/empathy-account-widget.c:1182 msgid "My Web Accounts" msgstr "As miñas contas web" -#: ../libempathy-gtk/empathy-account-widget.c:1209 +#: ../libempathy-gtk/empathy-account-widget.c:1199 #, c-format msgid "The account %s is edited via %s." msgstr "A conta %s edítase mediante %s." -#: ../libempathy-gtk/empathy-account-widget.c:1215 +#: ../libempathy-gtk/empathy-account-widget.c:1205 #, c-format msgid "The account %s cannot be edited in Empathy." msgstr "Non é posíbel editar a conta %s en Empathy." # rever -#: ../libempathy-gtk/empathy-account-widget.c:1234 +#: ../libempathy-gtk/empathy-account-widget.c:1224 msgid "Launch My Web Accounts" msgstr "Iniciar My Web Accounts" #. general handler -#: ../libempathy-gtk/empathy-account-widget.c:1242 +#: ../libempathy-gtk/empathy-account-widget.c:1232 #, c-format msgid "Edit %s" msgstr "Editar %s" -#: ../libempathy-gtk/empathy-account-widget.c:1592 +#: ../libempathy-gtk/empathy-account-widget.c:1582 #: ../libempathy-gtk/empathy-account-widget-irc.ui.h:11 msgid "Username:" msgstr "Nome de _usuario:" -#: ../libempathy-gtk/empathy-account-widget.c:1910 +#: ../libempathy-gtk/empathy-account-widget.c:1900 msgid "A_pply" msgstr "A_plicar" -#: ../libempathy-gtk/empathy-account-widget.c:1940 +#: ../libempathy-gtk/empathy-account-widget.c:1930 msgid "L_og in" msgstr "Iniciar sesi_ón" -#: ../libempathy-gtk/empathy-account-widget.c:2014 +#: ../libempathy-gtk/empathy-account-widget.c:2004 msgid "This account already exists on the server" msgstr "Esta conta xa existe no servidor" -#: ../libempathy-gtk/empathy-account-widget.c:2017 +#: ../libempathy-gtk/empathy-account-widget.c:2007 msgid "Create a new account on the server" msgstr "Crear unha nova conta no servidor" -#: ../libempathy-gtk/empathy-account-widget.c:2209 +#: ../libempathy-gtk/empathy-account-widget.c:2199 msgid "Ca_ncel" msgstr "Ca_ncelar" @@ -1009,20 +1009,20 @@ msgstr "Ca_ncelar" #. * like: "MyUserName on freenode". #. * You should reverse the order of these arguments if the #. * server should come before the login id in your locale. -#: ../libempathy-gtk/empathy-account-widget.c:2487 +#: ../libempathy-gtk/empathy-account-widget.c:2477 #, c-format msgid "%1$s on %2$s" msgstr "%1$s sobre %2$s" #. To translators: The parameter is the protocol name. The resulting #. * string will be something like: "Jabber Account" -#: ../libempathy-gtk/empathy-account-widget.c:2513 +#: ../libempathy-gtk/empathy-account-widget.c:2503 #, c-format msgid "%s Account" msgstr "Conta %s" # rever -#: ../libempathy-gtk/empathy-account-widget.c:2517 +#: ../libempathy-gtk/empathy-account-widget.c:2507 msgid "New account" msgstr "Conta nova" @@ -1405,7 +1405,7 @@ msgid "STUN Server:" msgstr "Servidor STUN:" #: ../libempathy-gtk/empathy-account-widget-sip.ui.h:19 -#: ../libempathy-gtk/empathy-contact-widget.c:347 +#: ../libempathy-gtk/empathy-contactinfo-utils.c:112 msgid "Server:" msgstr "Servidor:" @@ -1780,9 +1780,9 @@ msgstr "%s agora é coñecido como %s" #. * assume it hasn't and if it has, we'll set the proper status when #. * we get the new handler. #: ../libempathy-gtk/empathy-chat.c:2836 -#: ../src/empathy-streamed-media-window.c:1894 -#: ../src/empathy-event-manager.c:1260 ../src/empathy-call-window.c:1546 -#: ../src/empathy-call-window.c:1596 ../src/empathy-call-window.c:2642 +#: ../src/empathy-streamed-media-window.c:1896 +#: ../src/empathy-event-manager.c:1260 ../src/empathy-call-window.c:1536 +#: ../src/empathy-call-window.c:1586 ../src/empathy-call-window.c:2632 msgid "Disconnected" msgstr "Desconectado" @@ -1831,28 +1831,28 @@ msgstr "Conversa" msgid "%s (SMS)" msgstr "%s (SMS)" -#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:430 +#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:436 msgid "Unknown or invalid identifier" msgstr "Identificador descoñecido ou non válido" -#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:432 +#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:438 msgid "Contact blocking temporarily unavailable" msgstr "Bloqueo de contactos non dispoñíbel temporalmente" -#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:434 +#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:440 msgid "Contact blocking unavailable" msgstr "Bloqueo de contactos non dispoñíbel" -#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:436 +#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:442 msgid "Permission Denied" msgstr "Permiso denegado" -#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:440 +#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:446 msgid "Could not block contact" msgstr "Non foi posíbel bloquear o contacto" # rever -#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:783 +#: ../libempathy-gtk/empathy-contact-blocking-dialog.c:789 msgid "Edit Blocked Contacts" msgstr "Editar os contactos bloqueados" @@ -1860,8 +1860,7 @@ msgstr "Editar os contactos bloqueados" #: ../libempathy-gtk/empathy-contact-blocking-dialog.ui.h:1 #: ../libempathy-gtk/empathy-contact-search-dialog.c:512 #: ../libempathy-gtk/empathy-contact-widget.ui.h:2 -#: ../libempathy-gtk/empathy-individual-widget.c:1489 -#: ../libempathy-gtk/empathy-contact-selector-dialog.ui.h:1 +#: ../libempathy-gtk/empathy-individual-widget.c:1441 #: ../src/empathy-chatrooms-window.ui.h:1 #: ../src/empathy-new-chatroom-dialog.ui.h:1 msgid "Account:" @@ -1994,8 +1993,10 @@ msgstr "Eng_adir un contacto…" msgid "_Block Contact" msgstr "_Bloquear contacto" +#. add chat button #: ../libempathy-gtk/empathy-contact-menu.c:321 #: ../libempathy-gtk/empathy-individual-menu.c:758 +#: ../libempathy-gtk/empathy-new-message-dialog.c:320 #: ../src/empathy-main-window-menubar.ui.h:16 msgid "_Chat" msgstr "_Conversa" @@ -2080,222 +2081,243 @@ msgstr "A súa mensaxe de presentación:" msgid "Please let me see when you're online. Thanks!" msgstr "Permítame ver cando está en liña. Grazas." -#: ../libempathy-gtk/empathy-contact-widget.c:336 -#: ../libempathy-gtk/empathy-individual-widget.c:153 -msgid "Full name:" -msgstr "Nome completo:" - -#: ../libempathy-gtk/empathy-contact-widget.c:337 -#: ../libempathy-gtk/empathy-individual-widget.c:154 -msgid "Phone number:" -msgstr "Número de teléfono:" - -#: ../libempathy-gtk/empathy-contact-widget.c:338 -#: ../libempathy-gtk/empathy-individual-widget.c:155 -msgid "E-mail address:" -msgstr "Enderezo de correo electrónico:" - -#: ../libempathy-gtk/empathy-contact-widget.c:339 -#: ../libempathy-gtk/empathy-individual-widget.c:156 -msgid "Website:" -msgstr "Sitio web:" - -#: ../libempathy-gtk/empathy-contact-widget.c:340 -#: ../libempathy-gtk/empathy-individual-widget.c:157 -msgid "Birthday:" -msgstr "Aniversario:" - -#. Note to translators: this is the caption for a string of the form "5 -#. * minutes ago", and refers to the time since the contact last interacted -#. * with their IM client. -#. -#: ../libempathy-gtk/empathy-contact-widget.c:346 -msgid "Last seen:" -msgstr "Última actividade:" - -#: ../libempathy-gtk/empathy-contact-widget.c:348 -msgid "Connected from:" -msgstr "Conectado desde:" - -# rever -#. FIXME: once Idle implements SimplePresence using this information, we can -#. * and should bin this. -#. -#: ../libempathy-gtk/empathy-contact-widget.c:353 -msgid "Away message:" -msgstr "Mensaxe de ausencia:" - -#: ../libempathy-gtk/empathy-contact-widget.c:606 +#: ../libempathy-gtk/empathy-contact-widget.c:504 msgid "Channels:" msgstr "Canles:" -#: ../libempathy-gtk/empathy-contact-widget.c:897 -#: ../libempathy-gtk/empathy-individual-widget.c:469 +#: ../libempathy-gtk/empathy-contact-widget.c:799 +#: ../libempathy-gtk/empathy-individual-widget.c:421 msgid "Country ISO Code:" msgstr "Código ISO de país:" -#: ../libempathy-gtk/empathy-contact-widget.c:899 -#: ../libempathy-gtk/empathy-individual-widget.c:471 +#: ../libempathy-gtk/empathy-contact-widget.c:801 +#: ../libempathy-gtk/empathy-individual-widget.c:423 msgid "Country:" msgstr "País:" -#: ../libempathy-gtk/empathy-contact-widget.c:901 -#: ../libempathy-gtk/empathy-individual-widget.c:473 +#: ../libempathy-gtk/empathy-contact-widget.c:803 +#: ../libempathy-gtk/empathy-individual-widget.c:425 msgid "State:" msgstr "Rexión:" -#: ../libempathy-gtk/empathy-contact-widget.c:903 -#: ../libempathy-gtk/empathy-individual-widget.c:475 +#: ../libempathy-gtk/empathy-contact-widget.c:805 +#: ../libempathy-gtk/empathy-individual-widget.c:427 msgid "City:" msgstr "Cidade:" -#: ../libempathy-gtk/empathy-contact-widget.c:905 -#: ../libempathy-gtk/empathy-individual-widget.c:477 +#: ../libempathy-gtk/empathy-contact-widget.c:807 +#: ../libempathy-gtk/empathy-individual-widget.c:429 msgid "Area:" msgstr "Área:" -#: ../libempathy-gtk/empathy-contact-widget.c:907 -#: ../libempathy-gtk/empathy-individual-widget.c:479 +#: ../libempathy-gtk/empathy-contact-widget.c:809 +#: ../libempathy-gtk/empathy-individual-widget.c:431 msgid "Postal Code:" msgstr "Código postal:" -#: ../libempathy-gtk/empathy-contact-widget.c:909 -#: ../libempathy-gtk/empathy-individual-widget.c:481 +#: ../libempathy-gtk/empathy-contact-widget.c:811 +#: ../libempathy-gtk/empathy-individual-widget.c:433 msgid "Street:" msgstr "Rúa:" -#: ../libempathy-gtk/empathy-contact-widget.c:911 -#: ../libempathy-gtk/empathy-individual-widget.c:483 +#: ../libempathy-gtk/empathy-contact-widget.c:813 +#: ../libempathy-gtk/empathy-individual-widget.c:435 msgid "Building:" msgstr "Edificio:" # rever -#: ../libempathy-gtk/empathy-contact-widget.c:913 -#: ../libempathy-gtk/empathy-individual-widget.c:485 +#: ../libempathy-gtk/empathy-contact-widget.c:815 +#: ../libempathy-gtk/empathy-individual-widget.c:437 msgid "Floor:" msgstr "_Andar:" -#: ../libempathy-gtk/empathy-contact-widget.c:915 -#: ../libempathy-gtk/empathy-individual-widget.c:487 +#: ../libempathy-gtk/empathy-contact-widget.c:817 +#: ../libempathy-gtk/empathy-individual-widget.c:439 msgid "Room:" msgstr "Sala:" -#: ../libempathy-gtk/empathy-contact-widget.c:917 -#: ../libempathy-gtk/empathy-individual-widget.c:489 +#: ../libempathy-gtk/empathy-contact-widget.c:819 +#: ../libempathy-gtk/empathy-individual-widget.c:441 msgid "Text:" msgstr "Texto:" -#: ../libempathy-gtk/empathy-contact-widget.c:919 -#: ../libempathy-gtk/empathy-individual-widget.c:491 +#: ../libempathy-gtk/empathy-contact-widget.c:821 +#: ../libempathy-gtk/empathy-individual-widget.c:443 msgid "Description:" msgstr "Descrición:" -#: ../libempathy-gtk/empathy-contact-widget.c:921 -#: ../libempathy-gtk/empathy-individual-widget.c:493 +#: ../libempathy-gtk/empathy-contact-widget.c:823 +#: ../libempathy-gtk/empathy-individual-widget.c:445 msgid "URI:" msgstr "URI:" -#: ../libempathy-gtk/empathy-contact-widget.c:923 -#: ../libempathy-gtk/empathy-individual-widget.c:495 +#: ../libempathy-gtk/empathy-contact-widget.c:825 +#: ../libempathy-gtk/empathy-individual-widget.c:447 msgid "Accuracy Level:" msgstr "Nivel de precisión:" -#: ../libempathy-gtk/empathy-contact-widget.c:925 -#: ../libempathy-gtk/empathy-individual-widget.c:497 +#: ../libempathy-gtk/empathy-contact-widget.c:827 +#: ../libempathy-gtk/empathy-individual-widget.c:449 msgid "Error:" msgstr "Erro:" -#: ../libempathy-gtk/empathy-contact-widget.c:927 -#: ../libempathy-gtk/empathy-individual-widget.c:499 +#: ../libempathy-gtk/empathy-contact-widget.c:829 +#: ../libempathy-gtk/empathy-individual-widget.c:451 msgid "Vertical Error (meters):" msgstr "Erro vertical (metros):" -#: ../libempathy-gtk/empathy-contact-widget.c:929 -#: ../libempathy-gtk/empathy-individual-widget.c:501 +#: ../libempathy-gtk/empathy-contact-widget.c:831 +#: ../libempathy-gtk/empathy-individual-widget.c:453 msgid "Horizontal Error (meters):" msgstr "Erro horizontal (metros):" -#: ../libempathy-gtk/empathy-contact-widget.c:931 -#: ../libempathy-gtk/empathy-individual-widget.c:503 +#: ../libempathy-gtk/empathy-contact-widget.c:833 +#: ../libempathy-gtk/empathy-individual-widget.c:455 msgid "Speed:" msgstr "Velocidade:" -#: ../libempathy-gtk/empathy-contact-widget.c:933 -#: ../libempathy-gtk/empathy-individual-widget.c:505 +#: ../libempathy-gtk/empathy-contact-widget.c:835 +#: ../libempathy-gtk/empathy-individual-widget.c:457 msgid "Bearing:" msgstr "Orientación:" -#: ../libempathy-gtk/empathy-contact-widget.c:935 -#: ../libempathy-gtk/empathy-individual-widget.c:507 +#: ../libempathy-gtk/empathy-contact-widget.c:837 +#: ../libempathy-gtk/empathy-individual-widget.c:459 msgid "Climb Speed:" msgstr "Velocidade de incremento:" -#: ../libempathy-gtk/empathy-contact-widget.c:937 -#: ../libempathy-gtk/empathy-individual-widget.c:509 +#: ../libempathy-gtk/empathy-contact-widget.c:839 +#: ../libempathy-gtk/empathy-individual-widget.c:461 msgid "Last Updated on:" msgstr "Última actualización:" -#: ../libempathy-gtk/empathy-contact-widget.c:939 -#: ../libempathy-gtk/empathy-individual-widget.c:511 +#: ../libempathy-gtk/empathy-contact-widget.c:841 +#: ../libempathy-gtk/empathy-individual-widget.c:463 msgid "Longitude:" msgstr "Lonxitude:" -#: ../libempathy-gtk/empathy-contact-widget.c:941 -#: ../libempathy-gtk/empathy-individual-widget.c:513 +#: ../libempathy-gtk/empathy-contact-widget.c:843 +#: ../libempathy-gtk/empathy-individual-widget.c:465 msgid "Latitude:" msgstr "Latitude:" -#: ../libempathy-gtk/empathy-contact-widget.c:943 -#: ../libempathy-gtk/empathy-individual-widget.c:515 +#: ../libempathy-gtk/empathy-contact-widget.c:845 +#: ../libempathy-gtk/empathy-individual-widget.c:467 msgid "Altitude:" msgstr "Altitude:" -#: ../libempathy-gtk/empathy-contact-widget.c:996 -#: ../libempathy-gtk/empathy-contact-widget.c:1011 -#: ../libempathy-gtk/empathy-individual-widget.c:607 -#: ../libempathy-gtk/empathy-individual-widget.c:622 +#: ../libempathy-gtk/empathy-contact-widget.c:898 +#: ../libempathy-gtk/empathy-contact-widget.c:913 +#: ../libempathy-gtk/empathy-individual-widget.c:559 +#: ../libempathy-gtk/empathy-individual-widget.c:574 #: ../src/empathy-preferences.ui.h:17 msgid "Location" msgstr "Localización" #. translators: format is "Location, $date" -#: ../libempathy-gtk/empathy-contact-widget.c:1013 -#: ../libempathy-gtk/empathy-individual-widget.c:624 +#: ../libempathy-gtk/empathy-contact-widget.c:915 +#: ../libempathy-gtk/empathy-individual-widget.c:576 #, c-format msgid "%s, %s" msgstr "%s, %s" -#: ../libempathy-gtk/empathy-contact-widget.c:1065 -#: ../libempathy-gtk/empathy-individual-widget.c:673 +#: ../libempathy-gtk/empathy-contact-widget.c:967 +#: ../libempathy-gtk/empathy-individual-widget.c:625 msgid "%B %e, %Y at %R UTC" msgstr "%B %e, %Y de %R UTC" # rever -#: ../libempathy-gtk/empathy-contact-widget.c:1147 -#: ../libempathy-gtk/empathy-individual-widget.c:915 +#: ../libempathy-gtk/empathy-contact-widget.c:1049 +#: ../libempathy-gtk/empathy-individual-widget.c:867 msgid "Save Avatar" msgstr "Gardar o avatar" # rever -#: ../libempathy-gtk/empathy-contact-widget.c:1203 -#: ../libempathy-gtk/empathy-individual-widget.c:973 +#: ../libempathy-gtk/empathy-contact-widget.c:1105 +#: ../libempathy-gtk/empathy-individual-widget.c:925 msgid "Unable to save avatar" msgstr "Non foi posíbel gardar o avatar" # rever -#: ../libempathy-gtk/empathy-contact-widget.c:1887 +#: ../libempathy-gtk/empathy-contact-widget.c:1793 #: ../libempathy-gtk/empathy-individual-menu.c:1066 -#: ../libempathy-gtk/empathy-individual-widget.c:1372 +#: ../libempathy-gtk/empathy-individual-widget.c:1324 msgid "Favorite" msgstr "Favorito" +#: ../libempathy-gtk/empathy-contactinfo-utils.c:102 +msgid "Full name" +msgstr "Nome completo" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:103 +msgid "Phone number" +msgstr "Número de teléfono" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:104 +msgid "E-mail address" +msgstr "Enderezo de correo electrónico" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:105 +msgid "Website" +msgstr "Sitio web" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:106 +msgid "Birthday" +msgstr "Aniversario" + +#. Note to translators: this is the caption for a string of the form "5 +#. * minutes ago", and refers to the time since the contact last interacted +#. * with their IM client. +#: ../libempathy-gtk/empathy-contactinfo-utils.c:111 +msgid "Last seen:" +msgstr "Última actividade" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:113 +msgid "Connected from:" +msgstr "Conectado desde:" + +# rever +#. FIXME: once Idle implements SimplePresence using this information, we can +#. * and should bin this. +#: ../libempathy-gtk/empathy-contactinfo-utils.c:117 +msgid "Away message:" +msgstr "Mensaxe de ausencia:" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:130 +msgid "work" +msgstr "traballo" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:131 +msgid "home" +msgstr "persoal" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:132 +msgid "mobile" +msgstr "móbil" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:133 +msgid "voice" +msgstr "voz" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:134 +msgid "preferred" +msgstr "prefirido" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:135 +msgid "postal" +msgstr "postal" + +#: ../libempathy-gtk/empathy-contactinfo-utils.c:136 +msgid "parcel" +msgstr "grupo" + #: ../libempathy-gtk/empathy-contact-widget.ui.h:1 msgid "<b>Location</b> at (date)\t" msgstr "<b>Localización</b> o (date)\t" #. Alias #: ../libempathy-gtk/empathy-contact-widget.ui.h:3 -#: ../libempathy-gtk/empathy-individual-widget.c:1308 +#: ../libempathy-gtk/empathy-individual-widget.c:1260 msgid "Alias:" msgstr "Alias:" @@ -2317,7 +2339,7 @@ msgstr "Detalles do contacto" #. Identifier to connect to Instant Messaging network #. Translators: Identifier to connect to Instant Messaging network #: ../libempathy-gtk/empathy-contact-widget.ui.h:8 -#: ../libempathy-gtk/empathy-individual-widget.c:1517 +#: ../libempathy-gtk/empathy-individual-widget.c:1469 msgid "Identifier:" msgstr "Identificador:" @@ -2357,7 +2379,7 @@ msgid "Select" msgstr "Seleccionar" #: ../libempathy-gtk/empathy-groups-widget.c:409 -#: ../src/empathy-main-window.c:1967 +#: ../src/empathy-main-window.c:1953 msgid "Group" msgstr "Grupo" @@ -2408,7 +2430,7 @@ msgstr "Seleccione a conta a usar para realizar a chamada" #. * title #: ../libempathy-gtk/empathy-individual-menu.c:313 #: ../libempathy-gtk/empathy-log-window.ui.h:2 -#: ../src/empathy-streamed-media-window.c:1299 +#: ../src/empathy-streamed-media-window.c:1301 #: ../src/empathy-call-window.ui.h:2 msgid "Call" msgstr "Chamar" @@ -2425,9 +2447,9 @@ msgstr "Traballo" msgid "HOME" msgstr "Casa" -#. add an SMS button +#. add SMS button #: ../libempathy-gtk/empathy-individual-menu.c:805 -#: ../libempathy-gtk/empathy-new-message-dialog.c:295 +#: ../libempathy-gtk/empathy-new-message-dialog.c:314 msgid "_SMS" msgstr "_SMS" @@ -2457,7 +2479,7 @@ msgstr "" "Desexa eliminar o contacto ligado %s? Teña en conta que eliminaranse tamén " "todos os contactos que forman este contacto ligado." -#: ../libempathy-gtk/empathy-individual-widget.c:1656 +#: ../libempathy-gtk/empathy-individual-widget.c:1608 #, c-format msgid "Linked contact containing %u contact" msgid_plural "Linked contacts containing %u contacts" @@ -2542,137 +2564,137 @@ msgctxt "Unlink individual (button)" msgid "_Unlink" msgstr "_Desligar" -#: ../libempathy-gtk/empathy-log-window.c:634 +#: ../libempathy-gtk/empathy-log-window.c:620 msgid "History" msgstr "Historial" -#: ../libempathy-gtk/empathy-log-window.c:689 +#: ../libempathy-gtk/empathy-log-window.c:675 msgid "Show" msgstr "Mostrar" -#: ../libempathy-gtk/empathy-log-window.c:711 +#: ../libempathy-gtk/empathy-log-window.c:697 msgid "Search" msgstr "Buscar" -#: ../libempathy-gtk/empathy-log-window.c:1159 +#: ../libempathy-gtk/empathy-log-window.c:1145 #, c-format msgid "Chat in %s" msgstr "Conversar en %s" -#: ../libempathy-gtk/empathy-log-window.c:1161 +#: ../libempathy-gtk/empathy-log-window.c:1147 #, c-format msgid "Chat with %s" msgstr "Conversa con %s" -#: ../libempathy-gtk/empathy-log-window.c:1211 -#: ../libempathy-gtk/empathy-log-window.c:1358 +#: ../libempathy-gtk/empathy-log-window.c:1197 +#: ../libempathy-gtk/empathy-log-window.c:1344 msgctxt "A date with the time" msgid "%A, %e %B %Y %X" msgstr "%A, %e de %B de %Y ás %X" #. Translators: this is an emote: '* Danielle waves' -#: ../libempathy-gtk/empathy-log-window.c:1300 +#: ../libempathy-gtk/empathy-log-window.c:1286 #, c-format msgid "<i>* %s %s</i>" msgstr "<i>* %s %s</i>" #. Translators: this is a message: 'Danielle: hello' #. * The string in bold is the sender's name -#: ../libempathy-gtk/empathy-log-window.c:1306 +#: ../libempathy-gtk/empathy-log-window.c:1292 #, c-format msgid "<b>%s:</b> %s" msgstr "<b>%s:</b> %s" -#: ../libempathy-gtk/empathy-log-window.c:1382 +#: ../libempathy-gtk/empathy-log-window.c:1368 #, c-format msgid "%s second" msgid_plural "%s seconds" msgstr[0] "%s segundo" msgstr[1] "%s segundos" -#: ../libempathy-gtk/empathy-log-window.c:1389 +#: ../libempathy-gtk/empathy-log-window.c:1375 #, c-format msgid "%s minute" msgid_plural "%s minutes" msgstr[0] "%s minuto" msgstr[1] "%s minutos" -#: ../libempathy-gtk/empathy-log-window.c:1397 +#: ../libempathy-gtk/empathy-log-window.c:1383 #, c-format msgid "Call took %s, ended at %s" msgstr "A chamada levou %s, rematou ás %s" -#: ../libempathy-gtk/empathy-log-window.c:1729 +#: ../libempathy-gtk/empathy-log-window.c:1715 msgid "Today" msgstr "Hoxe" -#: ../libempathy-gtk/empathy-log-window.c:1733 +#: ../libempathy-gtk/empathy-log-window.c:1719 msgid "Yesterday" msgstr "Mañá" #. Translators: A date such as '23 May 2010' (strftime format) -#: ../libempathy-gtk/empathy-log-window.c:1748 +#: ../libempathy-gtk/empathy-log-window.c:1734 msgid "%e %B %Y" msgstr "%e de %B de %Y" -#: ../libempathy-gtk/empathy-log-window.c:1829 -#: ../libempathy-gtk/empathy-log-window.c:3444 +#: ../libempathy-gtk/empathy-log-window.c:1815 +#: ../libempathy-gtk/empathy-log-window.c:3430 msgid "Anytime" msgstr "Calquera momento" -#: ../libempathy-gtk/empathy-log-window.c:1916 -#: ../libempathy-gtk/empathy-log-window.c:2372 +#: ../libempathy-gtk/empathy-log-window.c:1902 +#: ../libempathy-gtk/empathy-log-window.c:2358 msgid "Anyone" msgstr "Calquera persoa" -#: ../libempathy-gtk/empathy-log-window.c:2685 +#: ../libempathy-gtk/empathy-log-window.c:2671 msgid "Who" msgstr "Quen" -#: ../libempathy-gtk/empathy-log-window.c:2889 +#: ../libempathy-gtk/empathy-log-window.c:2875 msgid "When" msgstr "Cando" -#: ../libempathy-gtk/empathy-log-window.c:3005 +#: ../libempathy-gtk/empathy-log-window.c:2991 msgid "Anything" msgstr "Calquera cousa" -#: ../libempathy-gtk/empathy-log-window.c:3007 +#: ../libempathy-gtk/empathy-log-window.c:2993 msgid "Text chats" msgstr "Conversas de texto" -#: ../libempathy-gtk/empathy-log-window.c:3009 +#: ../libempathy-gtk/empathy-log-window.c:2995 #: ../src/empathy-preferences.ui.h:4 msgid "Calls" msgstr "Chamadas" # rever -#: ../libempathy-gtk/empathy-log-window.c:3014 +#: ../libempathy-gtk/empathy-log-window.c:3000 msgid "Incoming calls" msgstr "Chamadas entrantes" # rever -#: ../libempathy-gtk/empathy-log-window.c:3015 +#: ../libempathy-gtk/empathy-log-window.c:3001 msgid "Outgoing calls" msgstr "Chamadas de voz saíntes" -#: ../libempathy-gtk/empathy-log-window.c:3016 +#: ../libempathy-gtk/empathy-log-window.c:3002 msgid "Missed calls" msgstr "Chamadas perdidas de %s" -#: ../libempathy-gtk/empathy-log-window.c:3038 +#: ../libempathy-gtk/empathy-log-window.c:3024 msgid "What" msgstr "Que" -#: ../libempathy-gtk/empathy-log-window.c:3747 +#: ../libempathy-gtk/empathy-log-window.c:3719 msgid "Are you sure you want to delete all logs of previous conversations?" msgstr "Ten certeza de eliminar tódolos rexistros das conversas anteriores?" -#: ../libempathy-gtk/empathy-log-window.c:3751 +#: ../libempathy-gtk/empathy-log-window.c:3723 msgid "Clear All" msgstr "Limpar todo" -#: ../libempathy-gtk/empathy-log-window.c:3758 +#: ../libempathy-gtk/empathy-log-window.c:3730 msgid "Delete from:" msgstr "Eliminar desde:" @@ -2714,81 +2736,75 @@ msgid "page 2" msgstr "páxina 2" # rever -#: ../libempathy-gtk/empathy-contact-selector-dialog.ui.h:2 -msgid "Contact ID:" -msgstr "ID do contacto:" - -# rever -#: ../libempathy-gtk/empathy-new-message-dialog.c:77 +#: ../libempathy-gtk/empathy-new-message-dialog.c:84 msgid "The contact is offline" msgstr "O contacto está desconectado" # rever -#: ../libempathy-gtk/empathy-new-message-dialog.c:79 +#: ../libempathy-gtk/empathy-new-message-dialog.c:86 msgid "The specified contact is either invalid or unknown" msgstr "O contacto especificado é descoñecido ou non é válido" -#: ../libempathy-gtk/empathy-new-message-dialog.c:81 +#: ../libempathy-gtk/empathy-new-message-dialog.c:88 msgid "The contact does not support this kind of conversation" msgstr "O contacto non admite este tipo de conversa" -#: ../libempathy-gtk/empathy-new-message-dialog.c:83 +#: ../libempathy-gtk/empathy-new-message-dialog.c:90 msgid "The requested functionality is not implemented for this protocol" msgstr "A funcionalidade requirida non está implementada para este protocolo" -#: ../libempathy-gtk/empathy-new-message-dialog.c:89 +#: ../libempathy-gtk/empathy-new-message-dialog.c:96 msgid "Could not start a conversation with the given contact" msgstr "Non foi posíbel iniciar unha conversa co contacto dado" -#: ../libempathy-gtk/empathy-new-message-dialog.c:91 +#: ../libempathy-gtk/empathy-new-message-dialog.c:98 msgid "You are banned from this channel" msgstr "Vostede foi bloqueado nesta canle" -#: ../libempathy-gtk/empathy-new-message-dialog.c:93 +#: ../libempathy-gtk/empathy-new-message-dialog.c:100 msgid "This channel is full" msgstr "Esta canel está completa" # rever -#: ../libempathy-gtk/empathy-new-message-dialog.c:95 +#: ../libempathy-gtk/empathy-new-message-dialog.c:102 msgid "You must be invited to join this channel" msgstr "Debe ter un convite para unirse a esta canle" # rever -#: ../libempathy-gtk/empathy-new-message-dialog.c:97 +#: ../libempathy-gtk/empathy-new-message-dialog.c:104 msgid "Can't proceed while disconnected" msgstr "Non é posíbel continuar mentres estea desconectado" -#: ../libempathy-gtk/empathy-new-message-dialog.c:99 +#: ../libempathy-gtk/empathy-new-message-dialog.c:106 msgid "Permission denied" msgstr "Permiso denegado" -#: ../libempathy-gtk/empathy-new-message-dialog.c:105 +#: ../libempathy-gtk/empathy-new-message-dialog.c:112 msgid "There was an error starting the conversation" msgstr "Produciuse un erro ao iniciar a conversa" -#. add chat button -#: ../libempathy-gtk/empathy-new-message-dialog.c:305 -msgid "C_hat" -msgstr "Con_versa" +#: ../libempathy-gtk/empathy-new-message-dialog.c:291 +#: ../libempathy-gtk/empathy-new-call-dialog.c:203 +msgid "Enter a contact identifier or phone number:" +msgstr "Escriba o identificador dun contacto ou un número de teléfono:" #. Tweak the dialog -#: ../libempathy-gtk/empathy-new-message-dialog.c:324 +#: ../libempathy-gtk/empathy-new-message-dialog.c:334 msgid "New Conversation" msgstr "Conversa nova" -# rever -#. add video toggle -#: ../libempathy-gtk/empathy-new-call-dialog.c:204 -msgid "Send _Video" -msgstr "Enviar _Vídeo" +#. add video button +#: ../libempathy-gtk/empathy-new-call-dialog.c:226 +msgid "_Video Call" +msgstr "Chamada de _vídeo" -#. add chat button -#: ../libempathy-gtk/empathy-new-call-dialog.c:215 -msgid "C_all" -msgstr "Ch_amar" +#. add audio button +#: ../libempathy-gtk/empathy-new-call-dialog.c:236 +msgid "_Audio Call" +msgstr "Chamada de vo_z" #. Tweak the dialog -#: ../libempathy-gtk/empathy-new-call-dialog.c:225 +#: ../libempathy-gtk/empathy-new-call-dialog.c:246 msgid "New Call" msgstr "Nova chamada" @@ -2829,12 +2845,8 @@ msgstr "Faga clic para facer este estado un dos favoritos" msgid "Set status" msgstr "Estabelecer status" -#: ../libempathy-gtk/empathy-presence-chooser.c:943 -msgid "Set your presence and current status" -msgstr "Estabeleza a súa presenza e estado actual" - #. Custom messages -#: ../libempathy-gtk/empathy-presence-chooser.c:1131 +#: ../libempathy-gtk/empathy-presence-chooser.c:1135 msgid "Custom messages…" msgstr "Mensaxes personalizadas…" @@ -2922,12 +2934,12 @@ msgstr "Chamada de voz finalizada" msgid "Edit Custom Messages" msgstr "Editar mensaxes personalizadas" -#: ../libempathy-gtk/empathy-theme-adium.c:1044 +#: ../libempathy-gtk/empathy-theme-adium.c:1047 #, c-format msgid "Message edited at %s" msgstr "Mensaxe editado ás %s" -#: ../libempathy-gtk/empathy-theme-adium.c:1749 +#: ../libempathy-gtk/empathy-theme-adium.c:1752 msgid "Normal" msgstr "Normal" @@ -3230,25 +3242,25 @@ msgid "Instant Message (Empathy)" msgstr "Mensaxe instantáneo (Empathy)" # rever -#: ../src/empathy.c:434 +#: ../src/empathy.c:433 msgid "Don't connect on startup" msgstr "Non conectarse ao inicio" # rever -#: ../src/empathy.c:438 +#: ../src/empathy.c:437 msgid "Don't display the contact list or any other dialogs on startup" msgstr "Non mostrar a lista de contactos nin outros diálogos no inicio" # rever -#: ../src/empathy.c:453 +#: ../src/empathy.c:452 msgid "- Empathy IM Client" msgstr " - Cliente de mensaxaría instantánea Empathy" -#: ../src/empathy.c:640 +#: ../src/empathy.c:639 msgid "Error contacting the Account Manager" msgstr "Produciuse un erro ao contactar co Xestor de contas" -#: ../src/empathy.c:642 +#: ../src/empathy.c:641 #, c-format msgid "" "There was an error while trying to connect to the Telepathy Account Manager. " @@ -3490,7 +3502,7 @@ msgstr "A súa nova conta aínda non foi gardada." #: ../src/empathy-accounts-dialog.c:345 #: ../src/empathy-streamed-media-window.c:754 -#: ../src/empathy-call-window.c:1330 +#: ../src/empathy-call-window.c:1320 msgid "Connecting…" msgstr "Conectando…" @@ -3594,11 +3606,11 @@ msgid "_Import…" msgstr "_Importar…" # rever -#: ../src/empathy-auth-client.c:249 +#: ../src/empathy-auth-client.c:251 msgid " - Empathy authentication client" msgstr "- Cliente de autenticación Empathy" -#: ../src/empathy-auth-client.c:265 +#: ../src/empathy-auth-client.c:267 msgid "Empathy authentication client" msgstr "Cliente de autenticación Empathy" @@ -3646,71 +3658,71 @@ msgstr "Entrada de audio" msgid "Video input" msgstr "Entrada de vídeo" -#: ../src/empathy-streamed-media-window.c:1140 +#: ../src/empathy-streamed-media-window.c:1142 msgid "Dialpad" msgstr "Marcador" # rever -#: ../src/empathy-streamed-media-window.c:1151 +#: ../src/empathy-streamed-media-window.c:1153 msgid "Details" msgstr "Detalles do contacto" #. translators: Call is a noun and %s is the contact name. This string #. * is used in the window title -#: ../src/empathy-streamed-media-window.c:1220 -#: ../src/empathy-call-window.c:1939 +#: ../src/empathy-streamed-media-window.c:1222 +#: ../src/empathy-call-window.c:1929 #, c-format msgid "Call with %s" msgstr "Chamar con %s" -#: ../src/empathy-streamed-media-window.c:1453 -#: ../src/empathy-call-window.c:2183 +#: ../src/empathy-streamed-media-window.c:1455 +#: ../src/empathy-call-window.c:2173 msgid "The IP address as seen by the machine" msgstr "O enderezo IP como é visto polo computador" -#: ../src/empathy-streamed-media-window.c:1455 -#: ../src/empathy-call-window.c:2185 +#: ../src/empathy-streamed-media-window.c:1457 +#: ../src/empathy-call-window.c:2175 msgid "The IP address as seen by a server on the Internet" msgstr "O enderezo IP como é visto por un servidor na Internet" -#: ../src/empathy-streamed-media-window.c:1457 -#: ../src/empathy-call-window.c:2187 +#: ../src/empathy-streamed-media-window.c:1459 +#: ../src/empathy-call-window.c:2177 msgid "The IP address of the peer as seen by the other side" msgstr "O enderezo IP do par como é visto pola outra parte" -#: ../src/empathy-streamed-media-window.c:1459 -#: ../src/empathy-call-window.c:2189 +#: ../src/empathy-streamed-media-window.c:1461 +#: ../src/empathy-call-window.c:2179 msgid "The IP address of a relay server" msgstr "O enderezo IP dun servidor de desvío" -#: ../src/empathy-streamed-media-window.c:1461 -#: ../src/empathy-call-window.c:2191 +#: ../src/empathy-streamed-media-window.c:1463 +#: ../src/empathy-call-window.c:2181 msgid "The IP address of the multicast group" msgstr "O enderezo IP do grupo multicast" -#: ../src/empathy-streamed-media-window.c:1843 -#: ../src/empathy-streamed-media-window.c:1846 -#: ../src/empathy-streamed-media-window.c:1849 -#: ../src/empathy-streamed-media-window.c:1852 +#: ../src/empathy-streamed-media-window.c:1845 +#: ../src/empathy-streamed-media-window.c:1848 +#: ../src/empathy-streamed-media-window.c:1851 +#: ../src/empathy-streamed-media-window.c:1854 msgctxt "codec" msgid "Unknown" msgstr "Descoñecido" # rever #. Translators: number of minutes:seconds the caller has been connected -#: ../src/empathy-streamed-media-window.c:2144 +#: ../src/empathy-streamed-media-window.c:2146 #, c-format msgid "Connected — %d:%02dm" msgstr "Conectado — %d:%02dm" # rever -#: ../src/empathy-streamed-media-window.c:2205 -#: ../src/empathy-call-window.c:2961 +#: ../src/empathy-streamed-media-window.c:2207 +#: ../src/empathy-call-window.c:2984 msgid "Technical Details" msgstr "Detalles técnicos" -#: ../src/empathy-streamed-media-window.c:2243 -#: ../src/empathy-call-window.c:2999 +#: ../src/empathy-streamed-media-window.c:2245 +#: ../src/empathy-call-window.c:3023 #, c-format msgid "" "%s's software does not understand any of the audio formats supported by your " @@ -3719,8 +3731,8 @@ msgstr "" "O software de %s non entende algúns dos formatos de video admitidos polo seu " "computador" -#: ../src/empathy-streamed-media-window.c:2248 -#: ../src/empathy-call-window.c:3004 +#: ../src/empathy-streamed-media-window.c:2250 +#: ../src/empathy-call-window.c:3028 #, c-format msgid "" "%s's software does not understand any of the video formats supported by your " @@ -3729,8 +3741,8 @@ msgstr "" "O software de %s non entende algúns dos formatos de vídeo admitidos polo seu " "computador" -#: ../src/empathy-streamed-media-window.c:2254 -#: ../src/empathy-call-window.c:3010 +#: ../src/empathy-streamed-media-window.c:2256 +#: ../src/empathy-call-window.c:3034 #, c-format msgid "" "Can't establish a connection to %s. One of you might be on a network that " @@ -3739,25 +3751,25 @@ msgstr "" "Non é posíbel estabelecer unha conexión a %s. Un deles pode estar nunha rede " "que non permite conexións directas." -#: ../src/empathy-streamed-media-window.c:2260 -#: ../src/empathy-call-window.c:3016 +#: ../src/empathy-streamed-media-window.c:2262 +#: ../src/empathy-call-window.c:3040 msgid "There was a failure on the network" msgstr "Produciuse un fallo na rede" -#: ../src/empathy-streamed-media-window.c:2264 -#: ../src/empathy-call-window.c:3020 +#: ../src/empathy-streamed-media-window.c:2266 +#: ../src/empathy-call-window.c:3044 msgid "" "The audio formats necessary for this call are not installed on your computer" msgstr "Non ten instalados os formatos de audio necesarios neste computador" -#: ../src/empathy-streamed-media-window.c:2267 -#: ../src/empathy-call-window.c:3023 +#: ../src/empathy-streamed-media-window.c:2269 +#: ../src/empathy-call-window.c:3047 msgid "" "The video formats necessary for this call are not installed on your computer" msgstr "Non ten instalados os formatos de vídeo necesarios neste computador" -#: ../src/empathy-streamed-media-window.c:2277 -#: ../src/empathy-call-window.c:3035 +#: ../src/empathy-streamed-media-window.c:2279 +#: ../src/empathy-call-window.c:3059 #, c-format msgid "" "Something unexpected happened in a Telepathy component. Please <a href=\"%s" @@ -3768,23 +3780,23 @@ msgstr "" "href=«%s»>Informe de este erro</a> e anexe os rexistros que pode ollar na " "xanela «Depurar» no menú Axuda." -#: ../src/empathy-streamed-media-window.c:2285 -#: ../src/empathy-call-window.c:3044 +#: ../src/empathy-streamed-media-window.c:2287 +#: ../src/empathy-call-window.c:3068 msgid "There was a failure in the call engine" msgstr "Produciuse un fallo ao chamar ao motor" -#: ../src/empathy-streamed-media-window.c:2288 -#: ../src/empathy-call-window.c:3047 +#: ../src/empathy-streamed-media-window.c:2290 +#: ../src/empathy-call-window.c:3071 msgid "The end of the stream was reached" msgstr "Chegouse ao final do fluxo" -#: ../src/empathy-streamed-media-window.c:2328 -#: ../src/empathy-call-window.c:3087 +#: ../src/empathy-streamed-media-window.c:2330 +#: ../src/empathy-call-window.c:3111 msgid "Can't establish audio stream" msgstr "Non é posíbel estabelecer un fluxo de audio" -#: ../src/empathy-streamed-media-window.c:2338 -#: ../src/empathy-call-window.c:3097 +#: ../src/empathy-streamed-media-window.c:2340 +#: ../src/empathy-call-window.c:3121 msgid "Can't establish video stream" msgstr "Non é posíbel estabelecer un fluxo de vídeo" @@ -3877,8 +3889,8 @@ msgstr "Activar/desactivar transmisión de vídeo" #: ../src/empathy-call-window.ui.h:21 #: ../src/empathy-streamed-media-window.ui.h:18 -#: ../src/empathy-call-window.c:2591 ../src/empathy-call-window.c:2592 -#: ../src/empathy-call-window.c:2593 ../src/empathy-call-window.c:2594 +#: ../src/empathy-call-window.c:2581 ../src/empathy-call-window.c:2582 +#: ../src/empathy-call-window.c:2583 ../src/empathy-call-window.c:2584 msgid "Unknown" msgstr "Descoñecido" @@ -4057,7 +4069,7 @@ msgid "Incoming video call" msgstr "Chamada de vídeo entrante" # rever -#: ../src/empathy-event-manager.c:521 ../src/empathy-call-window.c:1563 +#: ../src/empathy-event-manager.c:521 ../src/empathy-call-window.c:1553 msgid "Incoming call" msgstr "Chamada entrante" @@ -4074,7 +4086,7 @@ msgid "%s is calling you. Do you want to answer?" msgstr "%s estao chamando. Quérelle responder?" #: ../src/empathy-event-manager.c:529 ../src/empathy-event-manager.c:730 -#: ../src/empathy-event-manager.c:763 ../src/empathy-call-window.c:1569 +#: ../src/empathy-event-manager.c:763 ../src/empathy-call-window.c:1559 #, c-format msgid "Incoming call from %s" msgstr "Chamada entrante de %s" @@ -4093,7 +4105,7 @@ msgid "_Answer with video" msgstr "_Responder con vídeo" #: ../src/empathy-event-manager.c:730 ../src/empathy-event-manager.c:763 -#: ../src/empathy-call-window.c:1569 +#: ../src/empathy-call-window.c:1559 #, c-format msgid "Incoming video call from %s" msgstr "Videochamada entrante de %s" @@ -4320,54 +4332,54 @@ msgid "Disconnect" msgstr "Desconectar" # rever -#: ../src/empathy-main-window.c:642 +#: ../src/empathy-main-window.c:638 msgid "No match found" msgstr "Non se atopou ningunha coincidencia." -#: ../src/empathy-main-window.c:750 +#: ../src/empathy-main-window.c:746 #, c-format msgid "Sorry, %s accounts can’t be used until your %s software is updated." msgstr "" "As contas de %s non se poden usar até que non teña actualizado o seu " "software %s." -#: ../src/empathy-main-window.c:818 +#: ../src/empathy-main-window.c:814 msgid "Update software..." msgstr "Actualizar software…" -#: ../src/empathy-main-window.c:824 ../src/empathy-main-window.c:949 +#: ../src/empathy-main-window.c:820 ../src/empathy-main-window.c:941 msgid "Close" msgstr "Pechar" -#: ../src/empathy-main-window.c:937 +#: ../src/empathy-main-window.c:929 msgid "Reconnect" msgstr "Reconectar" -#: ../src/empathy-main-window.c:943 +#: ../src/empathy-main-window.c:935 msgid "Edit Account" msgstr "Editar a conta" #. Translators: this string will be something like: #. * Top up My Account ($1.23)..." -#: ../src/empathy-main-window.c:1088 +#: ../src/empathy-main-window.c:1074 #, c-format msgid "Top up %s (%s)..." msgstr "Recargar %s (%s)…" -#: ../src/empathy-main-window.c:1135 +#: ../src/empathy-main-window.c:1121 msgid "Top up account credit" msgstr "Recargar o saldo da conta" #. top up button -#: ../src/empathy-main-window.c:1206 +#: ../src/empathy-main-window.c:1192 msgid "Top Up..." msgstr "Recargar…" -#: ../src/empathy-main-window.c:1949 +#: ../src/empathy-main-window.c:1935 msgid "Contact" msgstr "Contacto" -#: ../src/empathy-main-window.c:2324 +#: ../src/empathy-main-window.c:2310 msgid "Contact List" msgstr "Lista de contactos" @@ -4928,63 +4940,63 @@ msgstr "" "O xestor de conexión seleccionado non é compatíbel coa extensión de " "depuración remota." -#: ../src/empathy-invite-participant-dialog.c:179 -#: ../src/empathy-invite-participant-dialog.c:205 +#: ../src/empathy-invite-participant-dialog.c:197 +#: ../src/empathy-invite-participant-dialog.c:225 msgid "Invite Participant" msgstr "Invitar participante" -#: ../src/empathy-invite-participant-dialog.c:180 +#: ../src/empathy-invite-participant-dialog.c:198 msgid "Choose a contact to invite into the conversation:" msgstr "Seleccione o contacto que quere invitar á conversa:" -#: ../src/empathy-invite-participant-dialog.c:201 +#: ../src/empathy-invite-participant-dialog.c:221 msgid "Invite" msgstr "Invitar" -#: ../src/empathy-accounts.c:184 +#: ../src/empathy-accounts.c:183 msgid "Don't display any dialogs; do any work (eg, importing) and exit" msgstr "Non mostra ningún diálogo, fai algún traballo (p.ex. importar) e sae" -#: ../src/empathy-accounts.c:188 +#: ../src/empathy-accounts.c:187 msgid "" "Don't display any dialogs unless there are only \"People Nearby\" accounts" msgstr "" "Non mostrar ningún diálogo a non ser que só existan contas «Persoas próximas»" -#: ../src/empathy-accounts.c:192 +#: ../src/empathy-accounts.c:191 msgid "Initially select given account (eg, gabble/jabber/foo_40example_2eorg0)" msgstr "" "Conta fornecida seleccionada inicialmente (p.ex. gabble/jabber/" "foo_40exemplo_2eorg0)" -#: ../src/empathy-accounts.c:194 +#: ../src/empathy-accounts.c:193 msgid "<account-id>" msgstr "<account-id>" # rever -#: ../src/empathy-accounts.c:197 +#: ../src/empathy-accounts.c:196 msgid "Show account assistant" msgstr "Mostrar o asistente de contas" # rever -#: ../src/empathy-accounts.c:203 +#: ../src/empathy-accounts.c:202 msgid "- Empathy Accounts" msgstr "- Contas de Empathy" # rever -#: ../src/empathy-accounts.c:242 +#: ../src/empathy-accounts.c:238 msgid "Empathy Accounts" msgstr "Contas de Empathy" -#: ../src/empathy-debugger.c:70 +#: ../src/empathy-debugger.c:69 msgid "Show a particular service" msgstr "Mostrar un servizo en particular" -#: ../src/empathy-debugger.c:75 +#: ../src/empathy-debugger.c:74 msgid "- Empathy Debugger" msgstr "- Depurador de Empathy" -#: ../src/empathy-debugger.c:114 +#: ../src/empathy-debugger.c:113 msgid "Empathy Debugger" msgstr "Depurador de Empathy" @@ -4998,14 +5010,14 @@ msgid "Respond" msgstr "Responder" #: ../src/empathy-notifications-approver.c:217 -#: ../src/empathy-call-window.c:1573 +#: ../src/empathy-call-window.c:1563 msgid "Reject" msgstr "Rexeitar" # rever #: ../src/empathy-notifications-approver.c:222 #: ../src/empathy-notifications-approver.c:227 -#: ../src/empathy-call-window.c:1574 +#: ../src/empathy-call-window.c:1564 msgid "Answer" msgstr "Responder" @@ -5037,33 +5049,63 @@ msgstr "%s tentou chamarlle, pero vostede estaba noutra chamada." #. Translators: this is an "Info" label. It should be as short #. * as possible. -#: ../src/empathy-call-window.c:1183 ../src/empathy-call-window.c:1206 +#: ../src/empathy-call-window.c:1173 ../src/empathy-call-window.c:1196 msgid "i" msgstr "i" -#: ../src/empathy-call-window.c:2890 +#: ../src/empathy-call-window.c:2880 msgid "On hold" msgstr "En espera" -#: ../src/empathy-call-window.c:2893 +#: ../src/empathy-call-window.c:2883 msgid "Mute" msgstr "Silenciar" -#: ../src/empathy-call-window.c:2895 +#: ../src/empathy-call-window.c:2885 msgid "Duration" msgstr "Duración" # rever #. Translators: 'status - minutes:seconds' the caller has been connected -#: ../src/empathy-call-window.c:2898 +#: ../src/empathy-call-window.c:2888 #, c-format msgid "%s — %d:%02dm" msgstr "%s — %d:%02dm" +#: ../src/empathy-call-window.c:3158 +#, c-format +msgid "Your current balance is %s." +msgstr "O seu balance actual é %s." + +#: ../src/empathy-call-window.c:3162 +msgid "Sorry, you don’t have enough credit for that call." +msgstr "Non ten crédito dabondo para facer esta chamada." + +#: ../src/empathy-call-window.c:3164 +msgid "Top Up" +msgstr "Recargar" + #: ../libempathy-gtk/empathy-search-bar.c:243 msgid "_Match case" msgstr "_Coincidir con capitalización" +# rever +#~ msgid "Contact ID:" +#~ msgstr "ID do contacto:" + +#~ msgid "C_hat" +#~ msgstr "Con_versa" + +# rever +#~ msgid "Send _Video" +#~ msgstr "Enviar _Vídeo" + +#~ msgid "C_all" +#~ msgstr "Ch_amar" + +#~ msgid "Set your presence and current status" +#~ msgstr "Estabeleza a súa presenza e estado actual" + #~ msgid "Empathy has migrated butterfly logs" #~ msgstr "Empathy migrou os seus rexistros de butterfly" diff --git a/src/empathy-auth-client.c b/src/empathy-auth-client.c index b7988e07e..bb7446847 100644 --- a/src/empathy-auth-client.c +++ b/src/empathy-auth-client.c @@ -243,6 +243,8 @@ main (int argc, GError *error = NULL; EmpathyAuthFactory *factory; TpDebugSender *debug_sender; + TpSimpleClientFactory *tp_factory; + TpDBusDaemon *dbus; g_thread_init (NULL); @@ -276,7 +278,15 @@ main (int argc, g_log_set_default_handler (tp_debug_sender_log_handler, G_LOG_DOMAIN); #endif - factory = empathy_auth_factory_dup_singleton (); + dbus = tp_dbus_daemon_dup (NULL); + tp_factory = tp_simple_client_factory_new (dbus); + tp_simple_client_factory_add_account_features_varargs (tp_factory, + TP_ACCOUNT_FEATURE_STORAGE, + 0); + + factory = empathy_auth_factory_new (tp_factory); + g_object_unref (tp_factory); + g_object_unref (dbus); g_signal_connect (factory, "new-server-tls-handler", G_CALLBACK (auth_factory_new_tls_handler_cb), NULL); |