This commit is contained in:
2026-08-16 20:07:53 +01:00
parent eebb6906c6
commit 58ae55e061
16 changed files with 369 additions and 171 deletions
+9 -8
View File
@@ -257,14 +257,14 @@ func createTab(jid string, isMuc bool, name string) bool {
if !ok && !uok && !mok {
newTab := new(chatTab)
newTab.isMuc = isMuc
newTab.msgs = gtk.NewListBox()
glib.IdleAdd(func() {
newTab.msgs = gtk.NewListBox()
newTab.msgs.SetVExpand(true)
newTab.msgs.SetShowSeparators(true)
// newTab.msgs.Append(gtk.NewButtonWithLabel(loadedLocale["getPastMessages"]))
})
newTab.name = name
newTab.msg_refsID = make(map[string]*abMessage)
tabs.Store(jid, newTab)
return true
}
@@ -646,15 +646,14 @@ func switchToTab(jid string, w *gtk.Window) {
muc_presence := typed_tab.muc_presence
muci := gtk.NewImage()
muci.SetPixelSize(80)
gen.Prepend(muci)
createIdenticon(jid, true, muci)
if muc_presence != nil {
vc := &VCardUpdate{}
ok = muc_presence.Get(vc)
if ok {
getAvatar(jid, vc.Photo, muci)
muci.SetPixelSize(80)
gen.Prepend(muci)
go getAvatar(jid, vc.Photo, muci)
}
}
@@ -723,8 +722,10 @@ func createIdenticon(word string, always_create bool, i *gtk.Image) { // This fu
return i
*/
i.SetFromPaintable(gt)
i.AddCSSClass(loadedConfig.CVD.String() + "_CVD")
glib.IdleAdd(func() {
i.SetFromPaintable(gt)
i.AddCSSClass(loadedConfig.CVD.String() + "_CVD")
})
}
func jidBuilder(en *gtk.Entry) { // This function spawns a window that allows the user to interactively build a JID