jjk-jacky / statusnotifier

Library to use KDE's StatusNotifierItem via GObject
Other
25 stars 8 forks source link

Added templates for enums.{h,c} #10

Closed vovochka404 closed 7 years ago

vovochka404 commented 9 years ago

It's easier to understand/fix something and much more simple to use without mkenums script.

jjk-jacky commented 9 years ago

So there are two things being done here actually: switching to template files, and changing the generated code. So this should be separated, at least in two different commits, e.g. one to switch to templates, then another one to change the code.

As far as using a template, that's fine. I'm not sure why changing the code is needed however?

vovochka404 commented 9 years ago

About code changing: It was easier to take a common template nether to write it from 0 and "parse" you arguments to glib-mkenums :) Please, accept this commit as is :)

jjk-jacky commented 9 years ago

Well, that's not a very good reason to change code and start using thread-related APIs though. If you're looking for models, you can have a look at GDK[1], they generate similar code using templates.

[1] https://git.gnome.org/browse/gtk+/tree/gdk/gdkenumtypes.c.template

vovochka404 commented 9 years ago

Ok, rewritten :)

vovochka404 commented 9 years ago

So? :)

jjk-jacky commented 9 years ago

Oh, sorry. Yeah it's good, thank you. I've merged this into next, just haven't pushed it yet.