missing ifdef for g_object_ref_sink call

Sadrul Habib Chowdhury imadil at gmail.com
Sat Jun 21 12:41:42 EDT 2008

* Andrea Visinoni had this to say on [21 Jun 2008, 17:33:19 +0200]:
> http://developer.pidgin.im/viewmtn/revision/diff/4037e908f8c3536d50d9439ec2eec0f4d6ee3b60/with/777e7e6c4fb02c0b0f0dc557554cfc83b92544ae
> --- pidgin/gtkmenutray.c        379e9d48d2bb7d9a67fe6927cccdab5263f55971
> +++ pidgin/gtkmenutray.c        c4af27d6a7547ba2eb2b37be6b0e7feb47b2c20d
> @@ -99,8 +99,12 @@ pidgin_menu_tray_finalize(GObject *obj)
>   #endif
>          if (tray->tooltips)
> +#if GLIB_CHECK_VERSION(2,10,0)
>                  g_object_ref_sink(G_OBJECT(tray->tooltips));
> -
> +#else
> +        g_object_ref(G_OBJECT(tray->tooltips));
> +        gtk_object_sink(GTK_OBJECT(G_OBJECT(tray->tooltips)));
> +#endif
>          G_OBJECT_CLASS(parent_class)->finalize(obj);
>   }

Thanks for noticing the bug. The fix itself was actually incorrect (and
so the fix for the fix is incorrcet too ;) ). I misread the code for
g_object_ref_sink. We actually want gtk_object_sink in there. I have
committed the change. Thanks again.

On a somewhat related note: in a situation like this, do we want to
disapprove the revision and commit the correct fix, or just fix the
change and make a new commit? I have done the latter, in this case,
since that involves less revision(s). I think that's a reasonable
practice for such small changesets. But I would like to know if someone
has any thoughts on this.


More information about the Devel mailing list