aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/comp-util.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-01-31 03:03:19 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-08 23:05:26 +0800
commit72797decc12602b181f69dba7c54df7a0d1b9326 (patch)
treeecd1314c92bc26b59647b351b2d47e446f4ed21d /calendar/gui/comp-util.c
parent3ba0b61f9f447b01c3a83bfb78ee33a45d413700 (diff)
downloadgsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.gz
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.tar.zst
gsoc2013-evolution-72797decc12602b181f69dba7c54df7a0d1b9326.zip
Giant leap towards GSEAL compliance.
Diffstat (limited to 'calendar/gui/comp-util.c')
-rw-r--r--calendar/gui/comp-util.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/calendar/gui/comp-util.c b/calendar/gui/comp-util.c
index a8fa9aef72..e8cbc72436 100644
--- a/calendar/gui/comp-util.c
+++ b/calendar/gui/comp-util.c
@@ -483,6 +483,7 @@ cal_comp_selection_set_string_list (GtkSelectionData *data, GSList *str_list)
/* format is "str1\0str2\0...strN\0" */
GSList *p;
GByteArray *array;
+ GdkAtom target;
g_return_if_fail (data != NULL);
@@ -497,7 +498,8 @@ cal_comp_selection_set_string_list (GtkSelectionData *data, GSList *str_list)
g_byte_array_append (array, c, strlen ((const gchar *) c) + 1);
}
- gtk_selection_data_set (data, data->target, 8, array->data, array->len);
+ target = gtk_selection_data_get_target (data);
+ gtk_selection_data_set (data, target, 8, array->data, array->len);
g_byte_array_free (array, TRUE);
}
@@ -512,17 +514,22 @@ cal_comp_selection_set_string_list (GtkSelectionData *data, GSList *str_list)
* @return Newly allocated GSList of strings.
**/
GSList *
-cal_comp_selection_get_string_list (GtkSelectionData *data)
+cal_comp_selection_get_string_list (GtkSelectionData *selection_data)
{
/* format is "str1\0str2\0...strN\0" */
gchar *inptr, *inend;
GSList *list;
+ const guchar *data;
+ gint length;
- g_return_val_if_fail (data != NULL, NULL);
+ g_return_val_if_fail (selection_data != NULL, NULL);
+
+ data = gtk_selection_data_get_data (selection_data);
+ length = gtk_selection_data_get_length (selection_data);
list = NULL;
- inptr = (gchar *)data->data;
- inend = (gchar *)(data->data + data->length);
+ inptr = (gchar *) data;
+ inend = (gchar *) (data + length);
while (inptr < inend) {
gchar *start = inptr;