[Geany-devel] About disabling GTK+/GLib deprecated symbols

Enrico Tröger enrico.troeger at xxxxx
Mon Oct 27 21:05:27 UTC 2008


On Wed, 15 Oct 2008 19:15:28 +0200, Colomban Wendling
<ban-ubuntu at club-internet.fr> wrote:

>Enrico Tröger a écrit :
>> Yeah, Colomban thanks for your efforts!
>It's nothing, I thank you of always improving this wonderful tool that
>Geany is! ;)
>> I really don't like using anything other than C to write C (except
>> for Glade :D).
>> Seriously, before I state that I don't like Vala, Nick, could you
>> give some details about it?
>> Just an obvious disadvantage: vala would cause another build
>> dependency (for developers, in any case for me :D). But we all
>> have 'glib-genmarshal' already installed.
>>
>> But I doubt glib-genmarshal isn't a 'recent tool'. What is this
>> statement based on?At least it's the common way to generate
>> marshallers files in a couple of projects I've seen.
>> I guess at some point we need to write or generate marshallers as GTK
>> only provides a few signatures and when we add more signals to
>> GeanyObject we might need own ones.
>> Generating them sould be done with glib-genmarshal IMO but we also
>> could them by hand as they don't need to be updated once they are
>> written.
>>   
>glib-genmarshal exists at least since 2.6, I dunno for older versions.
>I think I don't really understand what you would mean: I understand you
>think using specific marshallers for Genay is a good idea (and will
>probably be needed a day or another), but that you don't want use it
>before you need one not provided by GTK?
>Anyway, I think it is better to always generate it at compile time,
>then if generated files changes through different versions of the
>GLib, it will be done transparently.
>
>> I don't think so, at least I don't see a need for this except for the
>> tagmanager patch.
>>   
>For the marshallers, IMHO it is not a need, but a clean way to make the
>code highly portable through GTK versions.

As a solution for the middle term, I replaced the
gtk_marshal_* calls with appropriate 
g_cclosure_marshal_* calls which are present in GLib 2.6 according to
[1].

For the "update-editor-menu" signal I added a hand-crafted
geany_cclosure_marshal_VOID__STRING_INT_POINTER type. This does the
trick for now and keeps us from adding glib-genmarschal code to the
build system. 

But of course, if/when we add more signals with non-standard
callback signatures it's better to let the marshalers be generated
instead of writing the code for each by hand.
If it's easily possible with Vala, ok, as long as it is
maintainer-only, so no user, not even SVN users, should need to
generate them (similar to how we handle the generated HTML docs).


[1]
http://svn.gnome.org/viewvc/glib/tags/GLIB_2_6_0/gobject/gmarshal.list?revision=3533&view=markup


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20081027/d5efd398/attachment.pgp>


More information about the Devel mailing list