- if( person->firstName )
- gtk_entry_set_text(GTK_ENTRY(personeditdlg.entry_first), person->firstName );
- if( person->lastName )
- gtk_entry_set_text(GTK_ENTRY(personeditdlg.entry_last), person->lastName );
- if( person->nickName )
- gtk_entry_set_text(GTK_ENTRY(personeditdlg.entry_nick), person->nickName );
- edit_person_load_email( person );
- edit_person_load_attrib( person );
+ else
+ personeditdlg.picture = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 128, 128);
+ if( current_person->picture ) {
+ gchar *filename = g_strconcat( get_rc_dir(), G_DIR_SEPARATOR_S, ADDRBOOK_DIR, G_DIR_SEPARATOR_S,
+ current_person->picture, NULL );
+ personeditdlg.picture = gdk_pixbuf_new_from_file(filename, &error);
+ personeditdlg.picture_set = TRUE;
+ g_free(filename);
+ } else {
+ personeditdlg.picture_set = FALSE;
+ personeditdlg.picture = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 128, 128);
+ }
+ gtk_image_set_from_pixbuf(GTK_IMAGE(picture), personeditdlg.picture);
+
+ if( current_person->firstName )
+ gtk_entry_set_text(GTK_ENTRY(personeditdlg.entry_first), current_person->firstName );
+ if( current_person->lastName )
+ gtk_entry_set_text(GTK_ENTRY(personeditdlg.entry_last), current_person->lastName );
+ if( current_person->nickName )
+ gtk_entry_set_text(GTK_ENTRY(personeditdlg.entry_nick), current_person->nickName );
+ edit_person_load_email( current_person );
+ edit_person_load_attrib( current_person );