fix ava, packaging on non-debian systems

This commit is contained in:
Er2 2021-11-08 11:04:55 +03:00
parent a35225c050
commit 63e278d697
4 changed files with 8 additions and 8 deletions

View File

@ -12,11 +12,11 @@ base:
ninja -C build install
tar: base
tar -C $(BDIR) -cvzf dist/$(NAME).tar.gz --xform s:'./':: ./
tar -C $(BDIR) -cvzf dist/$(NAME).tar.gz ./
deb: base
cp -r DEBIAN/ $(BDIR)
dpkg-deb -b $(BDIR) dist/$(NAME).deb
@dpkg-deb -b $(BDIR) dist/$(NAME).deb
clean:
rm -rf build $(BDIR)

View File

@ -5,9 +5,9 @@
namespace Er2Cord {
class User {
public Avatar ava;
public Cairo.ImageSurface ava;
public string name;
public int discr;
public int discr;
public static double[] getColors(int k) {
switch(k) {
@ -34,8 +34,8 @@ namespace Er2Cord {
this.discr = discr;
if(ava == null)
this.ava = new Avatar.gen(name, color);
else this.ava = ava;
this.ava = new Avatar.gen(name, color).ava;
else this.ava = ava.ava;
}
}
}

View File

@ -35,7 +35,7 @@ namespace Er2Cord {
main.column_spacing = 2;
main.attach(chat.scr, 2, 0);
main.attach(chat.user.ava, 0, 1);
main.attach(new Avatar(chat.user.ava), 0, 1);
main.attach(new Label(chat.user.name), 1, 1);
text = new Entry();

View File

@ -43,7 +43,7 @@ namespace Er2Cord {
var nick = new Label(@"<b>$(msg.user.name)</b>");
var date = new Label(msg.date);
nick.use_markup = true;
attach(msg.user.ava, 0, 1);
attach(new Avatar(msg.user.ava), 0, 1);
attach(nick, 1, 1);
attach(date, 2, 1);
}