Fix build for older glib
This commit is contained in:
parent
f8e4cdb56f
commit
db44e0824a
3 changed files with 24 additions and 0 deletions
|
@ -29,6 +29,7 @@
|
||||||
#include "area.h"
|
#include "area.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "panel.h"
|
#include "panel.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
Area *mouse_over_area = NULL;
|
Area *mouse_over_area = NULL;
|
||||||
|
|
||||||
|
|
|
@ -605,3 +605,18 @@ void get_text_size2(PangoFontDescription *font,
|
||||||
cairo_surface_destroy(cs);
|
cairo_surface_destroy(cs);
|
||||||
XFreePixmap(server.dsp, pmap);
|
XFreePixmap(server.dsp, pmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 33, 4)
|
||||||
|
GList *g_list_copy_deep(GList *list, GCopyFunc func, gpointer user_data)
|
||||||
|
{
|
||||||
|
list = g_list_copy(list);
|
||||||
|
|
||||||
|
if (func) {
|
||||||
|
for (GList *l = list; l; l = l->next) {
|
||||||
|
l->data = func(l->data, user_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -100,4 +100,12 @@ void clear_pixmap(Pixmap p, int x, int y, int w, int h);
|
||||||
|
|
||||||
#define free_and_null(p) { free(p); p = NULL; }
|
#define free_and_null(p) { free(p); p = NULL; }
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 33, 4)
|
||||||
|
GList *g_list_copy_deep(GList *list, GCopyFunc func, gpointer user_data);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !GLIB_CHECK_VERSION (2, 38, 0)
|
||||||
|
#define g_assert_null(expr) g_assert((expr) == NULL)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue