return priv->protocol;
}
-const gchar *
+gchar *
empathy_account_settings_get_icon_name (EmpathyAccountSettings *settings)
{
EmpathyAccountSettingsPriv *priv = GET_PRIV (settings);
if (priv->account != NULL)
- return empathy_account_get_icon_name (priv->account);
+ return g_strdup (empathy_account_get_icon_name (priv->account));
+
+ if (priv->tp_protocol != NULL)
+ return g_strdup_printf ("im-%s", priv->tp_protocol->name);
return NULL;
}
void empathy_account_settings_set_boolean (EmpathyAccountSettings *settings,
const gchar *param, gboolean value);
-const gchar *empathy_account_settings_get_icon_name (
+gchar *empathy_account_settings_get_icon_name (
EmpathyAccountSettings *settings);
const gchar *empathy_account_settings_get_display_name (
EmpathyAccountSettings *settings)
{
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
+ gchar *icon_name;
priv->settings_widget = get_account_setup_widget (settings);
priv->settings_widget);
gtk_widget_show (priv->settings_widget);
+ icon_name = empathy_account_settings_get_icon_name (settings);
gtk_image_set_from_icon_name (GTK_IMAGE (priv->image_type),
- empathy_account_settings_get_icon_name (settings),
- GTK_ICON_SIZE_DIALOG);
+ icon_name, GTK_ICON_SIZE_DIALOG);
gtk_widget_set_tooltip_text (priv->image_type,
empathy_account_settings_get_protocol (settings));
accounts_dialog_update_name_label (dialog, settings);
+
+ g_free (icon_name);
}
static void
EmpathyAccountsDialog *dialog)
{
EmpathyAccountSettings *settings;
- const gchar *icon_name;
+ gchar *icon_name;
GdkPixbuf *pixbuf;
TpConnectionStatus status;
EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
icon_name = empathy_account_settings_get_icon_name (settings);
pixbuf = empathy_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON);
+ g_free (icon_name);
+
if (pixbuf)
{
if (status == TP_CONNECTION_STATUS_DISCONNECTED ||