diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2009-07-31 17:44:35 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2009-07-31 17:46:42 +0800 |
commit | 0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d (patch) | |
tree | f942e691af02f8429f4c45b3c8310372b24e0a55 /src | |
parent | 8d2d494e21dd76251ce3fff3301bf007eb514f53 (diff) | |
download | gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.gz gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.bz2 gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.lz gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.xz gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.tar.zst gsoc2013-empathy-0279ad1b9504f81dbe6773eab9fdbd6ffdbfca3d.zip |
Make protocol icons work also with account == NULL
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-accounts-dialog.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 7a9dffb79..974b6dcc4 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -175,6 +175,7 @@ account_dialog_create_settings_widget (EmpathyAccountsDialog *dialog, EmpathyAccountSettings *settings) { EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); + gchar *icon_name; priv->settings_widget = get_account_setup_widget (settings); @@ -182,14 +183,16 @@ account_dialog_create_settings_widget (EmpathyAccountsDialog *dialog, 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 @@ -379,7 +382,7 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column, EmpathyAccountsDialog *dialog) { EmpathyAccountSettings *settings; - const gchar *icon_name; + gchar *icon_name; GdkPixbuf *pixbuf; TpConnectionStatus status; EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog); @@ -392,6 +395,8 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column, 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 || |