some qol stuff

This commit is contained in:
2026-05-10 14:46:19 +01:00
parent 1aa14f9fd5
commit 98cd855349
8 changed files with 66 additions and 6 deletions
+17
View File
@@ -136,9 +136,11 @@ func switchToTab(jid string, w *gtk.Window) {
u.Get(&ocu)
if mu.MucUserItem.Role == "moderator" {
gen.Prepend(gtk.NewSeparator(gtk.OrientationHorizontal))
gen.Prepend(userbox)
} else {
gen.Append(userbox)
gen.Append(gtk.NewSeparator(gtk.OrientationHorizontal))
}
//id := ocu.ID
@@ -147,6 +149,10 @@ func switchToTab(jid string, w *gtk.Window) {
//}
nick_label := gtk.NewLabel(JidMustParse(u.From).Resource)
custom_nick, ok := loadedConfig.CustomNicks[ocu.ID]
if ok {
nick_label.SetText(custom_nick)
}
nick_label.SetEllipsize(pango.EllipsizeEnd)
nick_label.AddCSSClass(mu.MucUserItem.Role)
if mu.MucUserItem.Role == "visitor" {
@@ -366,6 +372,10 @@ func switchToTab(jid string, w *gtk.Window) {
win.SetDefaultSize(400, 400)
profile_box := gtk.NewBox(gtk.OrientationVertical, 0)
nick := gtk.NewLabel(JidMustParse(u.From).Resource)
if custom_nick != "" {
nick.SetText(custom_nick)
}
ver_text := gtk.NewLabel(loadedLocale["gettingVersion"])
ver_text.AddCSSClass("visitor")
@@ -418,6 +428,13 @@ func switchToTab(jid string, w *gtk.Window) {
profile_box.Append(gtk.NewLabel(loadedLocale["affiliatedAs"] + mu.MucUserItem.Affiliation))
}
if ocu.ID != "" {
ocu_label := gtk.NewLabel(ocu.ID)
ocu_label.AddCSSClass("jid")
ocu_label.SetSelectable(true)
profile_box.Append(ocu_label)
}
go func() {
myIQ, err := stanza.NewIQ(stanza.Attrs{