add Destroy room button, show error notification on presence error and show disabled lambda icon when not focused on any chat
This commit is contained in:
@@ -65,10 +65,11 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
if m.Error.Type != "" {
|
||||
error_box := gtk.NewBox(gtk.OrientationHorizontal, 0)
|
||||
cancel_img := gtk.NewImageFromPaintable(clientAssets["cancel"])
|
||||
error_label := gtk.NewLabel(m.Error.Text)
|
||||
error_label := gtk.NewLabel(m.Error.Text+ ": ")
|
||||
|
||||
error_box.Append(cancel_img)
|
||||
error_box.Append(error_label)
|
||||
error_box.Append(gtk.NewLabel(m.Error.Reason))
|
||||
return error_box
|
||||
}
|
||||
|
||||
@@ -148,6 +149,7 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
|
||||
al := gtk.NewLabel(jid.MustParse(m.From).Resourcepart())
|
||||
al.AddCSSClass("author")
|
||||
al.SetSelectable(true)
|
||||
|
||||
if m.Type == stanza.MessageTypeGroupchat {
|
||||
mo, _ := mucmembers.Load(jid.MustParse(m.From).Bare().String())
|
||||
@@ -215,6 +217,15 @@ func generateMessageWidget(p stanza.Packet) gtk.Widgetter {
|
||||
authorBox.Append(mbtn)
|
||||
}
|
||||
|
||||
if m.Subject != "" {
|
||||
subjectlabel := gtk.NewLabel(m.Subject)
|
||||
subjectlabel.SetWrap(true)
|
||||
subjectlabel.SetSelectable(true)
|
||||
subjectlabel.SetHAlign(gtk.AlignFill)
|
||||
subjectlabel.AddCSSClass("subject")
|
||||
mainBox.Append(subjectlabel)
|
||||
}
|
||||
|
||||
return mainBox
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user