Add affiliation medals
This commit is contained in:
@@ -33,9 +33,9 @@ func generatePresenceWidget(p stanza.Packet) gtk.Widgetter {
|
||||
}
|
||||
}
|
||||
|
||||
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " left the room")
|
||||
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " left the MUC")
|
||||
} else {
|
||||
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " joined the room")
|
||||
return gtk.NewLabel(jid.MustParse(presence.From).Resourcepart() + " joined the MUC")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
readmarker := Marker{}
|
||||
ok = m.Get(&readmarker)
|
||||
if ok {
|
||||
return nil
|
||||
return gtk.NewLabel(fmt.Sprintf("%s has read to this point", JidMustParse(m.From).Resource))
|
||||
}
|
||||
|
||||
|
||||
@@ -151,13 +151,13 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
im.AddCSSClass("author_img")
|
||||
authorBox.Append(im)
|
||||
} else {
|
||||
im := newImageFromPath("debug.png")
|
||||
im := gtk.NewImageFromPaintable(clientAssets["DefaultAvatar"])
|
||||
im.SetPixelSize(40)
|
||||
im.AddCSSClass("author_img")
|
||||
authorBox.Append(im)
|
||||
}
|
||||
} else {
|
||||
im := newImageFromPath("debug.png")
|
||||
im := gtk.NewImageFromPaintable(clientAssets["DefaultAvatar"])
|
||||
im.SetPixelSize(40)
|
||||
im.AddCSSClass("author_img")
|
||||
authorBox.Append(im)
|
||||
@@ -206,12 +206,12 @@ func getVAdjustment(scrolledWindow *gtk.ScrolledWindow) *gtk.Adjustment {
|
||||
func getAvatar(j, hash string) *gtk.Image { // TODO: This function probably shouldn't be here, and should probably be in xmpp-helpers or somewhere similar.
|
||||
p, err := ensureCache()
|
||||
if err != nil {
|
||||
return newImageFromPath("debug.png")
|
||||
return gtk.NewImageFromPaintable(clientAssets["DefaultAvatar"])
|
||||
}
|
||||
|
||||
if hash == "" {
|
||||
fmt.Println("Hash is nil!")
|
||||
return newImageFromPath("debug.png")
|
||||
return gtk.NewImageFromPaintable(clientAssets["DefaultAvatar"])
|
||||
}
|
||||
|
||||
hash = filepath.Join(p, sanitizefilename.Sanitize(hash))
|
||||
@@ -243,12 +243,12 @@ func getAvatar(j, hash string) *gtk.Image { // TODO: This function probably shou
|
||||
result := <-mychan
|
||||
card, ok := result.Payload.(*VCard)
|
||||
if !ok {
|
||||
return newImageFromPath("debug.png")
|
||||
return gtk.NewImageFromPaintable(clientAssets["DefaultAvatar"])
|
||||
}
|
||||
|
||||
base64_data := card.Photo.Binval
|
||||
if card.Photo.Binval == "" || (card.Photo.Type == "image/svg+xml" && runtime.GOOS == "windows") {
|
||||
return newImageFromPath("debug.png")
|
||||
return gtk.NewImageFromPaintable(clientAssets["DefaultAvatar"])
|
||||
}
|
||||
|
||||
data, err := base64.StdEncoding.DecodeString(base64_data)
|
||||
|
||||
Reference in New Issue
Block a user