aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-local-folder.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2000-05-16 01:09:44 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2000-05-16 01:09:44 +0800
commite927ce214f28163a2159129e2d4771da274d5611 (patch)
treec37a8adae2aa79b6d5d3d7ebe111ebacc6ad05c5 /shell/e-local-folder.c
parent98317c656590737ced646d6fb4bd65e527c7e178 (diff)
downloadgsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.tar
gsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.tar.gz
gsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.tar.bz2
gsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.tar.lz
gsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.tar.xz
gsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.tar.zst
gsoc2013-evolution-e927ce214f28163a2159129e2d4771da274d5611.zip
Fixed drag and drop so that it properly handles pointer grabbing in
the widget with `gtk_grab_add' and `gtk_grab_remove'. Removed leaks from Iain's patch. Moved shortcut view initialization from the model into the view. svn path=/trunk/; revision=3047
Diffstat (limited to 'shell/e-local-folder.c')
-rw-r--r--shell/e-local-folder.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/shell/e-local-folder.c b/shell/e-local-folder.c
index 406341e793..b164eb1e95 100644
--- a/shell/e-local-folder.c
+++ b/shell/e-local-folder.c
@@ -39,6 +39,7 @@
#endif
#include <gnome-xml/parser.h>
+#include <gnome-xml/xmlmemory.h>
#include "e-util/e-util.h"
#include "e-util/e-xml-utils.h"
@@ -56,11 +57,13 @@ static EFolderClass *parent_class = NULL;
#define METADATA_FILE_NAME_LEN 19
-static const char *
+static char *
get_string_value (xmlNode *node,
const char *name)
{
xmlNode *p;
+ xmlChar *xml_string;
+ char *retval;
p = e_xml_get_child_by_name (node, (xmlChar *) name);
if (p == NULL)
@@ -70,7 +73,11 @@ get_string_value (xmlNode *node,
if (p == NULL)
return NULL;
- return (const char *) xmlNodeListGetString (node->doc, p, 1);
+ xml_string = xmlNodeListGetString (node->doc, p, 1);
+ retval = g_strdup ((char *) xml_string);
+ xmlFree (xml_string);
+
+ return retval;
}
static gboolean
@@ -80,8 +87,8 @@ construct_loading_metadata (ELocalFolder *local_folder,
EFolder *folder;
xmlDoc *doc;
xmlNode *root;
- const char *type;
- const char *description;
+ char *type;
+ char *description;
char *metadata_path;
folder = E_FOLDER (local_folder);
@@ -106,6 +113,9 @@ construct_loading_metadata (ELocalFolder *local_folder,
e_folder_construct (folder, g_basename (path), type, description);
+ g_free (type);
+ g_free (description);
+
xmlFreeDoc (doc);
local_folder->physical_uri = g_strconcat (URI_PREFIX, path, NULL);