Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwurstsalat <mailtrash@posteo.de>2022-10-09 12:25:40 +0300
committerwurstsalat <mailtrash@posteo.de>2022-10-09 12:25:40 +0300
commit167ea2890c82b0b96a2c12c1d33876d4e425c09d (patch)
tree1eec9dcdf65b9e420046e0adff3b2d151f0ca56b
parentfe698091044ccc85ffbfd831622383b4af34c903 (diff)
cfix: DND: Un-highlight rows correctly, transfer source workspace
-rw-r--r--gajim/gtk/chat_list_row.py5
-rw-r--r--gajim/gtk/workspace_side_bar.py8
2 files changed, 7 insertions, 6 deletions
diff --git a/gajim/gtk/chat_list_row.py b/gajim/gtk/chat_list_row.py
index 65743f7d5..daa44b5f9 100644
--- a/gajim/gtk/chat_list_row.py
+++ b/gajim/gtk/chat_list_row.py
@@ -428,15 +428,16 @@ class ChatListRow(Gtk.ListBoxRow):
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:
diff --git a/gajim/gtk/workspace_side_bar.py b/gajim/gtk/workspace_side_bar.py
index e2c6ea6be..a5287a95b 100644
--- a/gajim/gtk/workspace_side_bar.py
+++ b/gajim/gtk/workspace_side_bar.py
@@ -122,8 +122,9 @@ class WorkspaceSideBar(Gtk.ListBox):
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 @@ class WorkspaceSideBar(Gtk.ListBox):
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 @@ class WorkspaceSideBar(Gtk.ListBox):
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,