]> Pileus Git - ~andy/gtk/commitdiff
Make copy_attribute() a function instead of a macro
authorFederico Mena Quintero <federico@novell.com>
Fri, 11 Sep 2009 18:32:08 +0000 (13:32 -0500)
committerBenjamin Otte <otte@gnome.org>
Thu, 15 Oct 2009 20:06:19 +0000 (22:06 +0200)
Signed-off-by: Federico Mena Quintero <federico@novell.com>
gtk/gtkfilechooserdefault.c

index 31991c085f2cee5fa7f89448826ad7b9ff715575..0e5c40518005d7ef7d84bf4254f69bc7882bf8ab 100644 (file)
@@ -6577,13 +6577,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)