[geany/geany-plugins] c074a3: webhelper: Fix bookmark completion on GTK 2.24

Colomban Wendling git-noreply at xxxxx
Tue Mar 3 01:24:34 UTC 2015


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 03 Mar 2015 01:24:34 UTC
Commit:      c074a30c25fefa5e20928d6a4fdf0b22561256b7
             https://github.com/geany/geany-plugins/commit/c074a30c25fefa5e20928d6a4fdf0b22561256b7

Log Message:
-----------
webhelper: Fix bookmark completion on GTK 2.24

Geany hides the GtkComboBoxText API on GTK 2.24 because it wants to
keep the very same ABI on all GTK2 builds.  So, we have to do the same
otherwise we get mixed APIs which doesn't quite work.

While at it, remove the redundant API mappings.

Closes #193.


Modified Paths:
--------------
    webhelper/src/gwh-browser.c

Modified: webhelper/src/gwh-browser.c
12 lines changed, 5 insertions(+), 7 deletions(-)
===================================================================
@@ -51,15 +51,13 @@
   (GTK_WIDGET_MAPPED ((w)))
 # endif /* defined (gtk_widget_get_mapped) */
 #endif /* GTK_CHECK_VERSION (2, 20, 0) */
-#if ! GTK_CHECK_VERSION (2, 24, 0)
-# define GtkComboBoxText GtkComboBox
-# define GTK_COMBO_BOX_TEXT GTK_COMBO_BOX
-# define GTK_IS_COMBO_BOX_TEXT GTK_IS_COMBO_BOX
-# define gtk_combo_box_text_new_with_entry gtk_combo_box_entry_new_text
+#if ! GTK_CHECK_VERSION (3, 0, 0)
+/* the GtkComboBoxText API is actually available in 2.24, but Geany's
+ * gtkcompat.h hides it on < 3.0.0 to keep ABI compatibility on all 2.x, so we
+ * need to use the old API there too. */
 # define gtk_combo_box_get_entry_text_column(c) \
   (gtk_combo_box_entry_get_text_column (GTK_COMBO_BOX_ENTRY (c)))
-# define gtk_combo_box_text_append_text gtk_combo_box_append_text
-#endif /* GTK_CHECK_VERSION (2, 24, 0) */
+#endif /* GTK_CHECK_VERSION (3, 0, 0) */
 #if ! GTK_CHECK_VERSION (3, 0, 0)
 static void
 combo_box_text_remove_all (GtkComboBoxText *combo_box)



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list