[balsa] Use macros to cast enum to or from gpointer
- From: Peter Bloomfield <PeterB src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [balsa] Use macros to cast enum to or from gpointer
- Date: Sat, 7 Nov 2009 23:41:10 +0000 (UTC)
commit 5d80467685bf76456aa68273623227dc7fdcfd32
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sat Nov 7 18:41:02 2009 -0500
Use macros to cast enum to or from gpointer
ChangeLog | 5 +++++
src/balsa-mime-widget-vcalendar.c | 8 ++++----
2 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e04f113..d4bb0d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-11-07 Peter Bloomfield
+ * src/balsa-mime-widget-vcalendar.c (balsa_vevent_widget,
+ vevent_reply): use macros to cast enum to or from gpointer.
+
+2009-11-07 Peter Bloomfield
+
* libbalsa/rfc2445.c (text_2445_unescape): "\N" encodes newline.
2009-11-01 Peter Bloomfield
diff --git a/src/balsa-mime-widget-vcalendar.c b/src/balsa-mime-widget-vcalendar.c
index 885ccb0..6925319 100644
--- a/src/balsa-mime-widget-vcalendar.c
+++ b/src/balsa-mime-widget-vcalendar.c
@@ -237,7 +237,7 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
g_object_set_data_full(G_OBJECT(button), "event", event,
(GDestroyNotify) g_object_unref);
g_object_set_data(G_OBJECT(button), "mode",
- (gpointer) VCAL_PSTAT_ACCEPTED);
+ GINT_TO_POINTER(VCAL_PSTAT_ACCEPTED));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(vevent_reply), bbox);
gtk_container_add(GTK_CONTAINER(bbox), button);
@@ -245,7 +245,7 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
button = gtk_button_new_with_label(_("Accept tentatively"));
g_object_set_data(G_OBJECT(button), "event", event);
g_object_set_data(G_OBJECT(button), "mode",
- (gpointer) VCAL_PSTAT_TENTATIVE);
+ GINT_TO_POINTER(VCAL_PSTAT_TENTATIVE));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(vevent_reply), bbox);
gtk_container_add(GTK_CONTAINER(bbox), button);
@@ -253,7 +253,7 @@ balsa_vevent_widget(LibBalsaVEvent * event, gboolean may_reply,
button = gtk_button_new_with_label(_("Decline"));
g_object_set_data(G_OBJECT(button), "event", event);
g_object_set_data(G_OBJECT(button), "mode",
- (gpointer) VCAL_PSTAT_DECLINED);
+ GINT_TO_POINTER(VCAL_PSTAT_DECLINED));
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(vevent_reply), bbox);
gtk_container_add(GTK_CONTAINER(bbox), button);
@@ -269,7 +269,7 @@ vevent_reply(GObject * button, GtkWidget * box)
LibBalsaVEvent *event =
LIBBALSA_VEVENT(g_object_get_data(button, "event"));
LibBalsaVCalPartStat pstat =
- (LibBalsaVCalPartStat) g_object_get_data(button, "mode");
+ GPOINTER_TO_INT(g_object_get_data(button, "mode"));
gchar *rcpt;
LibBalsaMessage *message;
LibBalsaMessageBody *body;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]