GNOME Bugzilla – Bug 630972
drop GtkObject use
Last modified: 2010-09-30 21:16:28 UTC
GtkObject is gone in GTK3. See http://live.gnome.org/GnomeGoals/GtkObjectRemoval
Created attachment 171393 [details] [review] drop GtkObject use
Review of attachment 171393 [details] [review]: It looks good to me, second opinion here?
Review of attachment 171393 [details] [review]: when doing inheritance we should just override dispose instead of destroy, they are equivalent and dispose is more consistent with all other gobjects. The only place where destroy should be kept is when you are connecting to another object destruction ::: gedit/gedit-history-entry.c @@ -118,2 @@ static void -gedit_history_entry_destroy (GtkObject *object) we should simply move to dispose and the code should me made robust against multiple invocations ::: gedit/gedit-overlay.c @@ -165,2 @@ static void -gedit_overlay_destroy (GtkObject *object) move to dispose ::: gedit/gedit-view.c @@ +78,2 @@ static void gedit_view_finalize (GObject *object); +static void gedit_view_destroy (GtkWidget *widget); move to dispose ::: plugins/spell/gedit-spell-checker-dialog.c @@ +114,2 @@ static void +gedit_spell_checker_dialog_destroy (GtkWidget *widget) move to dispose
Created attachment 171433 [details] [review] drop GtkObject use.v2 Updated patch using ->dipose instead ->destroy
Review of attachment 171433 [details] [review]: Javier, thanks for the patch, I do appreciate it. However I think you should put more attention to detail in this porting work, otherwise we risk to introduce a lot of subtle bugs across the whole gnome stack. We really need to take the time to read the code and check the changes, otherwise we would be doing these refactorings with sed :-) Anyway, I fixed up the patch and pushed. ::: gedit/gedit-history-entry.c @@ +122,3 @@ FALSE); + G_OBJECT_CLASS (gedit_history_entry_parent_class)->dispose (widget); here, you pass "widget", which does not exist ::: gedit/gedit-view.c @@ -423,2 +422,2 @@ static void -gedit_view_destroy (GtkObject *object) +gedit_view_dispose (GObject *object) I know I was the one suggesting it, but taking a quick glance at the code you can notice that there is a big fat comment explaining that function closely relates to GtkTextView::destroy, so we should keep it that way.