Hi dear plugins developers,
Now Geany and Geany-Plugins 1.23 are out, I merged support for GTK3 in Geany, and added initial support for building Geany-Plugins against a GTK3 build of Geany.
As you might know, GTK3 has some incompatibilities with GTK2, and GTK3 code often requires some adjustments to work with GTK3. Since it is not possible to load both GTK2 and GTK3 in the same program, a GTK3 build of Geany requires plugins also built against GTK3.
So, I'd like to ask you to consider adjusting your plugins so they build with GTK3 too. Note that *we don't mean to remove GTK2 support*, so adjusting your plugin should make it work with *both* GTK2 and GTK3.
The plugins that currently don't build against GTK3 are:
* Addons * Debugger * DevHelp * GeanyDoc * GeanyInsertNum * GeanyLaTeX * GeanyLipsum * GeanyLua * GeanyMacro * GeanyMiniScript * GeanyNumberedBookmarks * GeanyPrj * GeanyVC * GProject * Markdown * MultiTerm * Pretty Printer * Scope * Spellcheck * TreeBrowser
There are also some plugins that do build against GTK3, but that may require adjustments to render perfectly[1]:
* CodeNav * GeanyExtraSel * GeanySendmail * GeanyPG * GeniusPaste * ShiftColumn * Tableconvert * Updatechecker * XMLSnippets
If you need any assistance to add GTK3 support for your plugin or have any question about it, feel free to contact me.
Regards, Colomban
[1] GTK3 behaves a little differently than GTK2 on some matters, particularly with some widget packing. It is however totally possible (and not hard) to get packing rules that work exactly the same on both GTK2 and GTK3.
Le 18/03/2013 15:02, Colomban Wendling a écrit :
Hi dear plugins developers,
Now Geany and Geany-Plugins 1.23 are out, I merged support for GTK3 in Geany, and added initial support for building Geany-Plugins against a GTK3 build of Geany.
As you might know, GTK3 has some incompatibilities with GTK2, and GTK3 code often requires some adjustments to work with GTK3. Since it is not possible to load both GTK2 and GTK3 in the same program, a GTK3 build of Geany requires plugins also built against GTK3.
So, I'd like to ask you to consider adjusting your plugins so they build with GTK3 too. Note that *we don't mean to remove GTK2 support*, so adjusting your plugin should make it work with *both* GTK2 and GTK3.
[...]
I forgot to mention that Geany now have a header called gtkcompat.h that gets included by geanyplugin.h which gives some GTK2/3 compatibility. This means you don't have to do the conditionals yourself for some things if you depend on Geany 1.24 (current Git):
* Key names for GDK_* are available under GTK3 too (e.g. without the GDK_KEY_ prefix).
* GtkComboBoxText API is available even with GTK < 2.24.
* gtk_widget_set_can_default(), gtk_widget_is_toplevel(), gtk_widget_is_sensitive(), gtk_widget_has_focus(), gtk_widget_get_sensitive(), gtk_widget_set_has_window() and gtk_widget_set_can_focus() are available even with GTK < 2.18.
* gtk_widget_get_mapped() is available even with GTK < 2.20.
* gtk_widget_get_allocated_height() and gtk_widget_get_allocated_width() are available on GTK2.
Regards, Colomban
On Mon, 18 Mar 2013 17:12:00 +0100 Colomban Wendling lists.ban@herbesfolles.org wrote:
I forgot to mention that Geany now have a header called gtkcompat.h that gets included by geanyplugin.h which gives some GTK2/3 compatibility. This means you don't have to do the conditionals yourself for some things if you depend on Geany 1.24 (current Git): [...]
- GtkComboBoxText API is available even with GTK < 2.24.
gtkcompat.h: #define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
IIUC, I should now be using gtk_combo_box_text_new_with_entry. And any attempt to compile geanyinsertnum with a Geany lacking gtkcompat.h will require gtk 2.24 or later.
- gtk_widget_set_can_default(), [...] are available even with GTK < 2.18.
- gtk_widget_get_mapped() is available even with GTK < 2.20.
But only if you are compiling with the newest Geany. So we are either dropping the plugin compatibility with Geany <= 1.23, or with GTK+ <= 2.22. Of course, one can compile the plugins with Geany-git, and use them with a stable Geany... I doubt thing many people will bother.
Maybe we should make gtkcompat.h part of the geany-plugins package? Or define the symbols in the reverse way?