Philipp Hörist pushed to branch master at gajim / gajim
Commits:
986cfb9c by Philipp Hörist at 2022-09-28T20:26:29+02:00
fix: ChatList: Show context menu in correct position
When the context menu was triggered with the mouse over the close
button, the menu would show far away from the mouse.
Fixes #11165
- - - - -
d7ff50f4 by Philipp Hörist at 2022-09-28T20:26:29+02:00
fix: Discovery: Don’t allow to join top level components
It seems there is no way to detect if a component is a room or a MUC
component. As a workaround simply assume all components are not rooms.
Fixes #11175
- - - - -
2 changed files:
- gajim/gtk/chat_list.py
- gajim/gtk/discovery.py
Changes:
=====================================
gajim/gtk/chat_list.py
=====================================
@@ -872,6 +872,15 @@ def _popup_menu(self, event: Gdk.EventButton):
rectangle.y = int(event.y)
rectangle.width = rectangle.height = 1
+ event_widget = Gtk.get_event_widget(event)
+ if isinstance(event_widget, Gtk.Button):
+ # When the event is triggered by pressing the close button we get
+ # a x coordinate relative to the window of the close button, which
+ # would be a very low x integer as the close button is small, this
+ # leads to opening the menu far away from the mouse. We overwrite
+ # the x coordinate with an approx. position of the close button.
+ rectangle.x = int(self.get_allocated_width() - 10)
+
popover = Gtk.Popover.new_from_model(self, menu)
popover.set_relative_to(self)
popover.set_position(Gtk.PositionType.RIGHT)
=====================================
gajim/gtk/discovery.py
=====================================
@@ -1423,8 +1423,6 @@ def _update_actions(self, jid, node, identities,
features, data):
else:
self.register_button.set_label(_('Re_gister'))
self.register_button.set_sensitive(True)
- if self.join_button and Namespace.MUC in features:
- self.join_button.set_sensitive(True)
def _default_action(self, jid, node, identities, features, data):
if AgentBrowser._default_action(self, jid, node, identities,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/0baa4d801382251c9fe61ae5a38ffd5c4ed35c10...d7ff50f4e750a4ed5950ed25d7f17ad59d12a164
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/compare/0baa4d801382251c9fe61ae5a38ffd5c4ed35c10...d7ff50f4e750a4ed5950ed25d7f17ad59d12a164
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits