[balsa] Avoid deprecation breakage
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa] Avoid deprecation breakage
- Date: Sun, 11 Dec 2011 19:14:33 +0000 (UTC)
commit f2a40eca46686c994c70331b97f74ed52fa153a3
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Dec 11 14:13:47 2011 -0500
Avoid deprecation breakage
* libbalsa/libbalsa.c: define G_CONST_RETURN as const.
* src/balsa-mime-widget-text.c: ditto.
* src/main.c: ditto.
* src/sendmsg-window.c (render_attach_size): use
g_format_size().
ChangeLog | 11 +++++++++++
libbalsa/libbalsa.c | 3 +++
src/balsa-mime-widget-text.c | 3 +++
src/main.c | 3 +++
src/sendmsg-window.c | 7 +++++++
5 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index fef9c83..7dc6a66 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-12-11 Peter Bloomfield
+
+ Define G_CONST_RETURN as const and use g_format_size(),
+ to avoid deprecation breakage
+
+ * libbalsa/libbalsa.c: define G_CONST_RETURN as const.
+ * src/balsa-mime-widget-text.c: ditto.
+ * src/main.c: ditto.
+ * src/sendmsg-window.c (render_attach_size): use
+ g_format_size().
+
2011-12-11 Albrecht DreÃ
New files needed for previous commit (Peter's oops)
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 12ed8e1..c91123d 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -47,6 +47,9 @@
#endif /* HAVE_COMPFACE */
#if HAVE_GTKSOURCEVIEW
+#ifndef G_CONST_RETURN
+# define G_CONST_RETURN const
+#endif
#include <gtksourceview/gtksourceview.h>
#include <gtksourceview/gtksourcebuffer.h>
/* note GtkSourceview 1 and 2 have a slightly different API */
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index 6f090bf..f782b31 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -37,6 +37,9 @@
#include "balsa-cite-bar.h"
#if HAVE_GTKSOURCEVIEW
+#ifndef G_CONST_RETURN
+# define G_CONST_RETURN const
+#endif
#include <gtksourceview/gtksourceview.h>
#include <gtksourceview/gtksourcebuffer.h>
#include <gtksourceview/gtksourcelanguage.h>
diff --git a/src/main.c b/src/main.c
index 95a3418..a966560 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,6 +24,9 @@
#endif /* HAVE_CONFIG_H */
#if HAVE_UNIQUE
+#ifndef G_CONST_RETURN
+# define G_CONST_RETURN const
+#endif
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#include <unique/unique.h>
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index b3169ca..835e0bb 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -77,6 +77,9 @@
#include "spell-check.h"
#endif /* HAVE_GTKSPELL */
#if HAVE_GTKSOURCEVIEW
+#ifndef G_CONST_RETURN
+# define G_CONST_RETURN const
+#endif
#include <gtksourceview/gtksourceview.h>
#endif /* HAVE_GTKSOURCEVIEW */
@@ -2882,7 +2885,11 @@ render_attach_size(GtkTreeViewColumn *column, GtkCellRenderer *cell,
if (mode == LIBBALSA_ATTACH_AS_EXTBODY)
sstr = g_strdup("-");
else
+#if GLIB_CHECK_VERSION(2,30,0)
+ sstr = g_format_size((goffset) size);
+#else
sstr = g_format_size_for_display((goffset) size);
+#endif
g_object_set(cell, "text", sstr, NULL);
g_free(sstr);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]