[empathy/gnome-2-28] Don't show the "missing" image (#595921).



commit 72a226c81a8940e776e6f707f6816b4a56e6b65b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Sep 23 18:10:43 2009 +0200

    Don't show the "missing" image (#595921).
    
    If the icon theme doesn't have the protocol icon for the account we
    currently selected, show a default icon.

 src/empathy-accounts-dialog.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index e10f722..e57c803 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -302,11 +302,19 @@ account_dialog_create_settings_widget (EmpathyAccountsDialog *dialog,
 
   icon_name = empathy_account_settings_get_icon_name (settings);
 
+  if (!gtk_icon_theme_has_icon (gtk_icon_theme_get_default (),
+          icon_name))
+    /* show the default icon; keep this in sync with the default
+     * one in empathy-accounts-dialog.ui.
+     */
+    icon_name = GTK_STOCK_CUT;
+
   gtk_image_set_from_icon_name (GTK_IMAGE (priv->image_type),
       icon_name, GTK_ICON_SIZE_DIALOG);
   gtk_widget_set_tooltip_text (priv->image_type,
       empathy_protocol_name_to_display_name
       (empathy_account_settings_get_protocol (settings)));
+  gtk_widget_show (priv->image_type);
 
   accounts_dialog_update_name_label (dialog,
       empathy_account_settings_get_display_name (settings));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]