#include <gtk/gtk.h>
#include <gdk/gdk.h>
+#include <string.h>
static inline PangoFontDescription* ghb_widget_get_font(GtkWidget *widget)
{
#endif
}
+static inline gboolean ghb_strv_contains(const char ** strv, const char * str)
+{
+#if GLIB_CHECK_VERSION(2, 44, 0)
+ return g_strv_contains(strv, str);
+#else
+ int ii;
+
+ if (strv == NULL)
+ {
+ return FALSE;
+ }
+ for (ii = 0; strv[ii] != NULL; ii++)
+ {
+ if (!strcmp(strv[ii], str))
+ {
+ return TRUE;
+ }
+ }
+ return FALSE;
+#endif
+}
+
#if !GTK_CHECK_VERSION(3, 10, 0)
#define gtk_image_set_from_icon_name gtk_image_set_from_stock
#define GHB_PLAY_ICON "gtk-media-play"
continue;
}
- if (g_strv_contains((const char**)categories, name))
+ if (ghb_strv_contains((const char**)categories, name))
{
// Category is already in the list
continue;
free(detail_action);
}
if (type == 1 &&
- g_strv_contains((const char**)official_names, folder_name))
+ ghb_strv_contains((const char**)official_names, folder_name))
{
menu_item_name = g_strdup_printf("My %s", folder_name);
}