[gtk+/filesystemmodel] Make copy_attribute() a function instead of a macro
- From: Federico Mena Quintero <federico src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+/filesystemmodel] Make copy_attribute() a function instead of a macro
- Date: Fri, 11 Sep 2009 21:15:04 +0000 (UTC)
commit 1a8c032dde5b883a355785664f6d59698fc24929
Author: Federico Mena Quintero <federico novell com>
Date: Fri Sep 11 13:32:08 2009 -0500
Make copy_attribute() a function instead of a macro
Signed-off-by: Federico Mena Quintero <federico novell com>
gtk/gtkfilechooserdefault.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index d71be50..ee3b9d7 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -6479,13 +6479,15 @@ my_g_format_time_for_display (glong secs)
return date_str;
}
-#define copy_attribute(to, from, attribute) G_STMT_START { \
- GFileAttributeType type; \
- gpointer value; \
-\
- if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL)) \
- g_file_info_set_attribute (to, attribute, type, value); \
-}G_STMT_END
+static void
+copy_attribute (GFileInfo *to, GFileInfo *from, const char *attribute)
+{
+ GFileAttributeType type;
+ gpointer value;
+
+ if (g_file_info_get_attribute_data (from, attribute, &type, &value, NULL))
+ g_file_info_set_attribute (to, attribute, type, value);
+}
static void
file_system_model_got_thumbnail (GObject *object, GAsyncResult *res, gpointer data)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]