Philipp Hörist pushed to branch master at gajim / gajim
Commits:
7bc116d6 by mjk at 2023-04-24T15:59:09+00:00
imprv: ChatStack: Only respond to supported drag-n-drop types while dragging
- - - - -
1 changed file:
- gajim/gtk/chat_stack.py
Changes:
=====================================
gajim/gtk/chat_stack.py
=====================================
@@ -678,7 +678,7 @@ def _on_drag_leave(self,
def _on_drag_motion(self,
_widget: Gtk.Widget,
- _context: Gdk.DragContext,
+ context: Gdk.DragContext,
_x_coord: int,
_y_coord: int,
time: int
@@ -688,9 +688,13 @@ def _on_drag_motion(self,
# Workaround for https://gitlab.gnome.org/GNOME/gtk/-/issues/5518
return False
- self._drop_area.set_no_show_all(False)
- self._drop_area.show_all()
- return True
+ for targ in context.list_targets():
+ if targ.name() in {'text/uri-list',
'application/vnd.portal.files'}:
+ self._drop_area.set_no_show_all(False)
+ self._drop_area.show_all()
+ return True
+
+ return False
def _show_chat_function_page(self,
function_mode: FunctionMode,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/7bc116d6f82502cbfccfca01258113546f9dffcc
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/7bc116d6f82502cbfccfca01258113546f9dffcc
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