@@ -119,14 +119,16 @@ class Ricin.ChatView : Gtk.Box {
119119
120120 var _avatar_path = Tox . profile_dir () + " avatars/" + this . fr. pubkey + " .png" ;
121121 if (FileUtils . test (_avatar_path, FileTest . EXISTS )) {
122- var pixbuf = new Gdk .Pixbuf .from_file_at_scale (_avatar_path, 48 , 48 , false );
123- this . user_avatar. pixbuf = pixbuf;
122+ var pixbuf_scaled = new Gdk .Pixbuf .from_file_at_scale (_avatar_path, 48 , 48 , false );
123+ var pixbuf = new Gdk .Pixbuf .from_file_at_scale (_avatar_path, 128 , 128 , false );
124+
125+ this . user_avatar. pixbuf = pixbuf_scaled;
124126 this . friend_profil_avatar. pixbuf = pixbuf;
125127 } else {
126128 Cairo . Surface surface = Util . identicon_for_pubkey (this . fr. pubkey);
127- var pixbuf = Gdk . pixbuf_get_from_surface (surface, 0 , 0 , 48 , 48 );
128- this . user_avatar. pixbuf = pixbuf ;
129- this . friend_profil_avatar. pixbuf = pixbuf ;
129+ var pixbuf_scaled = Gdk . pixbuf_get_from_surface (surface, 0 , 0 , 48 , 48 );
130+ this . user_avatar. pixbuf = pixbuf_scaled ;
131+ this . friend_profil_avatar. pixbuf = Util . pubkey_to_image( this . fr . pubkey, 128 , 128 ) ;
130132 }
131133
132134 this . entry. key_press_event. connect ((event) = > {
@@ -223,7 +225,8 @@ class Ricin.ChatView : Gtk.Box {
223225
224226 fr. avatar. connect (p = > {
225227 this . user_avatar. pixbuf = p;
226- this . friend_profil_avatar. pixbuf = p;
228+ // this.friend_profil_avatar.pixbuf = p;
229+ this . friend_profil_avatar. pixbuf = Util . pubkey_to_image(this . fr. pubkey, 128 , 128 );
227230
228231 this . label_friend_last_seen. set_markup (this . fr. last_online (" %H :%M %d /%m /%Y " ));
229232 });
@@ -245,7 +248,7 @@ class Ricin.ChatView : Gtk.Box {
245248 }
246249 } else {
247250 if (this . handle. status != Tox . UserStatus . BUSY ) {
248- Notification . notify (this . fr. name, message, 5000 );
251+ Notification . notify (this . fr. name, message, 5000 , Util . pubkey_to_image ( this . fr . pubkey, 46 , 46 ) );
249252 }
250253 }
251254 }
@@ -281,7 +284,7 @@ class Ricin.ChatView : Gtk.Box {
281284 }
282285 } else {
283286 if (this . handle. status != Tox . UserStatus . BUSY ) {
284- Notification . notify (fr. name, message, 5000 );
287+ Notification . notify (fr. name, message, 5000 , Util . pubkey_to_image ( this . fr . pubkey, 46 , 46 ) );
285288 }
286289 }
287290
0 commit comments