Re: More Gtk2 -> Gtk3 Notes



Oops, I actually meant to include additional explanation.

A helpful individual in the perl IRC channel provided this little gem to me:
%Gtk2:: = %Gtk3::;

Combined with the previously attached Gtk3.pm file, it has allowed me to use one source code branch supporting both Gtk2 and Gtk3 (while, essentially, leaving the entire codebase using Gtk2-> calls). There were a couple of irreconcilable caveats that were mentioned in my previous notes (specifically, image surfaces). In that case, I used a few if statements. Basically, the current source of our application has no more than 10 or 15 such if statements (in a VERY large codebase).

Keep in mind, of course, any use of this will break with Gtk3 syntax as it more or less restores Gtk2 syntax.

The changes in there aren't the prettiest, but, hope someone else finds this useful.. =)

Terence J. Ferraro


On Sun, Apr 27, 2014 at 2:59 AM, Terence Ferraro <terencejferraro gmail com> wrote:
I do apologize in advance for the lack of "officialness" in this email. In that, my attachment isn't a diff, probably doesn't conform to any sensible form, etc.

In any case, with lessons learned from months and months of converting a specific project from Gtk2 -> Gtk3, I gained an understanding of Glib::Object::Introspection in the process.

After learning all of the quirks and changes in the conversion process, I was faced with yet an even more daunting task of potentially forking a larger project to support both Gtk2 and Gtk3 simultaneously. Supporting yet another fork sounded very unappealing.

I have attached my current modification of Gtk3.pm (based on version 0.09).

Terence J. Ferraro



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]