changeset 15718:1f7106b999d5

Use ~/.face (or ~/.face.icon) as the default avatar. GDM and KDM both use these. Daniel should make it use the default Windows icon too. Evan can probably do OS X if he wants.
author Sean Egan <seanegan@gmail.com>
date Mon, 26 Feb 2007 00:30:23 +0000
parents 72a63319582e
children 00c2896fb5f3 1e4f4e000c76
files pidgin/gtkaccount.c pidgin/pixmaps/tray/22/Makefile.am
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkaccount.c	Mon Feb 26 00:11:58 2007 +0000
+++ b/pidgin/gtkaccount.c	Mon Feb 26 00:30:23 2007 +0000
@@ -2563,11 +2563,23 @@
 void
 pidgin_account_init(void)
 {
+	char *default_avatar = NULL;
 	gaim_prefs_add_none("/gaim/gtk/accounts");
 	gaim_prefs_add_none("/gaim/gtk/accounts/dialog");
 	gaim_prefs_add_int("/gaim/gtk/accounts/dialog/width",  520);
 	gaim_prefs_add_int("/gaim/gtk/accounts/dialog/height", 321);
-	gaim_prefs_add_path("/gaim/gtk/accounts/buddyicon", NULL);
+	default_avatar = g_build_filename(g_get_home_dir(), ".face.icon", NULL);
+	if (!g_file_test(default_avatar, G_FILE_TEST_EXISTS)) {
+		g_free(default_avatar);
+		default_avatar = g_build_filename(g_get_home_dir(), ".face", NULL);
+		if (!g_file_test(default_avatar, G_FILE_TEST_EXISTS)) {
+			g_free(default_avatar);
+			default_avatar = NULL;
+		}
+	}
+		
+printf("AVATAR: %s\n", default_avatar);
+	gaim_prefs_add_path("/gaim/gtk/accounts/buddyicon", default_avatar);
 
 	gaim_signal_register(pidgin_account_get_handle(), "account-modified",
 						 gaim_marshal_VOID__POINTER, NULL, 1,
--- a/pidgin/pixmaps/tray/22/Makefile.am	Mon Feb 26 00:11:58 2007 +0000
+++ b/pidgin/pixmaps/tray/22/Makefile.am	Mon Feb 26 00:30:23 2007 +0000
@@ -14,5 +14,5 @@
 		tray-offline.ico \
 		tray-online.ico 
 
-pidgintraypixdir = $(datadir)/pixmaps/pidgin/tray/16
+pidgintraypixdir = $(datadir)/pixmaps/pidgin/tray/22
 pidgintraypix_DATA = $(TRAY_ICONS)