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 630521 - Remove some remaining API warts from tab dnd api
Remove some remaining API warts from tab dnd api
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkNotebook
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2010-09-24 14:43 UTC by Matthias Clasen
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove the window creation hook (5.08 KB, patch)
2010-09-24 14:44 UTC, Matthias Clasen
committed Details | Review
group -> group_name (9.96 KB, patch)
2010-09-24 14:45 UTC, Matthias Clasen
committed Details | Review

Description Matthias Clasen 2010-09-24 14:43:58 UTC
The window creation hook is problematic, since it is global. And we already have a create-window signal anyway.

The group is currently specified as a bare pointer without a destroy notify, which is very problematic for language bindings. Instead, we can just use an interned string.
Comment 1 Matthias Clasen 2010-09-24 14:44:44 UTC
Created attachment 171035 [details] [review]
remove the window creation hook
Comment 2 Matthias Clasen 2010-09-24 14:45:17 UTC
Created attachment 171036 [details] [review]
group -> group_name
Comment 3 Javier Jardón (IRC: jjardon) 2010-09-24 15:03:59 UTC
Setting 2.24 as target milestore as we should deprecate the former API in 2.x
Comment 4 Christian Dywan 2010-09-24 15:47:10 UTC
(In reply to comment #2)
> Created an attachment (id=171036) [details] [review]
> group -> group_name

My immediate thought here is , this is almost like the older group-id except you pass a string which internally is a quark. With the older API you would pass a quark (or any integer) directly. It is probably slightly more natural to use a string.

I do agree that it is better than the obscure group pointer and it is a good idea to use quarks.
Comment 5 Christian Dywan 2010-09-24 15:52:29 UTC
(In reply to comment #1)
> Created an attachment (id=171035) [details] [review]
> remove the window creation hook

I second removing the hook. It is simply redundant and not a nice interface.
Comment 6 Matthias Clasen 2010-09-24 15:56:22 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > Created an attachment (id=171036) [details] [review] [details] [review]
> > group -> group_name
> 
> My immediate thought here is , this is almost like the older group-id except
> you pass a string which internally is a quark. With the older API you would
> pass a quark (or any integer) directly. It is probably slightly more natural to
> use a string.
> 
> I do agree that it is better than the obscure group pointer and it is a good
> idea to use quarks.

The big advantage of strings over integers is that it is easy to avoid collisions by using a prefix.
And using quarks in the api is a bit icky.