aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-01-08 19:38:01 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-01-08 19:38:01 +0800
commit5dd66017b88e4a0d248ff75e26f12c45a959a7fa (patch)
tree3c615b376a4c3cdda96b86b5b8ff1d15644b51f2
parent7fd0b32b8fb6ad3fe29c46ed2afe2bdd25d6687e (diff)
parentd95a09bded20a2cccf0847f4663fd075536399ca (diff)
downloadgsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.tar
gsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.tar.gz
gsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.tar.bz2
gsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.tar.lz
gsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.tar.xz
gsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.tar.zst
gsoc2013-empathy-5dd66017b88e4a0d248ff75e26f12c45a959a7fa.zip
Merge branch 'gnome-3-6'
-rw-r--r--libempathy/empathy-account-settings.c12
-rw-r--r--libempathy/empathy-tp-chat.c58
-rw-r--r--src/empathy-roster-window.c1
3 files changed, 55 insertions, 16 deletions
diff --git a/libempathy/empathy-account-settings.c b/libempathy/empathy-account-settings.c
index 8731479be..a0e42cc77 100644
--- a/libempathy/empathy-account-settings.c
+++ b/libempathy/empathy-account-settings.c
@@ -1327,6 +1327,12 @@ empathy_account_settings_account_updated (GObject *source,
goto out;
}
+ update_account_uri_schemes (settings);
+ update_account_service (settings);
+
+ g_simple_async_result_set_op_res_gboolean (priv->apply_result,
+ g_strv_length (reconnect_required) > 0);
+
/* Only set the password in the keyring if the CM supports SASL. */
if (priv->supports_sasl)
{
@@ -1348,12 +1354,6 @@ empathy_account_settings_account_updated (GObject *source,
return;
}
- update_account_uri_schemes (settings);
- update_account_service (settings);
-
- g_simple_async_result_set_op_res_gboolean (priv->apply_result,
- g_strv_length (reconnect_required) > 0);
-
out:
empathy_account_settings_discard_changes (settings);
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 4857243c1..42ab0836e 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1298,20 +1298,12 @@ password_feature_prepare_cb (GObject *source,
}
static void
-tp_chat_prepare_ready_async (TpProxy *proxy,
- const TpProxyFeature *feature,
- GAsyncReadyCallback callback,
- gpointer user_data)
+continue_preparing (EmpathyTpChat *self)
{
- EmpathyTpChat *self = (EmpathyTpChat *) proxy;
- TpChannel *channel = (TpChannel *) proxy;
+ TpChannel *channel = (TpChannel *) self;
TpConnection *connection;
gboolean listen_for_dbus_properties_changed = FALSE;
- g_assert (self->priv->ready_result == NULL);
- self->priv->ready_result = g_simple_async_result_new (G_OBJECT (self),
- callback, user_data, tp_chat_prepare_ready_async);
-
connection = tp_channel_get_connection (channel);
if (tp_proxy_has_interface_by_id (self,
@@ -1436,3 +1428,49 @@ tp_chat_prepare_ready_async (TpProxy *proxy,
G_OBJECT (self), NULL);
}
}
+
+static void
+conn_connected_cb (GObject *source,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ EmpathyTpChat *self = user_data;
+ GError *error = NULL;
+
+ if (!tp_proxy_prepare_finish (source, result, &error))
+ {
+ DEBUG ("Failed to prepare Connected: %s", error->message);
+ g_simple_async_result_take_error (self->priv->ready_result, error);
+ g_simple_async_result_complete (self->priv->ready_result);
+ tp_clear_object (&self->priv->ready_result);
+ return;
+ }
+
+ continue_preparing (self);
+}
+
+static void
+tp_chat_prepare_ready_async (TpProxy *proxy,
+ const TpProxyFeature *feature,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ EmpathyTpChat *self = (EmpathyTpChat *) proxy;
+ TpChannel *channel = (TpChannel *) proxy;
+ TpConnection *connection;
+ GQuark features[] = { TP_CONNECTION_FEATURE_CONNECTED, 0 };
+
+ g_assert (self->priv->ready_result == NULL);
+
+ self->priv->ready_result = g_simple_async_result_new (G_OBJECT (self),
+ callback, user_data, tp_chat_prepare_ready_async);
+
+ connection = tp_channel_get_connection (channel);
+
+ /* First we have to make sure that TP_CONNECTION_FEATURE_CONNECTED is
+ * prepared as we rely on TpConnection::self-contact
+ * in continue_preparing().
+ *
+ * It would be nice if tp-glib could do this for us: fdo#59126 */
+ tp_proxy_prepare_async (connection, features, conn_connected_cb, proxy);
+}
diff --git a/src/empathy-roster-window.c b/src/empathy-roster-window.c
index a92b945f9..38adf45fa 100644
--- a/src/empathy-roster-window.c
+++ b/src/empathy-roster-window.c
@@ -611,6 +611,7 @@ roster_window_error_create_info_bar (EmpathyRosterWindow *self,
label = gtk_label_new (message_markup);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
+ gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
gtk_widget_show (label);