summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caja-convert-metadata.c121
-rw-r--r--src/caja-emblem-sidebar.c9
2 files changed, 7 insertions, 123 deletions
diff --git a/src/caja-convert-metadata.c b/src/caja-convert-metadata.c
index 57c2d234..faf44e87 100644
--- a/src/caja-convert-metadata.c
+++ b/src/caja-convert-metadata.c
@@ -31,99 +31,10 @@
#include <glib/gi18n.h>
#include <string.h>
#include <libxml/tree.h>
-#include <mateconf/mateconf-client.h>
#include <libcaja-private/caja-metadata.h>
-#define CAJA_DESKTOP_METADATA_MATECONF_PATH "/apps/caja/desktop-metadata"
-
static gboolean quiet = FALSE;
-static char *
-get_metadata_mateconf_path (const char *name,
- const char *key)
-{
- char *res, *escaped_name;
-
- escaped_name = mateconf_escape_key (name, -1);
- res = g_build_filename (CAJA_DESKTOP_METADATA_MATECONF_PATH, escaped_name, key + strlen ("metadata::"), NULL);
- g_free (escaped_name);
-
- return res;
-}
-
-static void
-desktop_set_metadata_string (GFile *file,
- const char *key,
- const char *string)
-{
- MateConfClient *client;
- char *mateconf_key;
- GFile *parent;
- char *name;
-
- parent = g_file_get_parent (file);
- if (parent == NULL)
- {
- name = g_strdup ("directory");
- }
- else
- {
- g_object_unref (parent);
- name = g_file_get_basename (file);
- }
-
- client = mateconf_client_get_default ();
- mateconf_key = get_metadata_mateconf_path (name, key);
-
- mateconf_client_set_string (client, mateconf_key, string, NULL);
-
- g_free (mateconf_key);
- g_free (name);
- g_object_unref (client);
-}
-
-static void
-desktop_set_metadata_stringv (GFile *file,
- const char *key,
- char **stringv)
-{
- MateConfClient *client;
- char *mateconf_key;
- GSList *list;
- int i;
- GFile *parent;
- char *name;
-
- parent = g_file_get_parent (file);
- if (parent == NULL)
- {
- name = g_strdup ("directory");
- }
- else
- {
- g_object_unref (parent);
- name = g_file_get_basename (file);
- }
-
- client = mateconf_client_get_default ();
- mateconf_key = get_metadata_mateconf_path (name, key);
-
- list = NULL;
- for (i = 0; stringv[i] != NULL; i++)
- {
- list = g_slist_prepend (list, stringv[i]);
- }
- list = g_slist_reverse (list);
-
- mateconf_client_set_list (client, mateconf_key,
- MATECONF_VALUE_STRING,
- list, NULL);
-
- g_slist_free (list);
- g_free (mateconf_key);
- g_free (name);
- g_object_unref (client);
-}
static xmlNodePtr
xml_get_children (xmlNodePtr parent)
@@ -251,11 +162,7 @@ parse_xml_node (GFile *file,
char **strv;
GError *error;
- info = NULL;
- if (!g_file_has_uri_scheme (file, "x-caja-desktop"))
- {
- info = g_file_info_new ();
- }
+ info = g_file_info_new ();
for (attr = filenode->properties; attr != NULL; attr = attr->next)
{
@@ -271,16 +178,9 @@ parse_xml_node (GFile *file,
property = xmlGetProp (filenode, attr->name);
if (property)
{
- if (info)
- {
- g_file_info_set_attribute_string (info,
- new_key,
- property);
- }
- else
- {
- desktop_set_metadata_string (file, new_key, property);
- }
+ g_file_info_set_attribute_string (info,
+ new_key,
+ property);
xmlFree (property);
}
}
@@ -314,16 +214,9 @@ parse_xml_node (GFile *file,
{
strv[i] = l->data;
}
- if (info)
- {
- g_file_info_set_attribute_stringv (info,
- new_key,
- strv);
- }
- else
- {
- desktop_set_metadata_stringv (file, new_key, strv);
- }
+ g_file_info_set_attribute_stringv (info,
+ new_key,
+ strv);
g_free (strv);
g_list_foreach (keys, (GFunc)xmlFree, NULL);
g_list_free (keys);
diff --git a/src/caja-emblem-sidebar.c b/src/caja-emblem-sidebar.c
index 57a8ab21..7c188a7d 100644
--- a/src/caja-emblem-sidebar.c
+++ b/src/caja-emblem-sidebar.c
@@ -43,7 +43,6 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gtk/gtk.h>
#include <glib/gi18n.h>
-#include <mateconf/mateconf-client.h>
#include <libcaja-private/caja-icon-dnd.h>
#include <libcaja-private/caja-emblem-utils.h>
#include <libcaja-private/caja-file-utilities.h>
@@ -54,7 +53,6 @@
struct CajaEmblemSidebarDetails
{
CajaWindowInfo *window;
- MateConfClient *client;
GtkWidget *emblems_table;
GtkWidget *popup;
GtkWidget *popup_remove;
@@ -1040,8 +1038,6 @@ caja_emblem_sidebar_init (CajaEmblemSidebar *emblem_sidebar)
emblem_sidebar->details = g_new0 (CajaEmblemSidebarDetails, 1);
- emblem_sidebar->details->client = mateconf_client_get_default ();
-
create_popup_menu (emblem_sidebar);
widget = caja_emblem_sidebar_create_container (emblem_sidebar);
@@ -1065,11 +1061,6 @@ caja_emblem_sidebar_finalize (GObject *object)
if (emblem_sidebar->details != NULL)
{
- if (emblem_sidebar->details->client != NULL)
- {
- g_object_unref (emblem_sidebar->details->client);
- }
-
g_free (emblem_sidebar->details);
}