gnome-control-center r8669 - trunk/capplets/about-me



Author: jensg
Date: Fri Apr 25 17:48:11 2008
New Revision: 8669
URL: http://svn.gnome.org/viewvc/gnome-control-center?rev=8669&view=rev

Log:
2008-04-25  Jens Granseuer  <jensgr gmx net>

	* gnome-about-me.c: (about_me_load_photo), (about_me_setup_dialog):
	properly handle errors when trying to get an icon for the user


Modified:
   trunk/capplets/about-me/ChangeLog
   trunk/capplets/about-me/gnome-about-me.c

Modified: trunk/capplets/about-me/gnome-about-me.c
==============================================================================
--- trunk/capplets/about-me/gnome-about-me.c	(original)
+++ trunk/capplets/about-me/gnome-about-me.c	Fri Apr 25 17:48:11 2008
@@ -517,7 +517,8 @@
 
 	widget = WID ("image-chooser");
 
-	e_image_chooser_set_from_file (E_IMAGE_CHOOSER (widget), me->person);
+	if (me->person)
+		e_image_chooser_set_from_file (E_IMAGE_CHOOSER (widget), me->person);
 
 	photo = e_contact_get (contact, E_CONTACT_PHOTO);
 
@@ -894,10 +895,10 @@
 	me->theme = gtk_icon_theme_get_for_screen (me->screen);
 
 	icon = gtk_icon_theme_lookup_icon (me->theme, "stock_person", 80, 0);
-
-	me->person = g_strdup (gtk_icon_info_get_filename (icon));
-
-	gtk_icon_info_free (icon);
+	if (icon != NULL) {
+		me->person = g_strdup (gtk_icon_info_get_filename (icon));
+		gtk_icon_info_free (icon);
+	}
 
 	g_signal_connect_object (me->theme, "changed",
 				 G_CALLBACK (about_me_icon_theme_changed),



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