[empathy/gnome-2-30] use avatar-default instead of the deprecated stock_person icon



commit b87a2f274a838e8636c64605506e6ba243c2671a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date:   Thu May 20 17:10:20 2010 +0200

    use avatar-default instead of the deprecated stock_person icon

 libempathy-gtk/empathy-avatar-chooser.c |    4 +++-
 libempathy-gtk/empathy-images.h         |    1 +
 libempathy-gtk/empathy-theme-adium.c    |    3 ++-
 src/empathy-call-window.c               |    5 +++--
 src/empathy-call-window.ui              |    2 +-
 src/empathy-event-manager.c             |    4 ++--
 6 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/libempathy-gtk/empathy-avatar-chooser.c b/libempathy-gtk/empathy-avatar-chooser.c
index 9c79eb8..bd2f409 100644
--- a/libempathy-gtk/empathy-avatar-chooser.c
+++ b/libempathy-gtk/empathy-avatar-chooser.c
@@ -34,6 +34,7 @@
 
 #include "empathy-avatar-chooser.h"
 #include "empathy-conf.h"
+#include "empathy-images.h"
 #include "empathy-ui-utils.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
@@ -571,7 +572,8 @@ avatar_chooser_clear_image (EmpathyAvatarChooser *chooser)
 		priv->avatar = NULL;
 	}
 
-	image = gtk_image_new_from_icon_name ("stock_person", GTK_ICON_SIZE_DIALOG);
+	image = gtk_image_new_from_icon_name (EMPATHY_IMAGE_AVATAR_DEFAULT,
+		GTK_ICON_SIZE_DIALOG);
 	gtk_button_set_image (GTK_BUTTON (chooser), image);
 	g_signal_emit (chooser, signals[CHANGED], 0);
 }
diff --git a/libempathy-gtk/empathy-images.h b/libempathy-gtk/empathy-images.h
index c714f04..c2d7f76 100644
--- a/libempathy-gtk/empathy-images.h
+++ b/libempathy-gtk/empathy-images.h
@@ -41,6 +41,7 @@ G_BEGIN_DECLS
 #define EMPATHY_IMAGE_VIDEO_CALL          "camera-web"
 #define EMPATHY_IMAGE_LOG                 "document-open-recent"
 #define EMPATHY_IMAGE_DOCUMENT_SEND       "document-send"
+#define EMPATHY_IMAGE_AVATAR_DEFAULT      "avatar-default"
 
 G_END_DECLS
 
diff --git a/libempathy-gtk/empathy-theme-adium.c b/libempathy-gtk/empathy-theme-adium.c
index 7736be2..ad174ce 100644
--- a/libempathy-gtk/empathy-theme-adium.c
+++ b/libempathy-gtk/empathy-theme-adium.c
@@ -41,6 +41,7 @@
 #include "empathy-ui-utils.h"
 #include "empathy-plist.h"
 #include "empathy-string-parser.h"
+#include "empathy-images.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CHAT
 #include <libempathy/empathy-debug.h>
@@ -491,7 +492,7 @@ theme_adium_append_message (EmpathyChatView *view,
 		if (!avatar_filename) {
 			if (!priv->data->default_avatar_filename) {
 				priv->data->default_avatar_filename =
-					empathy_filename_from_icon_name ("stock_person",
+					empathy_filename_from_icon_name (EMPATHY_IMAGE_AVATAR_DEFAULT,
 									 GTK_ICON_SIZE_DIALOG);
 			}
 			avatar_filename = priv->data->default_avatar_filename;
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 60404f3..2e01c51 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -44,6 +44,7 @@
 #include <libempathy-gtk/empathy-ui-utils.h>
 #include <libempathy-gtk/empathy-sound.h>
 #include <libempathy-gtk/empathy-geometry.h>
+#include <libempathy-gtk/empathy-images.h>
 
 #define DEBUG_FLAG EMPATHY_DEBUG_VOIP
 #include <libempathy/empathy-debug.h>
@@ -1106,8 +1107,8 @@ init_contact_avatar_with_size (EmpathyContact *contact,
 
   if (pixbuf_avatar == NULL)
     {
-      pixbuf_avatar = empathy_pixbuf_from_icon_name_sized ("stock_person",
-          size);
+      pixbuf_avatar = empathy_pixbuf_from_icon_name_sized (
+          EMPATHY_IMAGE_AVATAR_DEFAULT, size);
     }
 
   gtk_image_set_from_pixbuf (GTK_IMAGE (image_widget), pixbuf_avatar);
diff --git a/src/empathy-call-window.ui b/src/empathy-call-window.ui
index 8837b78..0c0156d 100644
--- a/src/empathy-call-window.ui
+++ b/src/empathy-call-window.ui
@@ -177,7 +177,7 @@
               <object class="GtkToggleToolButton" id="camera_preview">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">Preview</property>
-                <property name="icon_name">stock_person</property>
+                <property name="icon_name">avatar-default</property>
                 <property name="sensitive">True</property>
                 <property name="tooltip_text" translatable="yes">Enable camera but don't send video</property>
               </object>
diff --git a/src/empathy-event-manager.c b/src/empathy-event-manager.c
index c4ab4ad..4a59a16 100644
--- a/src/empathy-event-manager.c
+++ b/src/empathy-event-manager.c
@@ -863,7 +863,7 @@ event_manager_presence_changed_cb (EmpathyContactMonitor *monitor,
             empathy_contact_get_name (contact));
 
           event_manager_add (manager, contact, EMPATHY_EVENT_TYPE_PRESENCE,
-              "stock_person", header, NULL, NULL, NULL, NULL);
+              EMPATHY_IMAGE_AVATAR_DEFAULT, header, NULL, NULL, NULL, NULL);
         }
     }
   else
@@ -879,7 +879,7 @@ event_manager_presence_changed_cb (EmpathyContactMonitor *monitor,
             empathy_contact_get_name (contact));
 
           event_manager_add (manager, contact, EMPATHY_EVENT_TYPE_PRESENCE,
-              "stock_person", header, NULL, NULL, NULL, NULL);
+              EMPATHY_IMAGE_AVATAR_DEFAULT, header, NULL, NULL, NULL, NULL);
         }
     }
   g_free (header);



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