[glib/filechooserentry: 3/10] fileinfo: Store namespace::* as 0th attribute



commit d0c3a8a4b7d2c7269c4fb24a012eae4360e786f1
Author: Benjamin Otte <otte redhat com>
Date:   Tue Nov 1 17:50:22 2011 +0100

    fileinfo: Store namespace::* as 0th attribute
    
    This way, we can get_attribute() namespaces. This will be important in
    the next commit.

 gio/gfileinfo.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index 5b5c8cc..978cba3 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -132,7 +132,8 @@ _lookup_namespace (const char *namespace)
       ns_info->id = ++namespace_id_counter;
       g_hash_table_insert (ns_hash, g_strdup (namespace), ns_info);
       attributes = g_realloc (attributes, (ns_info->id + 1) * sizeof (char **));
-      attributes[ns_info->id] = NULL;
+      attributes[ns_info->id] = g_new (char *, 1);
+      attributes[ns_info->id][0] = g_strconcat (namespace, "::*", NULL);
     }
   return ns_info;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]