Commit 78a76863 authored by Paolo Maggi's avatar Paolo Maggi

Now gedit should work well with non utf8 filenames

parent 6e4d1b2e
2002-07-23 Paolo Maggi <maggi@athena.polito.it>
Now gedit should work well with broken utf8 filenames.
Modified files:
* gedit-file.c
* gnome-recent-model.c
* gnome-recent-view-bonobo.c
* gedit-document.c
* gedit-utils.c
* bonobo-mdi.c
* gedit-file-selector-util.c
2002-07-23 James Willcox <jwillcox@cs.indiana.edu>
* gnome-recent-model.c: Convert URIs to utf8 on the way in,
......
......@@ -510,11 +510,16 @@ child_list_menu_create (BonoboMDI *mdi, BonoboWindow *win)
gchar *verb_name = NULL;
gchar *tip;
gchar *escaped_name;
gchar *safe_name;
gchar *child_name = bonobo_mdi_child_get_name (BONOBO_MDI_CHILD (child->data));
escaped_name = escape_underscores (child_name);
tip = g_strdup_printf (_("Activate %s"), child_name);
safe_name = g_markup_escape_text (child_name, strlen (child_name));
g_return_if_fail (safe_name != NULL);
escaped_name = escape_underscores (safe_name);
g_return_if_fail (escaped_name != NULL);
tip = g_strdup_printf (_("Activate %s"), safe_name);
verb_name = g_strdup_printf ("Child_%p", child->data);
xml = g_strdup_printf ("<menuitem name=\"%s\" verb=\"%s\""
" _label=\"%s\"/>", verb_name, verb_name, escaped_name);
......@@ -523,6 +528,7 @@ child_list_menu_create (BonoboMDI *mdi, BonoboWindow *win)
g_free (tip);
g_free (child_name);
g_free (safe_name);
g_free (escaped_name);
bonobo_ui_component_set_translate (ui_component, mdi->priv->child_list_path, xml, NULL);
......@@ -582,7 +588,7 @@ void
child_list_menu_add_item (BonoboMDI *mdi, BonoboMDIChild *child)
{
GList *win_node;
gchar *child_name, *escaped_name;
gchar *child_name, *escaped_name, *safe_name;
gchar* xml, *cmd, *verb_name, *tip;
int accel_num;
......@@ -594,10 +600,16 @@ child_list_menu_add_item (BonoboMDI *mdi, BonoboMDIChild *child)
win_node = mdi->priv->windows;
child_name = bonobo_mdi_child_get_name (child);
escaped_name = escape_underscores (child_name);
safe_name = g_markup_escape_text (child_name, strlen (child_name));
g_return_if_fail (safe_name != NULL);
escaped_name = escape_underscores (safe_name);
g_return_if_fail (escaped_name != NULL);
verb_name = g_strdup_printf ("Child_%p", child);
tip = g_strdup_printf (_("Activate %s"), child_name);
tip = g_strdup_printf (_("Activate %s"), safe_name);
xml = g_strdup_printf ("<menuitem name=\"%s\" verb=\"%s\""
" _label=\"%s\"/>", verb_name, verb_name, escaped_name);
......@@ -631,6 +643,7 @@ child_list_menu_add_item (BonoboMDI *mdi, BonoboMDIChild *child)
g_free (xml);
g_free (cmd);
g_free (verb_name);
g_free (safe_name);
}
static gboolean
......
......@@ -1115,6 +1115,9 @@ follow_symlinks (const gchar *filename, GError **error)
gchar *followed_filename;
gint link_count;
g_return_val_if_fail (filename != NULL, NULL);
gedit_debug (DEBUG_DOCUMENT, "Filename: %s", filename);
g_return_val_if_fail (strlen (filename) + 1 <= GEDIT_MAX_PATH_LEN, NULL);
followed_filename = g_strdup (filename);
......@@ -1258,16 +1261,8 @@ gedit_document_save_as_real (GeditDocument* doc, const gchar *uri,
}
/* Get filename from uri */
temp_filename = eel_make_uri_canonical (uri);
if ((temp_filename == NULL) || (strlen (temp_filename) <= 7))
filename = NULL;
else
filename = g_strdup (temp_filename + 7);
filename = gnome_vfs_get_local_path_from_uri (uri);
if (temp_filename != NULL)
g_free (temp_filename);
if (!filename)
{
g_set_error (error, GEDIT_DOCUMENT_IO_ERROR, 0,
......
......@@ -89,9 +89,14 @@ replace_existing_file (GtkWindow *parent, const gchar* file_name)
gint ret;
gchar *full_formatted_uri;
gchar *uri_for_display ;
full_formatted_uri = eel_format_uri_for_display (file_name);
gchar *uri;
uri = eel_make_uri_from_shell_arg (file_name);
g_return_val_if_fail (uri != NULL, FALSE);
full_formatted_uri = eel_format_uri_for_display (uri);
g_return_val_if_fail (full_formatted_uri != NULL, FALSE);
g_free (uri);
/* Truncate the URI so it doesn't get insanely wide. Note that even
* though the dialog uses wrapped text, if the URI doesn't contain
......
......@@ -192,7 +192,7 @@ gedit_file_open_real (const gchar* file_name, GeditMDIChild* active_child)
{
GError *error = NULL;
gchar *uri;
gchar *uri_utf8;
GnomeRecentModel *recent;
gedit_debug (DEBUG_FILE, "File name: %s", file_name);
......@@ -200,17 +200,7 @@ gedit_file_open_real (const gchar* file_name, GeditMDIChild* active_child)
uri = eel_make_uri_canonical (file_name);
g_return_val_if_fail (uri != NULL, FALSE);
gedit_debug (DEBUG_FILE, "Canonical uri: %s", uri);
uri_utf8 = g_filename_to_utf8 (uri, -1, NULL, NULL, NULL);
if (uri_utf8 == NULL)
{
g_free (uri);
return FALSE;
}
gedit_debug (DEBUG_FILE, "URI: %s", uri);
if (active_child == NULL ||
!gedit_document_is_untouched (active_child->document))
{
......@@ -256,9 +246,8 @@ gedit_file_open_real (const gchar* file_name, GeditMDIChild* active_child)
}
recent = gedit_recent_get_model ();
gnome_recent_model_add (recent, uri_utf8);
gnome_recent_model_add (recent, uri);
g_free (uri_utf8);
g_free (uri);
gedit_debug (DEBUG_FILE, "END: %s\n", file_name);
......@@ -343,9 +332,7 @@ gedit_file_save (GeditMDIChild* child)
{
GnomeRecentModel *recent;
gchar *raw_uri;
gchar *canonical_uri;
gchar *canonical_uri_utf8;
gedit_debug (DEBUG_FILE, "OK");
gedit_utils_flash_va (_("File '%s' saved."), uri);
......@@ -355,20 +342,11 @@ gedit_file_save (GeditMDIChild* child)
raw_uri = gedit_document_get_raw_uri (doc);
g_return_val_if_fail (raw_uri != NULL, TRUE);
canonical_uri = eel_make_uri_canonical (raw_uri);
g_return_val_if_fail (canonical_uri != NULL, TRUE);
/* canonical_uri is not valid utf8 */
canonical_uri_utf8 = g_filename_to_utf8 (canonical_uri, -1, NULL, NULL, NULL);
g_return_val_if_fail (canonical_uri_utf8 != NULL, TRUE);
recent = gedit_recent_get_model ();
gnome_recent_model_add (recent, canonical_uri_utf8);
gnome_recent_model_add (recent, raw_uri);
g_free (raw_uri);
g_free (canonical_uri);
g_free (canonical_uri_utf8);
return TRUE;
}
}
......@@ -381,7 +359,7 @@ gedit_file_save_as (GeditMDIChild *child)
GeditDocument *doc;
gchar *fname = NULL;
gchar *path = NULL;
gchar *uri = NULL;
gchar *raw_uri = NULL;
gedit_debug (DEBUG_FILE, "");
......@@ -390,21 +368,24 @@ gedit_file_save_as (GeditMDIChild *child)
doc = child->document;
g_return_val_if_fail (doc != NULL, FALSE);
uri = gedit_document_get_uri (doc);
g_return_val_if_fail (uri != NULL, FALSE);
raw_uri = gedit_document_get_raw_uri (doc);
if (gedit_document_is_untitled (doc))
{
path = (gedit_default_path != NULL) ?
g_strdup (gedit_default_path) : NULL;
fname = g_strdup (uri);
/* FIXME: check the case in which "Untitled n" is a non-ascii string */
fname = gedit_document_get_uri (doc);
}
else
{
fname = eel_uri_get_basename (uri);
g_return_val_if_fail (raw_uri != NULL, FALSE);
if (gedit_utils_uri_has_file_scheme (uri))
path = get_dirname_from_uri (uri);
fname = eel_uri_get_basename (raw_uri);
if (gedit_utils_uri_has_file_scheme (raw_uri))
path = get_dirname_from_uri (raw_uri);
else
path = (gedit_default_path != NULL) ?
g_strdup (gedit_default_path) : NULL;
......@@ -420,7 +401,7 @@ gedit_file_save_as (GeditMDIChild *child)
path,
fname);
g_free (uri);
g_free (raw_uri);
g_free (fname);
if (path != NULL)
......@@ -428,14 +409,17 @@ gedit_file_save_as (GeditMDIChild *child)
if (file != NULL)
{
gchar *uri;
gchar *file_utf8;
file_utf8 = g_filename_to_utf8 (file, -1, NULL, NULL, NULL);
uri = eel_make_uri_from_shell_arg (file);
g_return_val_if_fail (uri != NULL, FALSE);
file_utf8 = eel_format_uri_for_display (uri);
if (file_utf8 != NULL)
gedit_utils_flash_va (_("Saving file '%s' ..."), file_utf8);
ret = gedit_file_save_as_real (file, child);
ret = gedit_file_save_as_real (uri, child);
if (ret)
{
......@@ -451,10 +435,12 @@ gedit_file_save_as (GeditMDIChild *child)
gedit_utils_flash_va (_("The document has not been saved."));
gedit_debug (DEBUG_FILE, "File: %s", file);
g_free (uri);
g_free (file);
if (file_utf8 != NULL)
g_free (file_utf8);
}
return ret;
......@@ -484,7 +470,7 @@ gedit_file_save_as_real (const gchar* file_name, GeditMDIChild *child)
{
g_return_val_if_fail (error != NULL, FALSE);
gedit_utils_error_reporting_saving_file (uri, error,
gedit_utils_error_reporting_saving_file (file_name, error,
GTK_WINDOW (gedit_get_active_window ()));
g_error_free (error);
......@@ -496,12 +482,12 @@ gedit_file_save_as_real (const gchar* file_name, GeditMDIChild *child)
}
else
{
#if 0
gchar *temp;
gedit_debug (DEBUG_FILE, "OK");
/* uri is not valid utf8 */
/* uri is not valid utf8 */
temp = g_filename_to_utf8 (uri, -1, NULL, NULL, NULL);
if (temp != NULL)
......@@ -514,7 +500,12 @@ gedit_file_save_as_real (const gchar* file_name, GeditMDIChild *child)
g_free (temp);
}
#endif
GnomeRecentModel *recent;
recent = gedit_recent_get_model ();
gnome_recent_model_add (recent, uri);
g_free (uri);
return TRUE;
......@@ -643,27 +634,6 @@ gedit_file_revert (GeditMDIChild *child)
}
}
static gchar *
gedit_file_make_uri_from_shell_arg (const char *location)
{
gchar* uri;
gchar* canonical_uri;
gedit_debug (DEBUG_FILE, "LOCATION: %s", location);
uri = eel_make_uri_from_shell_arg (location);
gedit_debug (DEBUG_FILE, "URI: %s", uri);
canonical_uri = gnome_vfs_unescape_string_for_display (uri);
gedit_debug (DEBUG_FILE, "CANONICAL URI: %s", canonical_uri);
g_free (uri);
return canonical_uri;
}
gboolean
gedit_file_open_uri_list (GList* uri_list, gint line, gboolean create)
{
......@@ -689,8 +659,8 @@ gedit_file_open_uri_list (GList* uri_list, gint line, gboolean create)
/* create a file for each document in the parameter list */
for ( ; uri_list; uri_list = g_list_next (uri_list))
{
full_path = gedit_file_make_uri_from_shell_arg (uri_list->data);
full_path = eel_make_uri_from_shell_arg (uri_list->data);
if (full_path != NULL)
{
if (!gedit_utils_uri_has_file_scheme (full_path) || gedit_utils_uri_exists (full_path))
......@@ -783,22 +753,19 @@ gedit_file_open_recent (GnomeRecentView *view, const gchar *uri, gpointer data)
{
gboolean ret = FALSE;
GeditView* active_view;
gchar *temp;
gedit_debug (DEBUG_FILE, "Open : %s", uri);
temp = g_filename_from_utf8 (uri, -1, NULL, NULL, NULL);
/* Note that gedit_file_open_single_uri takes a possibly mangled "uri", in UTF8 */
if (temp != NULL)
{
ret = gedit_file_open_single_uri (temp);
ret = gedit_file_open_single_uri (uri);
if (ret) {
GnomeRecentModel *model;
if (!ret)
{
GnomeRecentModel *model;
model = gedit_recent_get_model ();
gnome_recent_model_add (model, uri);
}
model = gedit_recent_get_model ();
gnome_recent_model_delete (model, uri);
}
active_view = gedit_get_active_view ();
......@@ -810,24 +777,9 @@ gedit_file_open_recent (GnomeRecentView *view, const gchar *uri, gpointer data)
return ret;
}
static gchar *
gedit_file_make_canonical_uri_from_input (const char *location)
{
gchar* uri;
gchar* canonical_uri;
gedit_debug (DEBUG_FILE, "");
uri = eel_make_uri_from_input (location);
canonical_uri = eel_make_uri_canonical (uri);
g_free (uri);
return canonical_uri;
}
/*
* uri: a possibly mangled "uri", in UTF8
*/
gboolean
gedit_file_open_single_uri (const gchar* uri)
{
......@@ -838,7 +790,7 @@ gedit_file_open_single_uri (const gchar* uri)
if (uri == NULL) return FALSE;
full_path = gedit_file_make_canonical_uri_from_input (uri);
full_path = eel_make_uri_from_input (uri);
if (full_path != NULL)
{
......@@ -852,8 +804,8 @@ gedit_file_open_single_uri (const gchar* uri)
{
gchar *uri_utf8;
uri_utf8 = g_filename_to_utf8 (full_path, -1, NULL, NULL, NULL);
uri_utf8 = eel_format_uri_for_display (full_path);
if (uri_utf8 != NULL)
{
gedit_utils_flash_va (_("Loaded file '%s'"), uri_utf8);
......
......@@ -45,6 +45,7 @@
#include "gedit2.h"
#include "bonobo-mdi.h"
#include "gedit-document.h"
#include "gedit-debug.h"
/* =================================================== */
/* Flash */
......@@ -215,15 +216,28 @@ gedit_utils_is_uri_read_only (const gchar* uri)
gint res;
g_return_val_if_fail (uri != NULL, TRUE);
gedit_debug (DEBUG_FILE, "URI: %s", uri);
/* FIXME: all remote files are marked as readonly */
if (!gedit_utils_uri_has_file_scheme (uri))
return TRUE;
canonical_uri = eel_make_uri_canonical (uri);
file_uri = gnome_vfs_unescape_string_for_display (canonical_uri);
g_return_val_if_fail (canonical_uri != NULL, TRUE);
/* Note that: strlen ("file://") == 7 */
res = access (file_uri + 7, W_OK);
gedit_debug (DEBUG_FILE, "CANONICAL URI: %s", canonical_uri);
file_uri = gnome_vfs_get_local_path_from_uri (canonical_uri);
if (file_uri == NULL)
{
gedit_debug (DEBUG_FILE, "FILE URI: NULL");
return TRUE;
}
res = access (file_uri, W_OK);
g_free (canonical_uri);
g_free (file_uri);
......@@ -1407,9 +1421,11 @@ gedit_utils_uri_exists (const gchar* text_uri)
{
GnomeVFSURI *uri;
gboolean res;
g_return_val_if_fail (text_uri != NULL, FALSE);
gedit_debug (DEBUG_FILE, "text_uri: %s", text_uri);
uri = gnome_vfs_uri_new (text_uri);
g_return_val_if_fail (uri != NULL, FALSE);
......@@ -1417,6 +1433,8 @@ gedit_utils_uri_exists (const gchar* text_uri)
gnome_vfs_uri_unref (uri);
gedit_debug (DEBUG_FILE, res ? "TRUE" : "FALSE");
return res;
}
......@@ -1483,25 +1501,30 @@ gedit_utils_convert_search_text (const gchar *text)
gboolean
gedit_utils_create_empty_file (const gchar *uri)
{
gchar *temp_filename;
gchar *canonical_uri;
gchar *filename;
int fd;
g_return_val_if_fail (uri != NULL, FALSE);
/* Get filename from uri */
temp_filename = eel_make_uri_canonical (uri);
if (!gedit_utils_uri_has_file_scheme (uri))
return FALSE;
canonical_uri = eel_make_uri_canonical (uri);
g_return_val_if_fail (canonical_uri != NULL, FALSE);
if ((temp_filename == NULL) || (strlen (temp_filename) <= 7))
filename = NULL;
else
filename = g_strdup (temp_filename + 7);
gedit_debug (DEBUG_FILE, "CANONICAL URI: %s", canonical_uri);
if (temp_filename != NULL)
g_free (temp_filename);
filename = gnome_vfs_get_local_path_from_uri (canonical_uri);
g_free (canonical_uri);
if (!filename)
if (filename == NULL)
{
gedit_debug (DEBUG_FILE, "FILENAME: NULL");
return FALSE;
}
fd = open (filename, O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
......
......@@ -31,6 +31,7 @@
#include <libgnomevfs/gnome-vfs.h>
#include "gnome-recent-model.h"
#include "gnome-recent-view.h"
#include <eel/eel-vfs-extensions.h>
#define GNOME_RECENT_MODEL_BASE_KEY "/desktop/gnome/recent_files"
#define GNOME_RECENT_MODEL_GLOBAL_LIMIT_KEY "global_limit"
......@@ -96,6 +97,20 @@ enum {
static GType model_signals[LAST_SIGNAL] = { 0 };
static GObjectClass *parent_class = NULL;
#if 0
static void
print_list (GSList *list)
{
while (list) {
g_print ("%s, ", (char *)list->data);
list = list->next;
}
g_print ("\n\n");
}
#endif
/**
* gnome_recent_model_get_type:
* @:
......@@ -375,7 +390,7 @@ gnome_recent_model_monitor_uri_list (GnomeRecentModel *recent,
{
GSList *p;
const gchar *uri;
p = list;
while (p != NULL) {
uri = (const gchar *)p->data;
......@@ -413,17 +428,19 @@ gnome_recent_model_add (GnomeRecentModel * recent, const gchar * uri)
GSList *uri_lst;
gchar *gconf_key;
gchar *utf8_uri;
GError *error = NULL;
gchar *canonical_uri;
g_return_val_if_fail (recent, FALSE);
g_return_val_if_fail (GNOME_IS_RECENT_MODEL (recent), FALSE);
g_return_val_if_fail (recent->gconf_client, FALSE);
g_return_val_if_fail (uri, FALSE);
utf8_uri = g_filename_to_utf8 (uri, -1, NULL, NULL, &error);
if (error) {
g_warning ("Couldn't add: %s", error->message);
g_error_free (error);
canonical_uri = eel_make_uri_canonical (uri);
g_return_val_if_fail (canonical_uri != NULL, FALSE);
utf8_uri = g_filename_to_utf8 (canonical_uri, -1, NULL, NULL, NULL);
if (utf8_uri == NULL) {
g_warning ("Couldn't add %s to recent file list", uri);
return FALSE;
}
......@@ -464,6 +481,8 @@ gnome_recent_model_add (GnomeRecentModel * recent, const gchar * uri)
g_free (gconf_key);
gnome_recent_model_g_slist_deep_free (uri_lst);
g_free (utf8_uri);
return TRUE;
}
......@@ -484,19 +503,30 @@ gnome_recent_model_delete (GnomeRecentModel * recent, const gchar * uri)
GSList *new_uri_lst;
gboolean ret = FALSE;
gchar *gconf_key;
gchar *utf8_uri;
gchar *canonical_uri;
g_return_val_if_fail (recent, FALSE);
g_return_val_if_fail (GNOME_IS_RECENT_MODEL (recent), FALSE);
g_return_val_if_fail (recent->gconf_client, FALSE);
g_return_val_if_fail (uri, FALSE);
canonical_uri = eel_make_uri_canonical (uri);
g_return_val_if_fail (canonical_uri != NULL, FALSE);
utf8_uri = g_filename_to_utf8 (canonical_uri, -1, NULL, NULL, NULL);
if (utf8_uri == NULL) {
g_warning ("Couldn't remove %s from recent file list", uri);
return FALSE;
}
gconf_key = gnome_recent_model_gconf_key (recent);
uri_lst = gconf_client_get_list (recent->gconf_client,
gconf_key,
GCONF_VALUE_STRING, NULL);
new_uri_lst = gnome_recent_model_delete_from_list (recent, uri_lst,
uri);
utf8_uri);
/* if it wasn't deleted, no need to cause unneeded updates */
/*
......@@ -523,9 +553,12 @@ gnome_recent_model_delete (GnomeRecentModel * recent, const gchar * uri)
g_free (gconf_key);
gnome_recent_model_g_slist_deep_free (new_uri_lst);
g_free (utf8_uri);
return ret;
}
#if 0
static GSList *
gnome_recent_model_unescape_list (GnomeRecentModel *model, GSList *list)
{
......@@ -541,20 +574,24 @@ gnome_recent_model_unescape_list (GnomeRecentModel *model, GSList *list)
while (tmp) {
uri = (gchar *)tmp->data;
unescaped_uri = gnome_vfs_unescape_string_for_display (uri);
ascii_uri = g_filename_from_utf8 (unescaped_uri, -1,
ascii_uri = g_filename_from_utf8 (uri, -1,
NULL, NULL, &error);
g_free (unescaped_uri);
if (error) {
if (error)
{
g_warning ("Couldn't convert: %s", error->message);
g_error_free (error);
error = NULL;
} else
newlist = g_slist_prepend (newlist, ascii_uri);
}
else
{
unescaped_uri = gnome_vfs_unescape_string_for_display (ascii_uri);
newlist = g_slist_prepend (newlist, unescaped_uri);
g_free (unescaped_uri);
g_free (ascii_uri);
tmp = tmp->next;
}
}
newlist = g_slist_reverse (newlist);
......@@ -563,36 +600,55 @@ gnome_recent_model_unescape_list (GnomeRecentModel *model, GSList *list)
return newlist;
}
#endif
/**
* gnome_recent_model_get_list:
* @recent: A GnomeRecentModel object.
*
* This returns a linked list of strings (URIs) currently held
* by this object.
* by this object (in UTF8).
*
* Returns: A GSList *
*/
GSList *
gnome_recent_model_get_list (GnomeRecentModel * recent)
{
GSList *uri_lst;
GSList *uri_utf8_lst;
GSList *uri_lst = NULL;
GSList *iter;
gchar *gconf_key = gnome_recent_model_gconf_key (recent);
g_return_val_if_fail (recent, NULL);
g_return_val_if_fail (recent->gconf_client, NULL);
g_return_val_if_fail (GNOME_IS_RECENT_MODEL (recent), NULL);
uri_lst = gconf_client_get_list (recent->gconf_client,
uri_utf8_lst = gconf_client_get_list (recent->gconf_client,
gconf_key,
GCONF_VALUE_STRING, NULL);
g_free (gconf_key);
iter = uri_utf8_lst;
while (iter != NULL)
{
gchar *uri;
const gchar *uri_utf8 = (const gchar*) iter->data;
uri = g_filename_from_utf8 (uri_utf8, -1, NULL, NULL, NULL);
if (uri != NULL)
uri_lst = g_slist_prepend (uri_lst, uri);
iter = g_slist_next(iter);
}
uri_lst = g_slist_reverse (uri_lst);
/* FIXME: This sucks. */
gnome_recent_model_monitor_uri_list (recent, uri_lst);
uri_lst = gnome_recent_model_unescape_list (recent, uri_lst);
gnome_recent_model_g_slist_deep_free (uri_utf8_lst);
return uri_lst;
}
......@@ -733,15 +789,18 @@ gnome_recent_model_gconf_to_list (GConfValue* value)
g_return_val_if_fail (value, NULL);
iter = gconf_value_get_list(value);
iter = gconf_value_get_list (value);
while (iter != NULL)
{
gchar *uri;
GConfValue* element = iter->data;
gchar *uri = g_strdup (gconf_value_get_string (element));
list = g_slist_prepend (list, uri);
const gchar *uri_utf8 = gconf_value_get_string (element);
uri = g_filename_from_utf8 (uri_utf8, -1, NULL, NULL, NULL);
if (uri != NULL)
list = g_slist_prepend (list, uri);
iter = g_slist_next(iter);
}
......@@ -779,19 +838,6 @@ gnome_recent_model_gconf_key (GnomeRecentModel * model)