[empathy] empathy_account_widget_get_default_display_name: use the network name (#598394)
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] empathy_account_widget_get_default_display_name: use the network name (#598394)
- Date: Thu, 2 Sep 2010 10:00:29 +0000 (UTC)
commit a92e47dd31f74bcbbf50d6c2285b7d82bf82c4be
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Tue Aug 31 10:23:43 2010 +0200
empathy_account_widget_get_default_display_name: use the network name (#598394)
libempathy-gtk/empathy-account-widget.c | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/libempathy-gtk/empathy-account-widget.c b/libempathy-gtk/empathy-account-widget.c
index 28a2fd3..d3cf1f3 100644
--- a/libempathy-gtk/empathy-account-widget.c
+++ b/libempathy-gtk/empathy-account-widget.c
@@ -88,6 +88,9 @@ typedef struct {
GtkWidget *param_account_widget;
GtkWidget *param_password_widget;
+ /* Used only for IRC accounts */
+ EmpathyIrcNetworkChooser *irc_network_chooser;
+
gboolean dispose_run;
} EmpathyAccountWidgetPriv;
@@ -904,12 +907,13 @@ account_widget_build_irc (EmpathyAccountWidget *self,
if (priv->simple)
{
- empathy_account_widget_irc_build_simple (self, filename);
+ priv->irc_network_chooser = empathy_account_widget_irc_build_simple (self,
+ filename);
}
else
{
- empathy_account_widget_irc_build (self, filename,
- &priv->table_common_settings);
+ priv->irc_network_chooser = empathy_account_widget_irc_build (self,
+ filename, &priv->table_common_settings);
}
}
@@ -2016,17 +2020,19 @@ empathy_account_widget_get_default_display_name (EmpathyAccountWidget *self)
/* TODO: this should be done in empathy-account-widget-irc */
if (!tp_strdiff (protocol, "irc"))
{
- const gchar* server;
- server = empathy_account_settings_get_string (priv->settings,
- "server");
+ EmpathyIrcNetwork *network;
+
+ network = empathy_irc_network_chooser_get_network (
+ priv->irc_network_chooser);
+ g_assert (network != NULL);
/* To translators: The first parameter is the login id and the
- * second one is the server. The resulting string will be something
- * like: "MyUserName on chat.freenode.net".
+ * second one is the network. The resulting string will be something
+ * like: "MyUserName on freenode".
* You should reverse the order of these arguments if the
* server should come before the login id in your locale.*/
default_display_name = g_strdup_printf (_("%1$s on %2$s"),
- login_id, server);
+ login_id, empathy_irc_network_get_name (network));
}
else if (account_widget_is_facebook (self))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]