Daniel Brötzmann pushed to branch contactpopover at gajim / gajim


Commits:
f3dba142 by wurstsalat at 2025-08-30T17:11:39+02:00
fix note to self name; disable button for MUCs

- - - - -


4 changed files:

- gajim/data/gui/chat_banner.ui
- gajim/data/style/gajim.css
- gajim/gtk/chat_banner.py
- gajim/gtk/contact_popover.py


Changes:

=====================================
gajim/data/gui/chat_banner.ui
=====================================
@@ -67,6 +67,7 @@
           <object class="GtkMenuButton" id="_avatar_button">
             <style>
               <class name="flat"/>
+              <class name="avatar-button"/>
             </style>
             <child>
               <object class="GtkImage" id="_avatar_image" />


=====================================
gajim/data/style/gajim.css
=====================================
@@ -507,6 +507,11 @@ .search-view-header label {
     color: alpha(var(--view-fg-color), 0.7);
 }
 
+/* Banner */
+.avatar-button * {
+    filter: none;
+}
+
 /* MessageActionsBox */
 .message-actions-box { margin: 2px 13px 8px 8px; }
 .message-actions-box > box > box > button:not(:hover),


=====================================
gajim/gtk/chat_banner.py
=====================================
@@ -123,6 +123,7 @@ def switch_contact(self, contact: types.ChatContactT) -> 
None:
         self._update_roster_button()
         self._update_invite_button()
         self._update_avatar()
+        self._update_avatar_button_sensitivity()
         self._update_name_label()
         self._update_description_label()
         self._update_account_badge()
@@ -298,6 +299,9 @@ def _update_avatar(self) -> None:
         self._avatar_image.set_pixel_size(AvatarSize.CHAT)
         self._avatar_image.set_from_paintable(texture)
 
+    def _update_avatar_button_sensitivity(self) -> None:
+        self._avatar_button.set_sensitive(isinstance(self._contact, 
BareContact))
+
     def _on_avatar_clicked(self, button: Gtk.MenuButton) -> None:
         if not isinstance(self._contact, BareContact):
             button.set_popover(None)


=====================================
gajim/gtk/contact_popover.py
=====================================
@@ -63,7 +63,10 @@ def __init__(self, contact: BareContact) -> None:
         self._avatar.set_pixel_size(AvatarSize.TOOLTIP)
         self._avatar.set_from_paintable(texture)
 
-        self._name.set_label(contact.name)
+        if contact.is_self:
+            self._name.set_label(_("Note to myself"))
+        else:
+            self._name.set_label(contact.name)
 
         if not contact.is_self:
             if contact.subscription in ("none", "to"):



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/f3dba1427d9a52fd78ee6764a5e70793628bf3c9

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/f3dba1427d9a52fd78ee6764a5e70793628bf3c9
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to