lucasr300
lucasr300

Reputation: 618

It's possible to use an old Gtk2 widget in a Gtk3 application?

I'm developing a new interface, but it depend from a custom widget which only work with Gtk2.

There are a way to use both versions, or I will must rewrite my app using Gtk2?

Upvotes: 3

Views: 424

Answers (1)

Micah Carrick
Micah Carrick

Reputation: 10187

It depends on the widget, but, a single widget shouldn't be too hard to port. Most of the time porting is relatively easy. They've also been working on a compatibility module which enables some of the older syntax to work with GTK 3. Check out https://live.gnome.org/PyGObject/IntrospectionPorting

I ported a few of my old applications by doing a few search/replace (things like gtk. becomes Gtk., ICON_SIZE_MENU becomes IconSize.MENU, etc.) and minor tweaks.

Ideally you would continue your app in GTK 3 and help them port their widget to the new API. You're not going to want to be using GTK 2 forever.

Upvotes: 2

Related Questions