Commit 35eddb54 authored by Paolo Maggi's avatar Paolo Maggi

Fixed bug #136231

parent 6dd68325
2004-03-05 Paolo Maggi <paolo.maggi@polito.it>
* gedit-file-selector-util.c (analyze_response): fixed bug #136231 (Should
not run the file chooser in a loop to enter folders)
2004-03-05 Paolo Borelli <pborelli@katamail.com>
* dialogs/gedit-preferences-dialog.c: make the enable_syntax_highlight
......
......@@ -196,40 +196,6 @@ is_read_only (const gchar *name)
return ret;
}
static gboolean
file_is_dir (gchar *name)
{
gboolean ret;
GnomeVFSFileInfo *info;
g_return_val_if_fail (name != NULL, FALSE);
info = gnome_vfs_file_info_new ();
/* FIXME: is GNOME_VFS_FILE_INFO_FOLLOW_LINKS right in this case? - Paolo */
if (gnome_vfs_get_file_info (name,
info,
GNOME_VFS_FILE_INFO_FOLLOW_LINKS) != GNOME_VFS_OK)
{
gnome_vfs_file_info_unref (info);
return FALSE;
}
if (info->valid_fields & GNOME_VFS_FILE_INFO_FIELDS_TYPE)
{
ret = (info->type == GNOME_VFS_FILE_TYPE_DIRECTORY);
}
else
{
ret = FALSE;
}
gnome_vfs_file_info_unref (info);
return ret;
}
static gboolean
file_exists (gchar *name)
{
......@@ -289,15 +255,7 @@ analyze_response (GtkFileChooser *chooser, gint response)
uri = gnome_vfs_get_uri_from_local_path (file_name);
}
/* Change into directory if that's what user selected */
if (file_is_dir (uri))
{
gtk_file_chooser_set_current_folder_uri (chooser, uri);
g_free (file_name);
g_free (uri);
}
else if (GET_MODE (chooser) == FILESEL_OPEN_MULTI)
if (GET_MODE (chooser) == FILESEL_OPEN_MULTI)
{
GSList *files;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment