After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 377867 - GtkNotebook now support tab DnD, use it instead of GossipNotebook
GtkNotebook now support tab DnD, use it instead of GossipNotebook
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
0.19
Other Linux
: Normal blocker
: ---
Assigned To: Gossip Maintainers
Gossip Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-21 19:02 UTC by Xavier Claessens
Modified: 2006-11-26 10:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (12.54 KB, patch)
2006-11-21 19:03 UTC, Xavier Claessens
committed Details | Review

Description Xavier Claessens 2006-11-21 19:02:50 UTC
Since we depend on GTK 2.10 we can use tab DnD with the new GTK API.
Comment 1 Xavier Claessens 2006-11-21 19:03:52 UTC
Created attachment 76989 [details] [review]
proposed patch

It seems DnD between 2 windows doesn't works everytime, is it a GTK bug or missed I something ?
Comment 2 Xavier Claessens 2006-11-21 22:32:44 UTC
committed.

DnD of contact from the main window to the chat window was broken before this patch and still not work after :D
Comment 3 Richard Hult 2006-11-22 07:35:04 UTC
Dnd from one chat window to another is broken now.
Comment 4 Mikael Hallendal 2006-11-22 08:04:25 UTC
Setting to blocker so that it is fixed before next release.
Comment 5 Martyn Russell 2006-11-22 09:20:38 UTC
I have found the following issues:

- Dragging to a target that isn't the right target should detach the tab automatically.
- Dragging one tab to another window only works if you drop over the label of the tab, not anywhere in the GtkNotebook.
- Dragging from the contact list to the chat window doesn't work.

So technically, dragging from one chat window to another works, just not if you get the wrong target.

Also there used to be target highlighting so you knew you could drop at the target, we should do that if possible.
Comment 6 Richard Hult 2006-11-22 09:39:03 UTC
(In reply to comment #5)
> - Dragging one tab to another window only works if you drop over the label of
> the tab, not anywhere in the GtkNotebook.

Not always for me, it looks rather random when it works and when it doesn't. Unless you need to hit an exact spot that I keep missing...
Comment 7 Richard Hult 2006-11-22 09:57:05 UTC
Another regression: it doesn't restore the size anymore after dragging a chat out of a window.
Comment 8 Xavier Claessens 2006-11-22 10:52:01 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > - Dragging one tab to another window only works if you drop over the label of
> > the tab, not anywhere in the GtkNotebook.
> 
> Not always for me, it looks rather random when it works and when it doesn't.
> Unless you need to hit an exact spot that I keep missing...
> 

Same here, I don't understand why. Maybe that's a GTK bug ? The only application using tab DnD with the new API is epiphany but they don't detach tabs... Does someone knows an application where it works ?
Comment 9 Martyn Russell 2006-11-26 10:14:21 UTC
I have fixed this.

The problem was that the GossipChatView assigns the widget->drag_motion function to an internal function (chat_view_drag_motion) so we can make sure we don't scroll the chat window when dragging items across it. Unfortunately, returning TRUE in this function disrupts the drag motion for tabs, so instead I just returned FALSE there.

While here I fixed a crasher with ref counts when dragging group chat tabs out of a window to a new window.

Also fixed a bug when dragging a tab back into the same window it was already in, where by it would disappear.