aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-05 22:53:33 +0800
committerPhilip Withnall <philip.withnall@collabora.co.uk>2010-08-05 22:55:12 +0800
commit265a072dab29839e7e195470f49e7f9980afc838 (patch)
tree212952093ddb5f7274c6eae30abbede15c39b0eb /libempathy-gtk
parent9039976a1e17444081eb9df2e480d3b4c5266a88 (diff)
downloadgsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.tar
gsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.tar.gz
gsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.tar.bz2
gsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.tar.lz
gsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.tar.xz
gsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.tar.zst
gsoc2013-empathy-265a072dab29839e7e195470f49e7f9980afc838.zip
Cast away constness of strings in GtkTargetEntry structs
This stops gcc warning us about GTK+'s broken API which uses non-const string fields in a static struct.
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-individual-view.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/libempathy-gtk/empathy-individual-view.c b/libempathy-gtk/empathy-individual-view.c
index 239eda7d0..ed7c68b5a 100644
--- a/libempathy-gtk/empathy-individual-view.c
+++ b/libempathy-gtk/empathy-individual-view.c
@@ -108,23 +108,28 @@ enum DndDragType
DND_DRAG_TYPE_STRING,
};
+#define DRAG_TYPE(T,I) \
+ { (gchar *)T, 0, I }
+
static const GtkTargetEntry drag_types_dest[] = {
- {"text/path-list", 0, DND_DRAG_TYPE_URI_LIST},
- {"text/uri-list", 0, DND_DRAG_TYPE_URI_LIST},
- {"text/contact-id", 0, DND_DRAG_TYPE_INDIVIDUAL_ID},
- {"text/plain", 0, DND_DRAG_TYPE_STRING},
- {"STRING", 0, DND_DRAG_TYPE_STRING},
+ DRAG_TYPE ("text/path-list", DND_DRAG_TYPE_URI_LIST),
+ DRAG_TYPE ("text/uri-list", DND_DRAG_TYPE_URI_LIST),
+ DRAG_TYPE ("text/contact-id", DND_DRAG_TYPE_INDIVIDUAL_ID),
+ DRAG_TYPE ("text/plain", DND_DRAG_TYPE_STRING),
+ DRAG_TYPE ("STRING", DND_DRAG_TYPE_STRING),
};
static const GtkTargetEntry drag_types_dest_file[] = {
- {"text/path-list", 0, DND_DRAG_TYPE_URI_LIST},
- {"text/uri-list", 0, DND_DRAG_TYPE_URI_LIST},
+ DRAG_TYPE ("text/path-list", DND_DRAG_TYPE_URI_LIST),
+ DRAG_TYPE ("text/uri-list", DND_DRAG_TYPE_URI_LIST),
};
static const GtkTargetEntry drag_types_source[] = {
- {"text/contact-id", 0, DND_DRAG_TYPE_INDIVIDUAL_ID},
+ DRAG_TYPE ("text/contact-id", DND_DRAG_TYPE_INDIVIDUAL_ID),
};
+#undef DRAG_TYPE
+
static GdkAtom drag_atoms_dest[G_N_ELEMENTS (drag_types_dest)];
static GdkAtom drag_atoms_source[G_N_ELEMENTS (drag_types_source)];