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 630766 - [PATCH] Get rid of deprecated GtkObject in EMap widget
[PATCH] Get rid of deprecated GtkObject in EMap widget
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
3.0.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks: 631320
 
 
Reported: 2010-09-27 21:09 UTC by Milan Bouchet-Valat
Modified: 2013-09-13 01:11 UTC
See Also:
GNOME target: 3.0
GNOME version: ---


Attachments
Get rid of deprecated GtkObject in EMap widget (2.34 KB, patch)
2010-09-27 21:09 UTC, Milan Bouchet-Valat
reviewed Details | Review
Get rid of deprecated GtkObject in EMap widget (2.43 KB, patch)
2010-10-01 16:13 UTC, Milan Bouchet-Valat
committed Details | Review

Description Milan Bouchet-Valat 2010-09-27 21:09:25 UTC
Attached is a simple patch to remove use of GtkObject
from widgets/misc/e-map.c.

I simply removed the handle for GtkObject::destroy, since it seems to be useless (see patch description). At least, it works fine!

I've done this for the gnome-system-tools, which use EMap. BTW, do you plan to work on other issues to make EMap work with GTK+3?
Comment 1 Milan Bouchet-Valat 2010-09-27 21:09:28 UTC
Created attachment 171237 [details] [review]
Get rid of deprecated GtkObject in EMap widget

EMap handler for GtkObject::destroy is not needed anyway:
disconnecting signals is useless since adjustements are
unreferenced when EMap is finalized.
Comment 2 André Klapper 2010-09-28 17:44:05 UTC
[added bug ID to http://live.gnome.org/GnomeGoals/GtkObjectRemoval ]
Comment 3 Milan Crha 2010-09-30 09:53:33 UTC
> EMap handler for GtkObject::destroy is not needed anyway:
> disconnecting signals is useless since adjustements are
> unreferenced when EMap is finalized.

Well, because one can provide his/her own adjustments for the widget, then there is not guaranteed that the pointer will be also freed when unreffed. Thus I would rather keep it there. Please update the patch.

(In reply to comment #0)
> I've done this for the gnome-system-tools, which use EMap. BTW, do you plan to
> work on other issues to make EMap work with GTK+3?

Of course yes :) All the evo and such.
Comment 4 Milan Crha 2010-09-30 09:56:25 UTC
(In reply to comment #2)
> [added bug ID to http://live.gnome.org/GnomeGoals/GtkObjectRemoval ]

Is this bug used for all GtkObject removals in evo? Because a simple grep showed there are really many GtkObject references in evo itself.
Comment 5 Milan Bouchet-Valat 2010-10-01 16:13:28 UTC
Created attachment 171514 [details] [review]
Get rid of deprecated GtkObject in EMap widget

Remove GtkObject::destroy() handler. Move disconnecting
signal handlers to e_map_finalize().
Comment 6 Milan Bouchet-Valat 2010-10-01 16:16:02 UTC
New patch disconnects handlers in finalize(), I guess that's OK because adjustments are only unreferenced there.

This patch wasn't intending to remove all GtkObjects in Evo, it's just to avoid duplicating work with the gnome-system-tools (I'm keeping EMap in sync with Evo). Of course, there's much work left... :-(
Comment 7 Milan Crha 2010-10-04 08:14:04 UTC
Thanks, patch looks good (I didn't compile it). Please commit to master after today's release.

And yeah, there's much work left :) That's OK.
Comment 8 Milan Bouchet-Valat 2010-10-04 15:35:10 UTC
Pushed as a9fc19b. Good luck for the rest of the codebase! ;-)
Comment 9 Milan Crha 2010-10-05 07:04:36 UTC
Yeah, thanks. :)
I opened a new bug #631320 for evo itself, thus closing this.