[libpeas] Allow the copyright to be a string list and join it with newlines



commit 60abcaf17cbca040c7685736993e68e0e3567cc6
Author: Garrett Regier <garrettregier gmail com>
Date:   Sat Sep 10 11:08:13 2011 -0700

    Allow the copyright to be a string list and join it with newlines

 libpeas/peas-plugin-info.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/libpeas/peas-plugin-info.c b/libpeas/peas-plugin-info.c
index 0347730..0dcff4e 100644
--- a/libpeas/peas-plugin-info.c
+++ b/libpeas/peas-plugin-info.c
@@ -135,6 +135,7 @@ _peas_plugin_info_new (const gchar *filename,
   PeasPluginInfo *info;
   GKeyFile *plugin_file = NULL;
   gchar *str;
+  gchar **strv;
   gboolean b;
   GError *error = NULL;
 
@@ -213,9 +214,14 @@ _peas_plugin_info_new (const gchar *filename,
     info->authors = g_new0 (gchar *, 1);
 
   /* Get Copyright */
-  str = g_key_file_get_string (plugin_file, "Plugin", "Copyright", NULL);
-  if (str)
-    info->copyright = str;
+  strv = g_key_file_get_string_list (plugin_file, "Plugin",
+                                     "Copyright", NULL, NULL);
+  if (strv)
+    {
+      info->copyright = g_strjoinv ("\n", strv);
+
+      g_strfreev (strv);
+    }
 
   /* Get Website */
   str = g_key_file_get_string (plugin_file, "Plugin", "Website", NULL);



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