peanits... hehe

This commit is contained in:
2026-08-06 07:53:46 +01:00
parent 546234eacf
commit 74f5761e06
3 changed files with 51 additions and 3 deletions
+23 -2
View File
@@ -11,6 +11,7 @@ import (
"github.com/diamondburned/gotk4/pkg/glib/v2" "github.com/diamondburned/gotk4/pkg/glib/v2"
"github.com/diamondburned/gotk4/pkg/gtk/v4" "github.com/diamondburned/gotk4/pkg/gtk/v4"
"github.com/diamondburned/gotk4/pkg/pango" "github.com/diamondburned/gotk4/pkg/pango"
"github.com/google/uuid"
"github.com/rrivera/identicon" "github.com/rrivera/identicon"
"gosrc.io/xmpp/stanza" "gosrc.io/xmpp/stanza"
"image" "image"
@@ -53,6 +54,18 @@ func showUserWindow(u stanza.Presence, custom_nick string) {
profile_box.Append(status_message) profile_box.Append(status_message)
} }
if u.Show != "" {
show := string(u.Show)
show_label := gtk.NewLabel(show)
friendlyShow, ok := loadedLocale[show]
if ok {
show_label.SetText(friendlyShow)
show_label.AddCSSClass(show)
}
profile_box.Append(show_label)
}
if loadedConfig.BlockingOI[ocu.ID] { if loadedConfig.BlockingOI[ocu.ID] {
blocked_note := gtk.NewLabel("You have blocked this user!") blocked_note := gtk.NewLabel("You have blocked this user!")
blocked_note.AddCSSClass("blocked") blocked_note.AddCSSClass("blocked")
@@ -69,7 +82,7 @@ func showUserWindow(u stanza.Presence, custom_nick string) {
Type: "get", Type: "get",
From: clientroot.Session.BindJid, From: clientroot.Session.BindJid,
To: u.From, To: u.From,
Id: "vc2", Id: uuid.New().String(),
Lang: "en", Lang: "en",
}) })
@@ -122,7 +135,7 @@ func showUserWindow(u stanza.Presence, custom_nick string) {
Type: "get", Type: "get",
From: clientroot.Session.BindJid, From: clientroot.Session.BindJid,
To: u.From, To: u.From,
Id: "dicks", Id: uuid.New().String(),
Lang: "en", Lang: "en",
}) })
@@ -302,6 +315,10 @@ func switchToTab(jid string, w *gtk.Window) {
failed_icon := gtk.NewImageFromPaintable(clientAssetsLoad("fail")) failed_icon := gtk.NewImageFromPaintable(clientAssetsLoad("fail"))
failed_icon.SetPixelSize(100) failed_icon.SetPixelSize(100)
box.Append(failed_icon) box.Append(failed_icon)
jid_label := gtk.NewLabel(jid)
jid_label.AddCSSClass("author")
jid_label.AddCSSClass("jid")
box.Append(jid_label)
label := gtk.NewLabel("There was an error loading the members of this room. Maybe the MUC does not give user presence, it does not exist, you have been banned from it, or you have to fill a CAPTCHA to access it. Try joining the room again or check if the room exists.") label := gtk.NewLabel("There was an error loading the members of this room. Maybe the MUC does not give user presence, it does not exist, you have been banned from it, or you have to fill a CAPTCHA to access it. Try joining the room again or check if the room exists.")
label.SetWrap(true) label.SetWrap(true)
box.Append(label) box.Append(label)
@@ -314,6 +331,10 @@ func switchToTab(jid string, w *gtk.Window) {
failed_icon := gtk.NewImageFromPaintable(clientAssetsLoad("fail")) failed_icon := gtk.NewImageFromPaintable(clientAssetsLoad("fail"))
failed_icon.SetPixelSize(100) failed_icon.SetPixelSize(100)
box.Append(failed_icon) box.Append(failed_icon)
jid_label := gtk.NewLabel(jid)
jid_label.AddCSSClass("author")
jid_label.AddCSSClass("jid")
box.Append(jid_label)
label := gtk.NewLabel("There was an error loading the members of this room. Maybe the MUC does not give user presence, it does not exist, you have been banned from it, or you have to fill a CAPTCHA to access it. Try joining the room again or check if the room exists.") label := gtk.NewLabel("There was an error loading the members of this room. Maybe the MUC does not give user presence, it does not exist, you have been banned from it, or you have to fill a CAPTCHA to access it. Try joining the room again or check if the room exists.")
label.SetWrap(true) label.SetWrap(true)
box.Append(label) box.Append(label)
+6 -1
View File
@@ -94,10 +94,15 @@ var enGB = map[string]string{ // British English
"versionQueryEmpty": "Client responded with empty version", "versionQueryEmpty": "Client responded with empty version",
"versionQueryError": "Got error trying to get version", "versionQueryError": "Got error trying to get version",
"away": "Away",
"chat": "Free for chat",
"xa": "Extended Away",
"dnd": "Do not disturb",
// gtk-signin.go // gtk-signin.go
"SIServerLabel": "Server: ", "SIServerLabel": "Server: ",
"SIUsernameLabel": "Username: ", "SIUsernameLabel": "JID: ",
"SIPasswordLabel": "Password: ", "SIPasswordLabel": "Password: ",
"SINicknameLabel": "Nickname: ", "SINicknameLabel": "Nickname: ",
"SIInsecureLabel": "Insecure: (?)", "SIInsecureLabel": "Insecure: (?)",
+22
View File
@@ -90,3 +90,25 @@
background-color: orange; background-color: orange;
color: black; color: black;
} }
.away {
color: orange;
font-style: italic;
}
.xa {
opacity: 50%;
font-style: italic;
text-decoration: underline;
}
.dnd {
font-style: bold;
color: red;
}
.chat {
font-style: bold;
text-decoration: underline;
color: green;
}