Daniel Brötzmann pushed to branch master at gajim / gajim
Commits:
167ea289 by wurstsalat at 2022-10-09T11:25:40+02:00
cfix: DND: Un-highlight rows correctly, transfer source workspace
- - - - -
2 changed files:
- gajim/gtk/chat_list_row.py
- gajim/gtk/workspace_side_bar.py
Changes:
=====================================
gajim/gtk/chat_list_row.py
=====================================
@@ -428,15 +428,16 @@ def _on_drag_end(self,
app.window.highlight_dnd_targets(row, False)
def _on_drag_data_get(self,
- _widget: Gtk.Widget,
+ row: ChatListRow,
_drag_context: Gdk.DragContext,
selection_data: Gtk.SelectionData,
_info: int,
_time: int
) -> None:
+ app.window.highlight_dnd_targets(row, False)
drop_type = Gdk.Atom.intern_static_string('CHAT_LIST_ITEM')
- byte_data = pickle.dumps((self.account, self.jid))
+ byte_data = pickle.dumps((self.account, self.jid, self.workspace_id))
selection_data.set(drop_type, 8, byte_data)
def _connect_contact_signals(self) -> None:
=====================================
gajim/gtk/workspace_side_bar.py
=====================================
@@ -122,8 +122,9 @@ def _on_drag_data_received(self,
if item_type == 'WORKSPACE_SIDEBAR_ITEM':
self._process_workspace_drop(data.decode('utf-8'))
elif item_type == 'CHAT_LIST_ITEM':
- account, jid = pickle.loads(data)
- self._process_chat_list_drop(account, jid, y_coord)
+ account, jid, source_workspace = pickle.loads(data)
+ self._process_chat_list_drop(
+ account, jid, source_workspace, y_coord)
else:
log.debug('Unknown item type dropped')
@@ -151,6 +152,7 @@ def _process_workspace_drop(self, workspace_id: str) ->
None:
def _process_chat_list_drop(self,
account: str,
jid: JID,
+ source_workspace: str,
y_coord: int) -> None:
workspace_row = cast(Workspace, self.get_row_at_y(y_coord))
@@ -159,8 +161,6 @@ def _process_chat_list_drop(self,
if workspace_row.workspace_id == 'add':
workspace_id = ''
- source_workspace = app.window.get_active_workspace()
- assert source_workspace is not None
params = ChatListEntryParam(workspace_id=workspace_id,
source_workspace_id=source_workspace,
account=account,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/167ea2890c82b0b96a2c12c1d33876d4e425c09d
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/167ea2890c82b0b96a2c12c1d33876d4e425c09d
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